Symfony Book 6.4 翻译库
目前為
此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/503008/1424478/symfony_book_64_fanyi.js
// ==UserScript== // @name symfony_book_6.4_fanyi // @namespace fireloong // @version 0.0.6 // @description Symfony Book 6.4 翻译库 // @author Itsky71 // @require https://unpkg.com/[email protected]/dist/jquery.min.js // @grant none // @license MIT // ==/UserScript== (function($) { alert($); })($); // function fanyi(translates){ // let n = 0; // let jsonStr = ''; // $('.ui-heading > h1,.ui-prose .section > h2 > a,.ui-prose p,.pagination-item > a,.pagination-item > span,.ui-prose li').each(function(i,v){ // if(translates.hasOwnProperty($(this).text())) { // $(this).html(translates[$(this).text()]); // } else { // console.log(n,v,$(this).text()); // jsonStr += '\''+$(this).text().replaceAll('\\','\\\\').replaceAll('\'','\\\'').replaceAll("\n",'\\n')+'\': \'\','+"\n"; // n++; // } // }); // console.info(jsonStr); // }