From 88dd7e74394abe11c7f85d9d23214bc56a4179c5 Mon Sep 17 00:00:00 2001 From: herbert Date: Mon, 9 Jan 2023 18:21:11 +0000 Subject: [PATCH] added copy of gazelle json export script --- gazelle_json_export.user.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 gazelle_json_export.user.js 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