Ticket #22: ticket#22.patch

File ticket#22.patch, 0.8 kB (added by loucypher.m..@gmail.com, 1 year ago)

uses openNewTabWith()

  • trunk/src/chrome/chromeFiles/content/browser.js

    old new  
    107107 */ 
    108108GM_BrowserUI.openInTab = function(domWindow, url) { 
    109109  if (this.isMyWindow(domWindow)) { 
    110     document.getElementById("content").addTab(url); 
     110    try { 
     111      openNewTabWith(url, content.document.location.href, null, null, false); 
     112    } catch(ex) {/* 
     113      If it tries to open a chrome link, Firefox will display message 
     114      in Error Console: 
     115      "Security Error: Content at [docURL] may not load or link to [linkURL]." 
     116      so I guess it's not necessary to use GM_log(ex) or throw any errors here. (?) 
     117    */} 
    111118  } 
    112119} 
    113120