Guest User

KissAnime Beta Server Default and pfail=3

a guest
Jan 20th, 2019
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. // ==UserScript==
  2. // @name KissAnime Beta Server Default and pfail=3
  3. // @namespace KissAnimePlayer
  4. // @include *kissanime.ru*
  5. // @run-at document-start
  6. // @icon http://kissanime.ru/Content/images/favicon.ico
  7. // @version 1.0
  8. // @author YangWenli1
  9. // @description Automatically sets the Beta server as default and also fixes the issue of the beta server player retrying when loading the video at the start. (Original at: https://pastebin.com/xY82U7yt by /u/HMS_Dreadnought)
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. function ChangeUrlDefault() {
  14. if(window.location.href.indexOf("&s=default") > -1) {
  15. window.stop();
  16. var updateLink = '&s=beta&pfail=3';
  17. var currentLink = window.location.href;
  18. currentLink = currentLink.replace('&s=default', updateLink);
  19. location.replace(currentLink);
  20. }
  21. }
  22.  
  23. function ChangeUrlBeta() {
  24. if(window.location.href.indexOf("&pfail=3") === -1) {
  25. if(window.location.href.indexOf("&s=beta") > -1) {
  26. window.stop();
  27. var updateLink = '&s=beta&pfail=3';
  28. var currentLink = window.location.href;
  29. currentLink = currentLink.replace('&s=beta', updateLink);
  30. location.replace(currentLink);
  31. }
  32. }
  33. }
  34.  
  35. ChangeUrlBeta()
  36. ChangeUrlDefault();
Advertisement
Add Comment
Please, Sign In to add comment