您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Amazonの商品検索画面で、Amazon.jpから販売される商品のみが検索結果に表示されるようになるボタンを追加します。
当前为
// ==UserScript== // @name amazon command // @namespace amazon command // @version 0.2 // @description Amazonの商品検索画面で、Amazon.jpから販売される商品のみが検索結果に表示されるようになるボタンを追加します。 // @author meguru // @include https://www.amazon.co.jp/* // @grant none // ==/UserScript== (function() { 'use strict'; const createButton = (label, cmd) => { const button = document.createElement('button'); if (!button) { console.log('failed create ${label}') }; button.innerHTML = label; button.onclick = () => { window.location.href += cmd; }; return button; } const refArea = document.getElementById('s-refinements'); if (!refArea) { console.log('not find refArea'); return; }; const fromAmazonJpButton = createButton('from amazon.jp', '&emi=AN1VRQENFRJN5'); let res = refArea.parentNode.insertBefore(fromAmazonJpButton, refArea); if (!res) { console.log('failed add button'); return; }; const offButton = createButton('50% off', '&pct-off=50-'); res = refArea.parentNode.insertBefore(offButton, refArea); if (!res) { console.log('failed add button'); return; }; })();