您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Use after setting English: https://webapps.stackexchange.com/a/153233
// ==UserScript== // @name Aliexpress: .ru links to .com // @namespace tadoritz // @author tadoritz // @description Use after setting English: https://webapps.stackexchange.com/a/153233 // @version 1.1 // @match https://*.aliexpress.ru/* // @match https://*.aliexpress.com/* // @license WTFPL // ==/UserScript== document.querySelectorAll(` /* some preselected links */ .inside-page-logo a, .right-shopcart a, .nav-cart-box a, .ng-bp a, .nav-wishlist a, .flyout-quick-entry a, .ng-mobile a, .sf-aliexpressInfo a, .sf-seoKeyword a, .items-list a`).forEach(item => { url = new URL(item.href); url.host = url.host.replace(".ru", ".com"); item.href = url.href; }); // another variants: // `.inside-page-logo a[href*=".ru"], ...` - same result, but too much words // `a[href*=".ru"]` - applying to all links, may break some links