您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
// ==UserScript== // @name Mina Helper // @namespace PowerTalent // @version 0.3 // @description try to take over the world! // @author You // @match http://mina.mazii.net/* // @require https://code.jquery.com/jquery-latest.js // @require https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js // @grant none // ==/UserScript== $(document).ready(function() { $('.tab-header').append('<div id="talentToolDiv" class="item-header tabmina6"></div>'); $('#talentToolDiv').append('<input type="button" id="japaneseBtn" class="btn btn-success" value="JAPANESE"/>'); $('#talentToolDiv').append('<input type="button" class="btn btn-info" id="romanjiBtn" value="KANJI"/>'); $('#talentToolDiv').append('<input type="button" id="vietnamBtn" class="btn btn-warning" value="VIETNAMESE" />'); $('#talentToolDiv').append('<input type="button" id="exportNewWordHira" class="btn btn-primary" value="EXPORT HIRAGANA" />'); $('#talentToolDiv').append('<input type="button" id="exportNewWordKanji" class="btn btn-primary" value="EXPORT KANJI" />'); $('input[type="button"]').css('margin-right','5px'); $('#romanjiBtn').click(function(){ $('.item-roumaji').toggle(); }); $('#vietnamBtn').click(function(){ $('.item-vietnamese').toggle(); }); $('#japaneseBtn').click(function(){ $('.item-japanese').toggle(); }); $('#exportNewWordHira').click(function(){ exportNewWordHira(); }); $('#exportNewWordKanji').click(function(){ exportNewWordKanji(); }); function exportNewWordHira(){ var listNewWord = ''; $('.list-kotoba').each(function(){ listNewWord += $(this).find('.item-japanese')[0].innerHTML; listNewWord += ','; listNewWord += $(this).find('.item-vietnamese')[0].innerHTML; listNewWord += '\n'; }); listNewWord = listNewWord.replace(/。/g, ''); listNewWord = listNewWord.replace(/~/g, ''); listNewWord = listNewWord.replace(/?/g, ''); copyToClipboard(listNewWord); } function exportNewWordKanji(){ var listNewWord = ''; $('.list-kotoba').each(function(){ if (!!$(this).find('.item-roumaji')[0]){ kanji = $(this).find('.item-roumaji')[0].innerHTML; kanji = kanji.replace(/\t/g,''); kanji = kanji.replace(/\n/g,''); kanji = kanji.substring(0,kanji.indexOf(" ")); listNewWord += kanji; } else { return; } listNewWord += '('; listNewWord += $(this).find('.item-japanese')[0].innerHTML; listNewWord += ')'; listNewWord += ','; listNewWord += $(this).find('.item-vietnamese')[0].innerHTML; listNewWord += '\n'; }); listNewWord = listNewWord.replace(/。/g, ''); listNewWord = listNewWord.replace(/~/g, ''); listNewWord = listNewWord.replace(/?/g, ''); copyToClipboard(listNewWord); } function copyToClipboard(val){ new Clipboard('.btn', { text: function(trigger) { return val; } }); alert('Copy success to Clipboard'); } });