Greasy Fork

Greasy Fork is available in English.

Aliexpress: .ru links to .com

Use after setting English: https://webapps.stackexchange.com/a/153233

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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