// ==UserScript== // @name 115原石会员转存助手-突破500限制 // @namespace http://tampermonkey.net/ // @version 1.0 // @description 115原石会员批量转存助手,可批量转存>500个文件 // @author @ejmkod // @match *://115.com/s/* // @grant GM_xmlhttpRequest // @grant GM_addStyle // @license MIT // @downloadURL none // ==/UserScript== (function() { 'use strict'; GM_addStyle(` #batchTransferButton { position: fixed; bottom: 20px; right: 20px; padding: 10px 20px; background-color: #007bff; color: white; border: none; border-radius: 5px; cursor: pointer; z-index: 1000; } #batchTransferButton:hover { background-color: #0056b3; } #startIndexInputLabel, #cidInputLabel, #batchSizeInputLabel, #startIndexInput, #cidInput, #batchSizeInput { position: fixed; z-index: 1000; } #cidInputLabel { bottom: 140px; right: 200px; } #cidInput { bottom: 140px; right: 20px; } #batchSizeInputLabel { bottom: 100px; right: 200px; } #batchSizeInput { bottom: 100px; right: 20px; } #startIndexInputLabel { bottom: 60px; right: 200px; } #startIndexInput { bottom: 60px; right: 20px; } #progressOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); color: white; display: flex; justify-content: center; align-items: center; z-index: 1000; display: none; flex-direction: column; } #progressBar { width: 80%; height: 20px; background: #555; border-radius: 10px; overflow: hidden; margin-bottom: 10px; position: relative; } #progressFill { height: 100%; width: 0; background: #4caf50; transition: width 0.2s; } #progressText { position: absolute; width: 100%; text-align: center; top: 50%; transform: translateY(-50%); color: white; font-weight: bold; } #toast { visibility: hidden; min-width: 250px; margin-left: -125px; background-color: #333; color: white; text-align: center; border-radius: 2px; padding: 16px; position: fixed; z-index: 1001; left: 50%; bottom: 30px; font-size: 17px; } #toast.show { visibility: visible; -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s; animation: fadein 0.5s, fadeout 0.5s 2.5s; } @-webkit-keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} } @keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} } @-webkit-keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} } @keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} } #errorLabel { position: fixed; bottom: 170px; right: 20px; color: red; z-index: 1000; display: none; } `); const cidInputLabel = document.createElement('label'); cidInputLabel.id = 'cidInputLabel'; cidInputLabel.for = 'cidInput'; cidInputLabel.innerText = 'CID: '; const startIndexInputLabel = document.createElement('label'); startIndexInputLabel.id = 'startIndexInputLabel'; startIndexInputLabel.for = 'startIndexInput'; startIndexInputLabel.innerText = 'Start Index: '; const batchSizeInputLabel = document.createElement('label'); batchSizeInputLabel.id = 'batchSizeInputLabel'; batchSizeInputLabel.for = 'batchSizeInput'; batchSizeInputLabel.innerText = 'Batch Size: '; const cidInput = document.createElement('input'); cidInput.id = 'cidInput'; cidInput.type = 'text'; cidInput.placeholder = 'Enter CID'; const startIndexInput = document.createElement('input'); startIndexInput.id = 'startIndexInput'; startIndexInput.type = 'number'; startIndexInput.placeholder = 'Enter start index'; startIndexInput.value = '0'; const batchSizeInput = document.createElement('input'); batchSizeInput.id = 'batchSizeInput'; batchSizeInput.type = 'number'; batchSizeInput.placeholder = 'Enter batch size'; batchSizeInput.value = '20'; const button = document.createElement('button'); button.id = 'batchTransferButton'; button.innerText = '批量转存'; const progressOverlay = document.createElement('div'); progressOverlay.id = 'progressOverlay'; progressOverlay.innerHTML = `