您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Copy specific quantity of keywords to clipboard with one click. You can set a upper limit of words and change separator sign by modify the source code (at the first two lines)
当前为
// ==UserScript== // @name MerchantWords Copy Keywords to Clipboard | 批量复制关键词 // @version 0.3 // @description Copy specific quantity of keywords to clipboard with one click. You can set a upper limit of words and change separator sign by modify the source code (at the first two lines) // @author QHS // @include http*://www.merchantwords.com/search/* // @grant GM_setClipboard // @grant GM_addStyle // @grant GM_setValue // @grant GM_getValue // @supportURL https://gf.qytechs.cn/scripts/34887 // @namespace https://gf.qytechs.cn/users/155548 // ==/UserScript== !function() { function n() { GM_setValue("max_ammount", $("input#upper_limit").val()), GM_setValue("join_sign", $("input#join_sign").val()), e = $("input#join_sign").val(), a = "" == e ? "\n" : e; } var t = GM_getValue("max_ammount", 60), e = GM_getValue("join_sign", ""); $("input#upper_limit").val(t), $("input#join_sign").val(e); var a = "" == e ? "\n" : e, o = Math.min(t, $(".table .table__content").length); GM_addStyle('.section__head-aside{float:left}#ammount2{margin-top: 7px; color: #aaa;}.coopy{width:120px;}._save{transition:.3s;text-align: center; cursor: pointer;opacity:.7;}._saven{background: #d4d4ff; }._saved{background: #bbffc0;}p._saven:hover { opacity:1;}.win_setting{display: none; height: 177px; margin: 0 auto; position: fixed; width: 425px; background: #fff; z-index: 999; top: 50%; left: 50%; transform: translate(-50%, -50%); box-shadow: 1px 2px 3px rgba(0,0,0,0.3); border-radius: 9px;}.win_setting header{margin: 10px 0; background: #EEE; font-size: 23px; padding-left: 13px; color: #aaaaaa; font-family: "Lato", sans-serif;}.win_setting p{margin: 10px;}.win_setting input{width: 50px; height: 25px; border: 1px #bebebe solid;}#_setting{float: left; margin-right: 20px; margin-top: 6px; font-size: 23px; cursor: pointer; color: #414141;}#ammount input{font-size: 10px; text-align: center; width: 60px;padding-left: 15px; border:1px transparent solid; border-radius: 5px; box-shadow: -1px 2px 3px rgba(0,0,0,0.1);transition:.4s}#ammount input:hover,#ammount input:focus{padding:0;width:75px;border:1px #a9d3e1 solid}.copied{background: #c8f8d0!important; color: #069d35!important; border-color: transparent!important; cursor: not-allowed;}.cannotcopy{background:#ffd3d3!important;border-color:transparent!important;}.cannotcopy:hover{background:#f80c0c!important; cursor: not-allowed;}'), $("div.section__head-actions").prepend('<a class="btn btn-white coopy copyto' + (0 == o ? " cannotcopy" : "") + '" href="javascript:;"> <span id="_icon"> <i class="zmdi zmdi-copy"></i> Copy </span></a>'), $("body").prepend('<div class="win_setting"><header>Setting</header><p>Default number = <input id="upper_limit" value="' + t + '" type="number" max="1000" min="1"></p><p>Separator sign = <input value="' + e + '" id="join_sign"><font style="font-family:arial"> ←</font> join with newline if null</p><p class="_save _saven">Save</p></div>'), $("div.section__head-actions").append('<br><span id="ammount" style="font-size: 16px;text-align: center;"><input value="' + o + '"type="number"min="' + (0 == o ? 0 : 1) + '"max="' + $(".table .table__content").length + '"><font class=_end> Keywords Total</font><i title="Setting" class="zmdi zmdi-settings-square"id="_setting"></i></span><span id="ammount2" style="display:none"></span>'), $(".btn.btn-white.js-btn-toggle").remove(), $("div.section__head-actions").on("mouseover mouseout", "#ammount input", function(n) { "mouseover" == n.type ? $("font._end").html(" To Copy") : "mouseout" == n.type && $("font._end").html(" Keywords Total"); }), $("div.section__head-actions").on("change", "#ammount input", function() { 0 == $(this).val() ? $(".copyto").addClass("cannotcopy") : $(".copyto").removeClass("cannotcopy"); }), $("div.section__head-actions").on("click", ".copyto", function() { var n = $("#ammount input").val(); if (0 == n) return !1; var t = ""; $(".table .table__content").each(function(e) { if (!(e < n)) return !1; t += $(".table .table__content")[e].textContent.replace(" Search MerchantWordsSearch Amazon", a); }), GM_setClipboard(t), setTimeout(function() { $("#ammount2").html(Math.min(n, $(".table .table__content").length) + " Keywords Copied To Clipboard!"); }, 400), $("#ammount2").slideUp(300).delay(300).slideDown(300), $(".zmdi-copy").removeClass("zmdi-copy").addClass("zmdi-check-all"), $(".copyto").removeClass("copyto").addClass("copied"), $("#_icon").html(' <i class="zmdi zmdi-check-all"></i> Copied </span>'); }), $("div.section__head-actions").on("change", "input", function() { $(".copied").addClass("copyto").removeClass("copied"), $(".zmdi-check-all").addClass("zmdi-copy").removeClass("zmdi-check-all"), $("#_icon").html(' <i class="zmdi zmdi-copy"></i> copy </span>'); }), $("div.section__head-actions").on("click", "#_setting", function() { $(".win_setting").slideToggle(), $("._save").addClass("_saven").removeClass("_saved"), $("._save").html("Save"), $("input#upper_limit").val(t), $("input#join_sign").val(e); }), $("body").on("click", "._saven", function() { n(), $("._save").addClass("_saved").removeClass("_saven"), $("._save").html("Saved!"), setTimeout(function() { $(".win_setting").slideToggle(); }, 500); }); }();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址