Greasy Fork is available in English.
自动修改淘宝/天猫/京东等购物页面的“配送至”地址,在你分享商品截图的时候保护隐私
当前为
// ==UserScript==
// @name 我家在... 改
// @namespace https://114514.plus/
// @version 0.1.5
// @description 自动修改淘宝/天猫/京东等购物页面的“配送至”地址,在你分享商品截图的时候保护隐私
// @author Archeb / jkfujr
// @match https://item.jd.com/*.html*
// @match https://*.detail.tmall.com/item.htm*
// @match https://*.detail.tmall.hk/hk/item.htm*
// @match https://item.taobao.com/item.htm*
// @grant none
// @license GNU GPLv3
// ==/UserScript==
(function () {
"use strict";
var fakeAddress1 = "日本";
var fakeAddress2 = "下北沢";
setTimeout(function () {
switch (window.location.host) {
case "item.jd.com":
document.querySelector(".ui-area-text").innerText = fakeAddress1 + " " + fakeAddress2;
break;
case "detail.tmall.com":
case "detail.tmall.hk":
case "chaoshi.detail.tmall.com":
case "item.taobao.com":
var addressElements = document.querySelectorAll("[class^='Address--mui-addr-tri-']");
addressElements.forEach(function (element) {
if (element.className.includes("1--")) {
element.textContent = fakeAddress1;
} else if (element.className.includes("2--")) {
element.textContent = fakeAddress2;
}
});
break;
}
}, 2500);
})();