// ==UserScript== // @name 1337X - Magnet/Torrent links everywhere // @namespace NotNeo // @version 1.0.1 // @description Adds magnet and torrent links everywere, e.g. directly to the torrent search results // @author NotNeo // @contributor darkred // @license MIT // @include /^https:\/\/(www\.)?1337x\.(to|st|ws|eu|se|is|gd|unblocked\.dk)((?!\/torrent)).*$/ // @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js // @grant none // @downloadURL none // ==/UserScript== //Thanks to darkred for the improvement suggestions. You can find his version here: https://github.com/darkred/Userscripts/tree/master/1337x_-_torrent_and_magnet_links (function() { 'use strict'; //true: Show the DL links as the last column //false: Show the DL links as the second column var ShowDLLinksAsLastColumn = false; //true: torrent = green, magnet = red //false: torrent = red, magnet = green var SwapDLLinkBUttonColors = false; $(function() { //If we are not on a page that has a list of torrents, don't run the script if($("table.table-list").length > 0) { InsertStyles(); InsertColumns(); InsertOnClickListeners(); } }); function InsertStyles() { addGlobalStyle(` main.container, div.container { max-width: 1600px; } table.table-list td.dl-buttons { padding-left: 2.5px; padding-right: 2.5px; text-align: center; position: relative; display: inline-block; width: 50px; } td.dl-buttons > a, td.dl-buttons > a:hover, td.dl-buttons > a:visited, td.dl-buttons > a:link, td.dl-buttons > a:active { color: inherit; text-decoration: none; cursor: pointer; display: inline-block; margin: 0 1.5px; } .list-dl-button-magnet > i.flaticon-magnet { font-size: 13px; color: `+(SwapDLLinkBUttonColors ? "#da3a04" : "#89ad19")+`; } .list-dl-button > i.flaticon-torrent-download { font-size: 13px; color: `+(SwapDLLinkBUttonColors ? "#89ad19" : "#da3a04")+`; } span.fetchNotifier { display: inline-block; position: absolute; z-index: 999; padding: 2px 8px; left: 45px; top: 0px; width: 140px; background-color: white; border: 1px black solid; border-radius: 20px; } `); } function InsertColumns() { let header = '