/*extern ufJS, ufJSActions, ufJSParser, openUILink */
/*
To be used with the Operator extension for Firefox
Adds support for the danish blogosphere
Based on code from the Operator extension created by Michael Kaply, IBM, http://www.kaply.com/weblog/
Modified by Pelle Wessman, Pelles kodfabrik, http://kodfabrik.se/
Modfied by Soren Johannessen http://www.microformats.dk/ (2007-04-25)
Upgraded to now work with Operator 0.8  (2007-06-05) - Many thanks to  Michael Kaply for taking your time to fix this User Script
Other Operator 0.8 User Scripts see http://www.kaply.com/weblog/operator-user-scripts/ 
*/

function dk_init() {
  
  var overskrift = {
    description: "Find interesting blogs on overskrift.dk",
    icon: "http://overskrift.dk/favicon.ico",
    pkUrl: "http://overskrift.dk/tag/",
    pkUrl2 : "",
    scope: {
      semantic: {
        "tag" : "tag"
      }
    },
    doAction: function(semanticObject, semanticObjectType) {
      if (semanticObject.tag) {
        return this.pkUrl + encodeURIComponent(semanticObject.tag.replace(/\+/, ' ')) + this.pkUrl2;
      }
    },
    clone: function(){
      var newObject = new this.constructor();
      newObject.__proto__ = this;
      return newObject;
    }
  };
  
  var mitkbh = overskrift.clone();
  mitkbh.description = "Search on MitKBH";
  mitkbh.icon = "http://mitkbh.dk/favicon.ico";
  mitkbh.pkUrl = "http://mitkbh.dk/search.php?search=";
  
  var kbhrundt = overskrift.clone();
  kbhrundt.description = "Search on KBH360";
  kbhrundt.icon = "";
  kbhrundt.pkUrl = "http://kbh360.dk/search.php?search=";
  
  var hq = overskrift.clone();
  hq.description = "Find photos on 23 Home";
  hq.icon = "http:/23hq.com/favicon.ico";
  hq.pkUrl = "http://23hq.com/tag/";
  
  
  var computerworld = overskrift.clone();
  computerworld.description = "Find same topic on ComputerWorld";
  computerworld.icon = "";
  computerworld.pkUrl = "http://computerworld.dk/tag/";
  
  SemanticActions.add("overskrift_search_tags", overskrift);
  SemanticActions.add("mitkbh_search_tags", mitkbh);
  SemanticActions.add("kbhrundt_search_tags", kbhrundt);
  SemanticActions.add("hq_search_tags", hq);
  SemanticActions.add("computerworld_dk_search_tags", computerworld);
}

dk_init();




