Skip Jump Page

Skip Jump Page.

目前為 2022-05-05 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Skip Jump Page
  3. // @description Skip Jump Page.
  4. // @version 0.4
  5. // @namespace https://github.com/to
  6. // @author to
  7. // @license MIT
  8. //
  9. // @match https://songwhip.com/*
  10. // @match https://linkco.re/*
  11. // @match https://*.lnk.to/*
  12. // @match https://big-up.style/*
  13. // @match https://orcd.co/*
  14. // @match https://nex-tone.link/*
  15. // @match https://*.landr.com/*
  16. // @match https://song.link/*
  17. // @match https://ffm.to/*
  18. // @match https://fanlink.to/*
  19. // @icon https://www.google.com/s2/favicons?sz=64&domain=spotify.com
  20. // ==/UserScript==
  21.  
  22. [
  23. '//a[contains(@href, "spotify")]',
  24. '//img[contains(@src, "spotify")]/ancestor::a',
  25. ].forEach(path => {
  26. let elm = $x(path);
  27.  
  28. // 予約ページを避ける
  29. if(elm && !/accounts\.spotify/.test(elm.href))
  30. elm.click();
  31. });
  32.  
  33. function $x(path){
  34. return document.evaluate(
  35. path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
  36. }