diff --git a/gazelle_json_export.user.js b/gazelle_json_export.user.js new file mode 100644 index 0000000..8d6d14c --- /dev/null +++ b/gazelle_json_export.user.js @@ -0,0 +1,37 @@ +// ==UserScript== +// @name Gazelle - Torrentpage JSON export +// @namespace http://tampermonkey.net/ +// @version 0.7 +// @description Add JSON export buttons to torrents +// @author Flacstradamus@notwhat +// @author itismadness@orpheus +// @include http*://redacted.ch/torrents.php?id=* +// @include http*://redacted.ch/artist.php?id=* +// @include http*://hydra.zone/torrents.php?id=* +// @include http*://hydra.zone/artist.php?id=* +// @include http*://libble.me/torrents.php?id=* +// @include http*://libble.me/artist.php?id=* +// @include http*://lztr.me/torrents.php?id=* +// @include http*://lztr.me/artist.php?id=* +// ==/UserScript== + +(function() { + 'use strict'; + // only add one link, can get duplicates if using forward/back buttons in browser + if (document.querySelectorAll('a[href*="ajax.php?action=torrent"]').length > 0) { + return; + } + var downloadlinkElms = document.querySelectorAll('a[href*="torrents.php"]'); + for(var i=0,link, l=downloadlinkElms.length;i