igg-games.com ad skip

igg-games ad skipper

当前为 2019-11-10 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name igg-games.com ad skip
  3. // @namespace https://igg-games.com/
  4. // @version 0.1
  5. // @description igg-games ad skipper
  6. // @author _Chelos_
  7. // @match bluemediafiles.com/creatinglinks*
  8. // @match megaup.net/*/*
  9. // @grant none
  10. // ==/UserScript==
  11. switch(window.location.host){
  12. case "bluemediafiles.com":{
  13. window.location = "http"+getParameterByName("xurl");
  14. break;
  15. }
  16. case "megaup.net":{
  17. let checktick = setInterval(()=>{
  18. let el = document.querySelector("a.btn")
  19. if(el){
  20. clearInterval(checktick);
  21. window.open(
  22. el.href,
  23. '_blank' // <- This is what makes it open in a new window.
  24. );
  25. window.open('','_self').close()
  26. }
  27. },100)
  28. break;
  29. }
  30. }
  31. function getParameterByName(name, url) {
  32. if (!url) url = window.location.href;
  33. name = name.replace(/[\[\]]/g, '\\$&');
  34. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  35. results = regex.exec(url);
  36. if (!results) return null;
  37. if (!results[2]) return '';
  38. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  39. }