IMDB - add tracker links

at bottom-right of page

当前为 2014-05-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name IMDB - add tracker links
  3. // @description at bottom-right of page
  4. // @namespace KG
  5. // @include http*://*imdb.com*tt*
  6. // @run-at document-start
  7. // @grant GM_addStyle
  8. // @version 1.2
  9. // ==/UserScript==
  10.  
  11. var sites = [
  12. "https://karagarga.net/browse.php?search_type=imdb&search=",
  13. "https://cinemageddon.net/browse.php?search=tt",
  14. "http://cinematik.net/browse.php?cat=0&incldead=1&sort=1&type=asc&srchdtls=1&search=tt",
  15. "https://passthepopcorn.me/torrents.php?searchstr=tt",
  16. "https://broadcasthe.net/torrents.php?imdb=tt"
  17. ];
  18.  
  19. var names = ["KG", "CG", "Tik", "PtP", "BtN"];
  20.  
  21. // don't run in iframes
  22. if (!window.frameElement) {
  23. var h = document.location + "";
  24. var q = h.split('/tt')[1] + "";
  25. var ref = q.substr(0, 7);
  26.  
  27. doIt();
  28. }
  29.  
  30. function doIt() {
  31. if (!document.body) {
  32. setTimeout(function(){ doIt(); }, 100);
  33. return;
  34. }
  35.  
  36. GM_addStyle(" #linkbar { font-family: sans-serif; font-weight: bold; color: #ccc; background-color: #000; font-size: 0.8em; padding: 0.5em; position: fixed; right: 0; text-align: left; bottom: 0; z-index: 1000; } ");
  37. GM_addStyle(" #linkbar a:link, #linkbar a:visited { color: #ccc; text-decoration: none; } ");
  38.  
  39. var bar = document.createElement('div');
  40. bar.id = "linkbar";
  41. document.body.appendChild(bar);
  42. var openAll = "<a href='#' onclick=\"javascript: ";
  43. for (i=0; i < sites.length; i++) {
  44. bar.innerHTML += "<a href='" + sites[i] + ref + "'>" + names[i] + "</a> | ";
  45. openAll += "window.open(' " + sites[i] + ref + " ', '_blank'); ";
  46. }
  47. bar.innerHTML += openAll + " return false; \">ALL</a> ";
  48. }