daily pastebin goal
47%
SHARE
TWEET

vertalen

silexy Jan 3rd, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var url = 'https://www.vertalen.nu/vertaal?vertaal=' + encodeURIComponent(this.info.selectionText)+'&van=en&naar=nl';
  2.  
  3. if (this.info.modifiers.indexOf('Ctrl') == -1)
  4. {
  5.     // Open in the same tab.
  6.    
  7.     document.location = url;
  8. }
  9. else
  10. {
  11.     // Open in a new tab.
  12.    
  13.     // window.open() is subject to the site's popup blocker settings, so we'll use a background script instead.
  14.    
  15.     this.runAs('background', function ()
  16.     {
  17.         browser.tabs.create({url: this.params.url, active: true});
  18.     }, {url: url});
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top