BS.to Streamtape AutoSelect

AutoSelect Streamtape if available

  1. // ==UserScript==
  2. // @name BS.to Streamtape AutoSelect
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description AutoSelect Streamtape if available
  6. // @author You
  7. // @match https://bs.to/serie/*
  8. // @icon https://www.google.com/s2/favicons?domain=bs.to
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. // &&& markieren, wenn user anderen stream auswäjlt => nicht zu streamtape wechseln
  15. var pathArr = location.pathname.split("/")
  16. if (pathArr.length < 6) {
  17. localStorage.streamtaped = ""
  18. } else {
  19. if (pathArr.length == 6) {
  20. pathArr.splice(pathArr.length-1,1)
  21. } else
  22. pathArr.splice(pathArr.length-2,2)
  23. const path = pathArr.join("/")
  24.  
  25. if (localStorage.streamtaped != path) {
  26. localStorage.streamtaped = ""
  27. var streamtape = document.getElementsByClassName("hoster Streamtape")
  28. for (var i=0;i<streamtape.length;i++) {
  29. if (!streamtape[i].parentElement.attributes.title && streamtape[i].parentElement.parentElement.className!="active" && streamtape[i].parentElement.parentElement.previousElementSibling) {
  30. localStorage.streamtaped = path;
  31. streamtape[i].parentElement.click()
  32. }
  33. }
  34. }
  35. }
  36.  
  37. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址