Greasy Fork is available in English.

Letterboxd Search Bars

Adds a search bar to torrent- and other websites on Letterboxd

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
  1. // ==UserScript==
  2. // @name Letterboxd Search Bars
  3. // @description Adds a search bar to torrent- and other websites on Letterboxd
  4. // @author Lelobster
  5. // @namespace https://github.com/LeLobster/userscripts/
  6. // @locale English
  7. // @include https://letterboxd.com/film/*
  8. // @version 1.2
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. document.addEventListener('DOMContentLoaded', main);
  13.  
  14. function main() {
  15.  
  16. // Get title and year from an already existing array (filmData) in letterboxd
  17. // How convenient
  18. var filmTitle = filmData['name']
  19. filmTitle = filmTitle.replace(/[\/\\#,+()$~%.":*?<>{}!]/g, ''); // remove chars
  20. filmTitle = filmTitle.replace(/&/g, '%26')
  21. var filmYear = filmData['releaseYear']
  22. // Also maybe get the original title if present
  23. // Don't know how to implement it yet though
  24. // var originalTitle = document.querySelector('[itemprop='datePublished']')
  25. // originalTitle = originalTitle.nextSibling.nextSibling.innerText.replace(/[‘’]/g, '');
  26. console.log(filmTitle, '(' + filmYear + ')')
  27. // Look for the IMDb ID in the button
  28. var imdbElement = document.querySelector('[data-track-action="IMDb"]')
  29. if (imdbElement != 'undefined' && imdbElement != null) {
  30. // Get imdb id from the button
  31. buttons = document.getElementsByClassName('micro-button track-event');
  32. imdbBtn = buttons[0].href.match(/tt(\d{7})/);
  33. var imdbId = imdbBtn[1]
  34. console.log('IMDb ID:', imdbId)
  35. } else {
  36. // In the rare case where a film doesn't have a imdb page
  37. // use just the title instead
  38. var imdbId = filmTitle
  39. console.log('Film has no IMDb page, using filmTitle')
  40. }
  41.  
  42. // Also remove the backdrop because it's annoying to scroll past every time
  43. backdrop = document.getElementById('backdrop');
  44. if (backdrop != null) {
  45. var container = document.getElementById('content');
  46. content = backdrop.getElementsByClassName('content-wrap')[0];
  47. container.replaceChild(content, backdrop);
  48. container.classList.remove('has-backdrop');
  49. console.log('Backdrop removed.')
  50. } else {
  51. console.log('No backdrop present.')
  52. }
  53.  
  54. // Function used to build icons
  55. function createIcon(cont, title, href, icon) {
  56. var a = document.createElement('a');
  57.  
  58. a.href = href;
  59. a.title = title;
  60. a.setAttribute('target','_blank');
  61. var img = document.createElement('img');
  62. img.src = icon;
  63. img.setAttribute('height','16');
  64. img.setAttribute('witdh','16');
  65.  
  66. a.appendChild(img);
  67. var cell = cont.insertCell(-1);
  68. cell.appendChild(a);
  69. console.log(title,'icon built succesfully.')
  70. }
  71. // Function to apply CSS to each icon to make it look nicer
  72. function applyCSS() {
  73. iconElt = document.querySelectorAll('#tor-icons');
  74. iconElt[0].style = 'display: table; margin: 0 auto;'
  75. iconElt[1].style = 'display: table; margin: 0 auto;'
  76.  
  77. iconRow = iconElt[0].childNodes[0].childNodes
  78. for (i = 0, j = iconRow.length; i < j; i++) {
  79. iconRow[i].style = 'padding: 2px 4px 0px 4px;'
  80. iconRow[i].id = 'tor-icon';
  81. }
  82. iconRow2 = iconElt[1].childNodes[0].childNodes
  83. for (i = 0, j = iconRow2.length; i < j; i++) {
  84. iconRow2[i].style = 'padding: 2px 4px 0px 4px;'
  85. iconRow2[i].id = 'tor-icon';
  86. }
  87. console.log('CSS applied.')
  88. }
  89. // Create a new element for the tor icons to fit in
  90. li = document.querySelector('.js-actions-panel');
  91. tab = li.insertBefore(document.createElement('li'), li.lastChild);
  92. div = tab.appendChild(document.createElement('div'));
  93. div.id = 'tor-icons'
  94. tr = div.appendChild(document.createElement('tr'));
  95. // The Pirate Bay
  96. img = 'data:text/html;charset=utf-8;base64,Qk04AwAAAAAAADYAAAAoAAAAEAAAABAAAAABABgAAAAAAAAAAADgTAAA4EwAAAAAAAAAAAAA////'+
  97. '/////////////////////////////////////////////////v7+/////////////Pz8vb297Ozs'+
  98. '////////////////////////////////4uLiSUlJ3d3d////////8/PzEhIScnJy8fHx////////'+
  99. '////////////8fHxwsLCWFhYAAAAyMjI////////5+fnEBAQICAgQkJCV1dXZWVli4uLiYmJUlJS'+
  100. 'KioqPT09bm5uHh4eYWFhwcHBubm5bGxsQEBAp6end3d3FBQUAAAAFBQUOTk5ISEhGRkZPT09WVlZ'+
  101. 'QkJCKioqJycnenp6AAAAQUFBPz8/YGBgjo6O0dHR+/v7////////7+/vxcXFnZ2dg4ODExMTQEBA'+
  102. 'v7+/AAAAgoKCjo6OpaWltra2qqqqpqampaWlpKSkra2tr6+vsbGx5eXll5eXW1tb1NTUcXFxmJiY'+
  103. 'AwMDAAAANzc3VFRUGxsbAAAAX19fPDw8ERERAAAAQUFB/v7+/Pz8////////nJycAAAAAAAAAAAA'+
  104. 'Hx8fCwsLAAAAJiYmBQUFAAAAAAAAKysr+vr6////////////nJycAAAAAAAADw8PAAAAAAAAAAAA'+
  105. 'AAAADQ0NAwMDAAAANjY2+vr6////////////rq6uAAAANjY25eXlWVlZHx8fJycnIyMj0dHRhoaG'+
  106. 'AAAAV1dX////////////////r6+vAAAALS0t0tLSX19fsrKy2dnZZWVlsrKyiIiIAAAAWVlZ////'+
  107. '////////////r6+vAAAAAAAABQUFAgICExMTEBAQAwMDAwMDAQEBAAAAWlpa////////////////'+
  108. 'q6urAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVFRU////////////////19fXSUlJQUFB'+
  109. 'Q0NDQ0NDQ0NDQ0NDQ0NDQ0NDQkJCQkJCqKio/////////////////////////v7+/v7+/v7+/v7+'+
  110. '/v7+/v7+/v7+/v7+/v7+////////////AAA=';
  111.  
  112. createIcon(tr, 'The Pirate Bay','https://thepiratebay.se/search/'+filmTitle+' '+filmYear+'/0/5/200', img);
  113.  
  114. // RARBG
  115. img = 'data:text/html;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAflJREFU'+
  116. 'OI2F0z9oXEcQx/HPCSWY22DcvFe4CK9KoYOQIhZxE1/j5lQLUpig2lIVIhchsY1xZadIYR8uXKhX'+
  117. 'fZUhnFOeXAVOhBDCI+XbJjHsEozRpjid/OdsMrDMsMN+5/eDnV4ppYePcQ0f4cRq/IWf8cdKp5Ry'+
  118. 'uZTypPx//FNK+aGU8kEppbc86/gCn0/nnfFBS3hzQB9VFWwNq/PDQX0HF/Dtsr++LFKijVk/k9Nb'+
  119. 'Mtvs6VG0v8P2sL6Ox/jtDUBAPyzypUFl60oFJkfR8XGUMJm2RsP6XODLFQCE/iI3DcPNGk42mnpt'+
  120. 'bzwjZRmpI9QurlhYqng7ck76MqgCoQZ/vhOwpMQumc46Kee16VEnp6SLjIaVwHP88h5AInEUo8On'+
  121. 'x2dXsD3asLM1gAdoVwApZ/PjVkpZXfc1/WDexoWo0F8+fo6D10eunXlNSdu2Yuxc2qhNDnZsDRsx'+
  122. 'dmJs7d4/hPP4CR+uABZaMykuPgXu7Y8MmiClbDqZ2r19CCPcfAcgyynKOUsL4y9DCP8+uLcjnMLH'+
  123. '40MPDybwHb7G+hkgZcSO1Mk5w9+4uzloXtza35bzord3Y2wyncEdfNUrpVzF3a5Lm23bymjqStPU'+
  124. 'v+Iz/IhvZvM5iYwqBINB8zu+752u86e47tU6n2CMmcU+3cAneHlq+wUe4dl/EuoEoSZWymEAAAAA'+
  125. 'SUVORK5CYII=';
  126.  
  127. createIcon(tr, 'RARBG','https://rarbg.to/torrents.php?search=tt'+imdbId+'&order=size&by=DESC', img);
  128.  
  129. // YTS
  130. img = 'data:text/html;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAB'+
  131. 'mklEQVR42pVSy24TQRCs6pl9GYxJtI5FFBksgrIKQiBxsTgg8QOI7+CD+Cg4EMQRFCCvC5bijZLI'+
  132. 'u57p5pBNDoCE6VMfurq6qotVVeF/Sm463wP9vwHdSD4kgHBpKzG4nIOHbvHTVj2pfOovjnRFDZ7E'+
  133. '+raf7QV/L9patEMv24EGI0HoAWVsSCzsOTQOgLiUeV80wFrifpSdZXsWtIZNNNRBHoUoy/iD1rI7'+
  134. 'iR5pQRI6lyJJ3K3I/VzOk1yo3xI3S29P0mxAWuenWESSS3ZHLOJumuoXT5PeBvvRibpwIPbRbUyd'+
  135. 'MXaA2Fhb67Dy4rE5SrQWAKNx2rt0+YDTt8Wz173w1WjuCsCqqh68zLam2ft357HRuAQAl8LUNNBn'+
  136. 'MFhsCICEXdl6/KGl2u6bAuiUxRYaCCA06KYFyRAAXFmWGnB2rJNX2WDs5981NL9/0BfsV7I4MQtw'+
  137. 'ZVkCWNR6uh83n6fjF0nWF1NA4HMWQ1l/4ootzj+bNtcabja5jKPHvtxNsjUabdlYfRhmn+LFido1'+
  138. 'K/8abwpImMH+SMwvNoOtXGRANwcAAAAASUVORK5CYII=';
  139.  
  140. createIcon(tr, 'YTS','https://yts.ag/browse-movies/'+filmTitle+'/all/all/0/latest', img);
  141.  
  142. // MkvCage
  143. img = 'data:text/html;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAbFBMVEUAAAAUeKoUeKoUeKoUeKoU'+
  144. 'eKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoU'+
  145. 'eKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKoUeKou68KCAAAAI3RSTlMAAv36BijZHNKF'+
  146. 'USX2yLamjjMQ6+ChinxZRTwKrpmYgHJjSiJ9rqkAAACjSURBVBjTJY6HEsMgDEMFCWQ2e6db//+P'+
  147. 'lRsO39MhIxvA4GDHoT8vFgHOmOXZJfL54oO7CaQTeziH3XNBCiCr2chJc/ImAgcTlsAq1P+QTSq6'+
  148. 'UNN7bvbnxcTz3dLLeNpDK8FEpY7cMm7W4XWtAjBMHCXV1jXkBwiMVZStmYfnDHw1s5Q/VhYXTxR3'+
  149. 'JXdkKYTE9ygqWzN2SMWFK4LoUA2AkDXFD6SFC3pnz1FmAAAAAElFTkSuQmCC';
  150.  
  151. createIcon(tr, 'MkvCage','http://www.mkvcage.com/?s='+filmTitle, img);
  152.  
  153. // TorrentProject
  154. img = 'data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB'+
  155. 'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEB'+
  156. 'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAQABADASIA'+
  157. 'AhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAwUH/8QAHhAAAgIDAQEBAQAAAAAAAAAABAUDBgEC'+
  158. 'BwkIFBX/xAAUAQEAAAAAAAAAAAAAAAAAAAAI/8QAIhEAAQMDBAMBAAAAAAAAAAAAAQIEBgMFFBES'+
  159. 'ExUABxYX/9oADAMBAAIRAxEAPwDCvMHyaafRdZ530NlzpZ0dPdLRW9r3Yz3tKYYoFReMF8xB2tPe'+
  160. 'NcsdpYK2ww73OKrbLJxmZBln7IxsxSP6XeUj75kW3jqaGki8tAolrsElDtCuy1FZteaggYMZhG0d'+
  161. 'Sr7qNuKVmuAZeas11eVbjEY1CaYF2JHwLI8nfTeifK4zM62RBB9YqnKm3K6FBbCZE9AJOMb1/Ch1'+
  162. 'aW8bFfvKAhTJJRjKlgkEt8xHGnEdpdYcmiJ6t+m3PfqbRYxrcivfqVo5aj5f0jWskkuefqZxG9g/'+
  163. 's2NAz0MalwKXaJviEWo6btGSBhsfKS1eZk0KNB5bSxMuNRLr2f8AsivZCqpaZtzMEMEN6xOfeY4b'+
  164. 'AIv0e1wmzG5ZiaujoXTOCbb4NRSnInBUK0x+0M4KeILuPyhhhcAcupZ9T1mKRo05SrYBVDsPwGY/'+
  165. '/9k=';
  166.  
  167. createIcon(tr, 'TorrentProject', 'https://torrentproject.se/?hl=en&safe=off&num=20&start=0&orderby=sizeD&s='+filmTitle+' '+filmYear+'&filter=2000', img);
  168. // Zooqle
  169. img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAABWUlEQVQoz42RTytEYRTGD0MJ5QtYy'+
  170. 'AKNaea+z3nfe2fkzy3KSlmYNUlTo6woZaOklCym7IiSpITsfICxYUEWmlB2FmyGKGO4c3TvDMvJsz'+
  171. 'mnnt85nc5D9D8prcfA5b67WfVjmLv+zLYGbCOPa+R5Mxky7ZzFE3L8gtXf6XktPEchLBixxtUmS7T'+
  172. 'PbcApPlU4AHCHgu4kQhQejvgWOaolQsoIpwOAH1CIdRBFI/yNY9zjRmqI1KQWa7q8YdEITxOptBGk'+
  173. 'eAeef67a02IGAiDapA7xxmd4xi7X2x18jkdc4AMe4pUz3TrLNRP2TC8TDbUkRnlGDaoVlFQisEcak'+
  174. 'yEie1nn+d1Z01l4+qonYiW1WCYAnHB83d5igShhUWL59cHs21+V17l1JqMFwgLPbOhLH4RwiYuVDT'+
  175. '4SnzIHZjeRJHJbnSV9YjJmVnnarpJOTKHITrX4wnitCvzqB+tLeV5MwSPnAAAAAElFTkSuQmCC';
  176. createIcon(tr, 'Zooqle', 'https://zooqle.com/search?q='+filmTitle+' '+filmYear+' category%3AMovies%2CTV&s=sz&v=t&sd=d', img);
  177. //1337x
  178. img = 'data:text/html;charset=utf-8;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB'+
  179. 'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEB'+
  180. 'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAQABADASIA'+
  181. 'AhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAgUHCf/EACEQAAEEAgICAwAAAAAAAAAAAAQBAgMF'+
  182. 'BgcIEhEUABMV/8QAFQEBAQAAAAAAAAAAAAAAAAAABwj/xAAhEQACAgICAwADAAAAAAAAAAABAgME'+
  183. 'BQYHERIUFQgWIf/aAAwDAQACEQMRAD8Awh4oat09vWgz/Wt9TvA3E2nPt9e5Sl5cQDluSBGNEJqI'+
  184. 'zW1Uq1JzR5SPIUspFYcVL17gfYj7ldqDSHHzXWttcV1Z+3yFsq0K82FlEGR3E9fRi9ZVlChpPcWp'+
  185. 'bJZnPkFBV4URENZVKZMxCD43pLOPOzcK03TZpmj7ghNmmVJlPitbBW2CoNA+JJFc+0jGUWBLMxB0'+
  186. 'K6FRSMCCfF38lOjcO9dkYFt3E8Oyltgou060EevyWtSqsGRWUUqOcS9tm6D03ema2QwXuQ9zhz5o'+
  187. 'fKyxonwCe1uA5WES1d0OhNmYopZ+sl6i5r47urwqE9k6gbQSOxKWGIGRJ77pn+WFFj+NG/HhrD5H'+
  188. 'i5OYE1izYgp+WD+jJq37PFE0ViUyikvJQx5lmqVwjbI+DA68cmD3/9k=';
  189.  
  190. createIcon(tr, '1337x','https://1337x.to/sort-search/'+filmTitle+'/size/desc/1/', img);
  191. //KickAss
  192. img = 'data:text/html;charset=utf-8;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAA'+
  193. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHUFLcyFLV74bO0UuAAAAAAAAAAAAAAAA'+
  194. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeQEthLmNy+DVzhf81c4X/NXOF/ydUYdsc'+
  195. 'PEUdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkTFeuN3WG/zh2iP84doj/OHaI/zh2'+
  196. 'iP84doj/M2t7/B9BS1IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlS1ecPHmM/zx5jP88eYz/WIyc'+
  197. '/3OfrP9BfI//PHmM/zx5jP83b4D9IEFLPgAAAAAAAAAAAAAAAAAAAAAiQ0wzPXiJ/kB9j/9AfY//'+
  198. 'XZGg//b5+v//////4uvu/2iZp/9AfY//QH2P/zNkcu4AAAAAAAAAAAAAAAAAAAAAMl1q2UWBlP9F'+
  199. 'gZT/RYGU/73T2f///////f7+//L29//p8PL/RYGU/0WBlP9FgZT/KUxXgAAAAAAAAAAAJ0ZPHUeB'+
  200. 'k/9Khpj/SoaY/0qGmP/b5+r//////7vR2P9Khpj/bp6t/0qGmP9Khpj/SoaY/zlndOcAAAAAAAAA'+
  201. 'AC9SXIBPi53/T4ud/0+Lnf9Pi53/0eHm///////F2d//T4ud/0+Lnf9Pi53/T4ud/0+Lnf9Mhpf/'+
  202. 'KEZPEgAAAAA4YGu+VJCh/1SQof9UkKH/VJCh/8HX3f//////6/L0/1SQof9UkKH/VJCh/1SQof9U'+
  203. 'kKH/VJCh/y9QWVwAAAAAQGp31lmUpv9ZlKb/aZ6u/5u/yv/W5en////////////C2N//3urt/3Sm'+
  204. 'tf9ZlKb/WZSm/1mUpv81WWOIAAAAAENseNRemar/Xpmq/3Wntv//////////////////////////'+
  205. '//////+VvMf/Xpmq/16Zqv9emar/OFtlhAAAAABCaHS+Y52v/2Odr/9nn7H/iLTC/4Kxv//0+Pn/'+
  206. '/////6zL1f9jna//Y52v/2Odr/9jna//Y52v/zdXYVwAAAAAPF5od2ehsv9nobL/Z6Gy/2ehsv9n'+
  207. 'obL/xtzi///////f6+//Z6Gy/2ehsv9nobL/Z6Gy/2Wdrv80UVoSAAAAADZTXBJkmqr+a6W2/2ul'+
  208. 'tv9rpbb/a6W2/2ultv9rpbb/a6W2/2ultv9rpbb/a6W2/2ultv9SfovlAAAAAAAAAAAAAAAAS3J9'+
  209. 'xG+ouf9vqLn/XIuZ9GGTovpvqLn/b6i5/2+ouf9gkqD5Zpqp/W+ouf9vqLn/QWJsdwAAAAAAAAAA'+
  210. 'AAAAADtZYhdbipfxQWJrbgAAAAAAAAAAR2t2p2CRn/dBYmtuAAAAAAAAAABGanSgVH6L3wAAAAAA'+
  211. 'AAAA/j8AAPgPAADwBwAA4AMAAMADAADAAQAAgAEAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAB'+
  212. 'AADAAQAAxjMAAA==';
  213.  
  214. createIcon(tr, 'KickAssTorrents','https://katcr.co/new/torrents-search.php?search='+filmTitle+'&sort=size&order=desc', img);
  215. // Nyaa
  216. img = 'data:text/html;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAMFBMVEUJN280qPs83f4Sb+UVkPt6'+
  217. 's/S73vs/wf4ffuwBYOyt7f9A9f6Gxvp23/z1+v45jOtFQINHAAAACXBIWXMAAC4jAAAuIwF4pT92'+
  218. 'AAABjUlEQVR42mWSMUjDQBSGD7K0kz0odFEpWbsYnkKyGAtBF0G6iFMVxCAiAbNksYNchRMKHbo4'+
  219. 'iquLuHbRoa2U6lB3ccog+lCiUkSM7xLqoG+5e9/9/3/v4Bj7WxlIy5b6HS0zY2DGhdodHFzkxuCV'+
  220. 'B1PDUrt9ziaoa8Eb57yWAk0CyLqT54WaXyopICT1DikKut5OgZCOs/LK9wJdKTLH5KjHcMB5QBJS'+
  221. 'HElTOgLsyb3AVyBrghDSAiPg3C+dEqBL7AjAqPBC7/6MLC0zEhaNnueDPg4JkEWNOlfh+4/PwyJd'+
  222. 'CxaNCg2+NNjZ0YssY9rJYz7y1avJ0D9hmg0tioDDspfv9+4fmJa+VhhlDL0bVECdN2F2GTFEJItK'+
  223. 'pBotoqqTscWufybgkmlWCuJGAn5D4/iL2kfcSIApYBR9eej9KiJzBNOrrpuGfqwL0ZTvXgIo1ES8'+
  224. 'tlrvuxTh4dYL0+Zo1+2gF2IYVuIc0+YJuLdqSnTXjAWW/aZdB/GJ+t1NI8eytwSqyo/dcLv+8u83'+
  225. '/ACtd9urh4GQJQAAAABJRU5ErkJggg==';
  226.  
  227. createIcon(tr, 'Nyaa','https://nyaa.pantsu.cat/search?order=false&q='+filmTitle+'&sort=4', img);
  228.  
  229. // Create a new element for the second set
  230. tab = li.insertBefore(document.createElement('li'), li.lastChild);
  231. div = tab.appendChild(document.createElement('div'));
  232. div.id = 'tor-icons'
  233. tr = div.appendChild(document.createElement('tr'));
  234. // OpenSubtitles
  235. img = 'data:text/html;charset=utf-8;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAAEgAAABIAAAAAAAA'+
  236. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/'+
  237. '//////8AAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAAAAAD///////8AAAD/'+
  238. '//////8AAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+
  239. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+
  240. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACqqqr///////+qqqoAAAAAAADMzMzu7u7///////9V'+
  241. 'VVUAAAAAAAAAAAAAAAB3d3eZmZkAAAAAAACZmZmIiIgAAACIiIgAAAAAAABERETd3d0AAAAAAAAA'+
  242. 'AAAAAADu7u4REREAAAAAAAARERHu7u4AAABERET////////d3d0zMzMAAAAAAAAAAAAAAADd3d0i'+
  243. 'IiIAAAAAAAARERHd3d0AAADd3d1EREQAAAAAAAAAAAAAAAAAAAAAAAAAAAB3d3eZmZkAAAAAAACq'+
  244. 'qqp3d3cAAADMzMxEREQAAAARERHd3d0AAAAAAAAAAAAAAAAAAACZmZn///////+qqqoAAAAAAAAi'+
  245. 'IiLu7u7////////u7u4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+
  246. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+
  247. 'AAAAAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAAAAAD/////'+
  248. '//8AAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAA'+
  249. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+
  250. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
  251.  
  252. createIcon(tr, 'OpenSubtitles', 'https://www.opensubtitles.org/en/search/sublanguageid-eng/imdbid-'+imdbId+'/sort-5/asc-0', img);
  253.  
  254. // Subscene
  255. img = 'data:text/html;charset=utf-8;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB'+
  256. 'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEB'+
  257. 'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAQABADASIA'+
  258. 'AhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAACAUH/8QAHBAAAgMBAQEBAAAAAAAAAAAABAUDBgcC'+
  259. 'CAEJ/8QAFAEBAAAAAAAAAAAAAAAAAAAACP/EABwRAAMBAQADAQAAAAAAAAAAAAIDBAEFBhMUEf/a'+
  260. 'AAwDAQACEQMRAD8ANH5gYrhvoz1D3mu3Rgv+JcyvjrJsxb3phmSLbNsUjASUXI3uhp45HVQWWjmZ'+
  261. 'sRK3S8dt/syocFYOYUZGGQYfcKSpUT0PdaZVPPl68tfaxCoVWjFL/eptFPqNygXQSWHlDazVoh7W'+
  262. 'mGkzcF1NgafYe3SeQawjPZl7cIFfN8s3Hywg0Jx99YqNllpjKrMAKhdMLdq193y3Q/pQU9c0KBK3'+
  263. 'IWB2oZF3BPJKo6eLO4/snJsMTMgeEP7pv6he0KF7D1zLXOc8aE6ruOYPRcQ61TY4UUOx7UzqJLow'+
  264. '/R9B4rpRqyE5nM4+jgQzHs20w40rh0w+HtZlitPW3Vh3yMfrZGyL1lhtaEk7Q3CFiQB+zON27q2Y'+
  265. '1A1KIcNbSn3REe8/nQl4uCiyFfQV0PaGglLLalMHAJdDDn+pAz/ntUSaiicJkDEhSOGX/9k=';
  266.  
  267. createIcon(tr, 'Subscene', 'https://subscene.com/subtitles/title?q='+filmTitle, img);
  268.  
  269. //Youtube
  270. img = 'data:text/html;charset=utf-8;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB'+
  271. 'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEB'+
  272. 'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAQABADASIA'+
  273. 'AhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAABQYJ/8QAIRAAAgMAAgICAwAAAAAAAAAAAgQDBQYB'+
  274. 'BwgSERMAFCP/xAAVAQEBAAAAAAAAAAAAAAAAAAAICf/EACQRAAEDAQcFAAAAAAAAAAAAAAECAxIR'+
  275. 'AAQFBhMUIgcIFSRR/9oADAMBAAIRAxEAPwDJnqHwkzHbWsyvWOLzVvsOwdPwwrVV46IagrexRqnL'+
  276. 'ZqKE2W0q9YyVRZKAJmIgLkQi4k5kIfknsTw8yOFtb3GafJavC7Op4NZqtuW7GF+tdKHiVcmEH+S9'+
  277. '4jEgkAuP5MQmJxS+pif5F9YeZLPVupznYeI0dxjt1neWGKq5TronWapt2taq25V/2VXFCkJN1uCO'+
  278. 'UoDKL7Rni+qaOMwG1/latq7K30+g0Wi1uotZJWnbS65ebsbJso+OAkcfsCOU+ePgI/eQy9IxABH0'+
  279. 'ERE0Ku2fy0mjmPeTVezJUvUDHECgoOZVIGhiUUH21uEXrtH3ThWjpKclHAGgy2GqZjOJyXrKU5IB'+
  280. 'LO3LUQE7jWkSoAgH/9k=';
  281. // Extra space is needed after youtube else it won't show, not sure why, but who cares
  282. createIcon(tr, 'Youtube ', 'https://www.youtube.com/results?search_query='+filmTitle+' '+filmYear, img);
  283. //Vimeo
  284. img = 'data:text/html;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC'+
  285. 'JElEQVR42pWTzWsTQRjGfzM7iWm6btNNLKnkUIpE7aGoiMSLgoggFJQeCiIKevLkVfDo1T/AgzcP'+
  286. 'gp6rlFqkiAdti6BeqrYl1UJLKTUfaxo3uzMesttGCEpfGAae9+t5v4QxRrgzOKHLmAY7IVH8Q1qa'+
  287. 'QCXYyK0x9e0yvuhfNn2iznMMBfYhxvBp+CQ3ZVDj6n6dAYRgtDzPOWkZcp2KQxZqIouTEMhO/FoW'+
  288. '516e3IleUjEWJHAVCk3YBi46pB8PUXAk6kofS9dX8AFeHGGoZJMGuDtA5uhnFjxDBtjLMpHFeTZM'+
  289. 'wY6aeMkhbQy1W1kyJXuvsSlJstjDJoBQBLsBLthsP9rkdaAjeprDWYutp9usnFnkbWzX1PhlHw/A'+
  290. 'BKjdyHdWUUBhpAfvbC92UkLpIMmXVdy8RTqKSzVgZitkJM4sRYgfgKcFTYBXdTwVac/bOAD3BxmI'+
  291. '6m3cWOU7GmkMNWHhq5YmsCQNHaI0NKbr+A8gr4HxfoalQJbsNoPZGk/mfnEMQUVrlNVESwCjUUIS'+
  292. 'AHzdobLut9m4ioHbOXIaqIZMjy+3O79rfyCagpDoGDQa9cZjG0BHL4SFU4uUwy4LFzOQsbOQBA/X'+
  293. 'WfN1eweqPlPHP/LhZ4tit41UEryYfizLv/FPf2F2UFB+v0NeCoqdDOO/ZahJK8Ok1lTgbxY/dkjP'+
  294. 'NykKg9v1GCRL+Q3eCWOMcOZwSTJmifbY/nuJsJkSTG6M0vgDh+7cG4NkXB0AAAAASUVORK5CYII=';
  295.  
  296. createIcon(tr, 'Vimeo','https://vimeo.com/search?q='+filmTitle, img);
  297. //Movie-Censorship
  298. img = 'data:text/html;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABZUlEQVR42u2TsWoUYRSFv//OP/8I'+
  299. 'M7vz7xATSSUhoIWmScDKRiys0mUqq+AD2CdlUkSwsxFERLCwWSRFnsBKFvEBljyCxbKQZWcyxyJm'+
  300. 'CQSrNBY53T333gPnHq6T5LgBjBvifxHo9Zbo96tr3Rgjvd7Sot7a8uT5PWKM1PXFrjY3U5kdyeyr'+
  301. '0vSJJCfJyfunMvsisyPt7CQK4bHM3spsT2aHMnuvLHvgGY1akuQUWOX8/CV1PQKg62qgw7kxx8f3'+
  302. 'adt9zN7RNN8B8P4VbfvIX7FiQGQ43AXmQARmSAVN8wKAEMYLO2374eoRAzF+An4hPUdaJsuGwJ2/'+
  303. 'MwGA+fzhv1IISD9I028A5PlHpJ+AB6ak6Qkwp+tqimIZgKrqE8LGpUDFdLrGbHaKc5+ZTH7TNBtI'+
  304. 'Hlhje3uM928Az9nZAUnymsnkGVU1vkihKO6qLAeLBCSnshxc49fXM+X5igaD8pJzt7/AH7Q3jhMe'+
  305. 'rfP3AAAAAElFTkSuQmCC';
  306. createIcon(tr, 'Movie-Censorship','http://www.movie-censorship.com/list.php?s='+filmTitle, img);
  307. // BluRay
  308. img = 'data:text/html;charset=utf-8;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB'+
  309. 'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEB'+
  310. 'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAQABADASIA'+
  311. 'AhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAABAYHCv/EACMQAAEFAQABBAMBAAAAAAAAAAQCAwUG'+
  312. 'BwEIERITFAAJFSH/xAAVAQEBAAAAAAAAAAAAAAAAAAAICf/EAB8RAAIDAQACAwEAAAAAAAAAAAID'+
  313. 'AQQFBgcRExQVEv/aAAwDAQACEQMRAD8A0P8AhjnVXvGc7xYjsmh9etlUVVeVCsSpiwOHkEszi3gG'+
  314. 'jVvNjhdL+Jp1x51vv+DtcV68Sn8l/wCwTOMyzSv4xNQVEaybS7pDSMhd85jZgifioplhiO+NX9L3'+
  315. 'uRvDQpB8gDqor4WT2+uPuMcWyh8gHxP2jGapk3kHnep6wfk8hpSKuJAWGNrFvsZwqAWpn7pgiarH'+
  316. 'FqaeFWQOjrZJoC3eE+rK3fa91KN5ueTeSaBkWP4Zl1quWqu5wcRIy+tXUAqPkJjnI4qOZCE5MMDz'+
  317. 'xDZKzFOv8OCDQIFFwov2JZ/hD4z3TU6yPL7HrR0ZYkbkQwoXv18icg+PqL+X7j2FzFimvYgvdGvW'+
  318. 'jVnQGWjZEB+OJ9ifIl4ar1WN5sdqcH2Hs+efsfsD2dp0qmnXUPU1rrMb+J+++1OT+cYqKqZFDJ//'+
  319. '2Q==';
  320.  
  321. createIcon(tr, 'BluRay', 'http://www.blu-ray.com/search/?quicksearch=1&quicksearch_country=US&quicksearch_keyword='+filmTitle+'&section=theatrical', img);
  322. applyCSS();
  323. }