您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Saves a collection of torrents as a text file
// ==UserScript== // @author adinbied // @name PassThePopcorn Collection Export Tool // @description Saves a collection of torrents as a text file // @version 1.11 // @namespace http://gf.qytechs.cn // @include *://passthepopcorn.me/collages.php* // @comment Based upon the WCD/RED Collage Export Utility by Elevory // ==/UserScript== /*jshint esversion: 6 */ var btnExport = document.createElement("a"); var container = document.getElementById("content").getElementsByClassName("linkbox")[0]; var data = ""; var pageSpans = document.getElementById("pageslinksdiv"); window.URL = window.URL || window.webkitURL; // support for additional browsers btnExport.innerHTML = "[Export]"; btnExport.href="#"; btnExport.setAttribute("onclick", "saveData();"); btnExport.onclick = function() { var entries = document.getElementById("coverart"); var pagetitle = document.title; collageName = pagetitle.replace(' :: PassThePopcorn',''); if (pageSpans !== null) { pageSpans = pageSpans.getElementsByTagName("span"); for (var i = 0; i < pageSpans.length; i++) { if(pageSpans[i].id.indexOf("pagelink") != -1) { pageSpans[i].firstChild.click(); } } if (pageSpans.length > 0) document.getElementById("pagelink0").firstChild.click(); // return to first page } PopulateData(entries); if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { var a = document.createElement("a"); a.download = "Collage - " + collageName + ".txt"; var blob = new Blob([data], {"data":"application/octet-stream"}); a.href = window.URL.createObjectURL(blob); a.click(); } else { var taExport; if (!document.getElementsByName("taExport")[0]) { taExport = document.createElement("textarea"); taExport.name = "taExport"; taExport.rows = "5"; container.appendChild(taExport); } taExport.value = data; } }; container.appendChild(btnExport); function PopulateData(entries) { let list = document.getElementById("collection_movielist").getElementsByClassName("list")[0]; if ('firstElementChild' in list) { var child = list.firstElementChild; var array1 = []; while (child) { array1.push(child.innerHTML); child = child.nextElementSibling; var re = /\>([^[<]+)<\/a\> \[([^\]]+)\]/g; var s = array1; var m; var input = []; // initialise an empty array do { m = re.exec(s); if (m) { input.push(m[1]+" ["+m[2]+"]"+"\r\n"); } } while (m); var ready = input; var NumberString = input.join(''); data = NumberString; } } }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址