IMDB - add tracker links

at bottom-right of page

当前为 2015-06-25 提交的版本,查看 最新版本

  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.3
  9. // ==/UserScript==
  10.  
  11. var sites = [
  12. "https://karagarga.in/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. "http://www.opensubtitles.org/en/search/sublanguageid-all/imdbid-tt"
  18. ];
  19.  
  20. var names = ["KG", "CG", "Tik", "PTP", "BTN", "OS"];
  21.  
  22. // don't run in iframes
  23. if (!window.frameElement) {
  24. var h = document.location + "";
  25. var q = h.split('/tt')[1] + "";
  26. var ref = q.substr(0, 7);
  27.  
  28. doIt();
  29. }
  30.  
  31. function doIt() {
  32. if (!document.body) {
  33. setTimeout(function(){ doIt(); }, 100);
  34. return;
  35. }
  36.  
  37. 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; } ");
  38. GM_addStyle(" #linkbar a:link, #linkbar a:visited { color: #ccc; text-decoration: none; } ");
  39.  
  40. var bar = document.createElement('div');
  41. bar.id = "linkbar";
  42. document.body.appendChild(bar);
  43. var openAll = "<a href='#' onclick=\"javascript: ";
  44. for (i=0; i < sites.length; i++) {
  45. bar.innerHTML += "<a href='" + sites[i] + ref + "'>" + names[i] + "</a> | ";
  46. openAll += "window.open(' " + sites[i] + ref + " ', '_blank'); ";
  47. }
  48. bar.innerHTML += openAll + " return false; \">ALL</a> ";
  49. }