SHARE
TWEET

Untitled

a guest Jul 21st, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var btn = document.createElement('a');
  2. btn.setAttribute('href', url);
  3. btn.setAttribute('_target', 'blank'); // here I need something like _null or _void
  4. btn.textContent = 'Find the item externally';
  5. var ref = document.evaluate('/div[@class="seaarch-form"]/div[@class="submit_button"]', node, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  6. var btnNode = node.insertBefore(btn, ref.singleNodeValue);
  7. btnNode.addEventListener("click", search_external, false);
  8. .
  9. .
  10. .
  11. function search_external() {
  12.   var url = this.href;
  13.   //system('firefox ' + url); // not supported
  14. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top