AceStream links open TV Video streaming links in browser

Replaces acestream:// with 127.0.0.1:6878/webui/player/

目前为 2018-11-14 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name AceStream links open TV Video streaming links in browser
  3. // @namespace https://github.com/ARTEMISPETROV
  4. // @description Replaces acestream:// with 127.0.0.1:6878/webui/player/
  5. // @include http://*
  6. // @include https://*
  7. // @version 1.0
  8. // @author Artem Petrov <petrovartem@protonmail.com> ( https://github.com/ARTEMISPETROV)
  9. // @source https://github.com/ARTEMISPETROV/AceStream-Player-Watch-streaming-TV-Video-in-browser-Userscript
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. var url1,url2;
  14. url1 = ['acestream://'];
  15. url2 = ['127.0.0.1:6878/webui/player/'];
  16. url3 = ['?autoplay=true'];
  17. var a, links;
  18. var tmp="a";
  19. var p,q;
  20. links = document.getElementsByTagName('a');
  21. for (var i = 0; i < links.length; i++) {
  22. a = links[i];
  23. for(var j=0;j<url1.length; j++)
  24. {
  25. tmp = a.href+"" ;
  26. if(tmp.indexOf(url1[j]) != -1)
  27. {
  28. p=tmp.indexOf(url1[j]) ;
  29. q="http://";
  30. q = q + url2[j] + tmp.substring(p+url1[j].length,tmp.length)+ url3;
  31. a.href=q ;
  32. }
  33. }
  34. }