fork(7) download
  1. // ==UserScript==
  2. // @name RARBG Search from IMDB
  3. // @namespace http://t...content-available-to-author-only...y.net/
  4. // @version 0.1
  5. // @description Bla
  6. // @author Varrus
  7. // @match *.imdb.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. let url = new URL(window.location.href);
  15. let rar = url.pathname;
  16. console.log(rar);
  17.  
  18. function searchRARbg() {
  19. window.open('https://r...content-available-to-author-only...g.to/torrents.php?category%5B%5D=14&category%5B%5D=48&category%5B%5D=17&category%5B%5D=44&category%5B%5D=45&category%5B%5D=47&category%5B%5D=50&category%5B%5D=51&category%5B%5D=52&category%5B%5D=42&category%5B%5D=46&category%5B%5D=54&search=' +rar)
  20. }
  21.  
  22. // 1. Create the button
  23. var button = document.createElement("button");
  24. button.innerHTML = "Search RARBG";
  25.  
  26. button.setAttribute("style", "background-color: #3860BB; color: white; font-size: small; border: 2px solid #6489db; line-height: 0; padding: 1em;");
  27.  
  28. // 2. Append somewhere
  29. var summary_text = document.getElementsByClassName("summary_text")[0];
  30. summary_text.appendChild(button);
  31.  
  32. // 3. Add event handler
  33. button.addEventListener ("click", searchRARbg);
  34.  
  35.  
  36. })();
Runtime error #stdin #stdout #stderr 0.36s 39548KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
js: uncaught JavaScript runtime exception: ReferenceError: "URL" is not defined.