您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Descarga el texto de YomiYasu con un comando
// ==UserScript== // @name Descarga el texto de YomiYasu // @namespace Descarga el texto de YomiYasu by Pedro from Aprender Japonés Rapido // @version 0.1 // @description Descarga el texto de YomiYasu con un comando // @license GNU GPLv3 // @author Pedrubik🦙 // @match https://manga.ajr.moe/api/static/* // @grant none // ==/UserScript== (function() { 'use strict'; // Function to save text to a file function saveTextToFile(text, filename) { const blob = new Blob([text], { type: 'text/plain' }); const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = filename; document.body.appendChild(a); // Ensure it's added to the DOM for Firefox a.click(); document.body.removeChild(a); // Clean up after clicking } // Function to be called when the script is activated function DownloadTxt() { var textBoxes = document.querySelectorAll(".textBox"); var textContent = ""; textBoxes.forEach(function(textBox) { textContent += textBox.textContent + '\n'; }); if (textContent) { saveTextToFile(textContent, document.title + '.txt'); } else { console.log(textContent); console.log(document.title + '.txt'); } } const customKeyCode = 74; // 74 corresponds to the 'J' key const isCtrlKey = (event) => event.ctrlKey; const isAltKey = (event) => event.altKey; // Listen for keydown events on the document document.addEventListener('keydown', function(event) { if (event.keyCode === customKeyCode && isCtrlKey(event) && isAltKey(event)) { DownloadTxt(); event.preventDefault(); // Prevent the default action for the key combination } }); })();