您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Redirects AliExpress "gcp" and "ssr" URLs to the corresponding item page using productIds.
// ==UserScript== // @name AliExpress Bypass "3 Picks" and SSR Pages // @namespace http://tampermonkey.net/ // @version 1.2 // @description Redirects AliExpress "gcp" and "ssr" URLs to the corresponding item page using productIds. // @author You // @match https://www.aliexpress.com/gcp* // @match https://www.aliexpress.com/ssr/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const currentUrl = new URL(window.location.href); // Check if the page is a "gcp" or "ssr" product selection page if (currentUrl.pathname.startsWith('/gcp') || currentUrl.pathname.startsWith('/ssr/')) { // Extract the productIds parameter let productIds = currentUrl.searchParams.get('productIds'); if (productIds) { // Split in case of multiple product IDs (":" separator for ssr, "," separator for gcp) let firstProductId = productIds.split(/[:,]/)[0].trim(); // Validate if the extracted product ID is a number if (/^\d+$/.test(firstProductId)) { const newUrl = `https://www.aliexpress.com/item/${firstProductId}.html`; window.location.replace(newUrl); } } } })();