Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Stop Redirect
  3. // @namespace NFFpRgFl
  4. // @include http://reeksite.com/share/*
  5. // @match *://palimas.tv*
  6. // @run-at document-start
  7. // @require https://code.jquery.com/jquery-3.4.1.min.js
  8. // ==/UserScript==
  9.  
  10.  
  11. $(document).ready(function() {
  12. 'use strict';
  13. 'use esnext';
  14.  
  15. console.log("Stopping redirects!");
  16.  
  17. var imgs = $("img");
  18. for (var i = 0; i < imgs.length; i++) {
  19. if (!$(imgs[i]).parent().is("a")) {
  20. continue;
  21. }
  22. var full_link = $(imgs[i]).parent().attr("onclick");
  23. if (!full_link) {
  24. continue;
  25. }
  26. var link = full_link.slice(13, -3);
  27. $(imgs[i]).parent().attr("href", link);
  28. }
  29.  
  30. function injectFunction(f){
  31. var script = document.createElement("script");
  32. script.appendChild(document.createTextNode(f));
  33. document.head.appendChild(script);
  34. }
  35.  
  36. injectFunction('const BlockerBanner = 0;');
  37. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement