home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 8434 / 8434.xpi / chrome / content / seamonkeyCompat.js < prev    next >
Encoding:
Text File  |  2008-11-16  |  1.0 KB  |  37 lines

  1. if (typeof openUILinkIn == "undefined") {
  2.     function openUILinkIn(url, where, allowThirdPartyFixup, postData) {
  3.         if (!where || !url) {
  4.             return;
  5.         }
  6.  
  7.         if (where == "save") {
  8.             saveURL(url, null, null, true);
  9.             return;
  10.         }
  11.  
  12.         var w = getTopWin();
  13.  
  14.         if (!w || where == "window") {
  15.             openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no,centerscreen", url, null, null, postData, allowThirdPartyFixup);
  16.             return;
  17.         }
  18.         var browser = w.document.getElementById("content");
  19.         var loadInBackground = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch).getBoolPref("browser.tabs.loadInBackground", "false");
  20.  
  21.         switch (where) {
  22.             case "current":
  23.                 browser.loadURI(url);
  24.                 w.content.focus();
  25.                 break;
  26.             case "tabshifted":
  27.                 loadInBackground = !loadInBackground;
  28.                             case "tab":
  29.                 browser.addTab(url, null, null, !loadInBackground);
  30.                 break;
  31.         }
  32.     }
  33. }
  34. if (typeof checkForMiddleClick == "undefined") {
  35.     function checkForMiddleClick() {
  36.     }
  37. }
  38.