0% found this document useful (0 votes)
25 views4 pages

LANEWATCH Script

Uploaded by

nikofitness.1
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download as txt, pdf, or txt
0% found this document useful (0 votes)
25 views4 pages

LANEWATCH Script

Uploaded by

nikofitness.1
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1/ 4

// ==UserScript==

// @name LCY2- LANEWATCH/SSP


// @namespace http://amazon.com/
// @version 0.2
// @updateURL
https://raw.githubusercontent.com/sriem/MySPD_rename/main/MySPD_rename_script.js
// @downloadURL
https://raw.githubusercontent.com/sriem/MySPD_rename/main/MySPD_rename_script.js
// @author riemas - edeclark (waiting for F0001* code help)
// @description A Tampermonkey userscript which rename Chute IDs to Lables
// @match https://grafana-prod.prod.eu-west-
1.grafana.insights.aft.amazon.dev/*
// @match https://sort-eu.aka.amazon.com/foresight/LCY2/LCY2-ShippingSorter*
// @match https://sort-eu.aka.amazon.com/foresight/LCY2/LCY2-FlatSorter
// @match https://trans-logistics-eu.amazon.com/ssp/dock/hrz/ob*
// @match http://awcsmetrics-iad.aka.amazon.com/lanewatch2.html?
fc=lcy2&sorter=LCY2-ShippingRouterController*
// @match http://awcsmetrics-iad.aka.amazon.com/lanewatch2.html?
fc=lcy2&sorter=LCY2-FlatsRouterController
// ==/UserScript==

var interval = setInterval(function() {

(function () {
var replacements, regex, key, textnodes, node, s;

replacements = {
S0101: "SR-01",
S0102: "SR-02",
S0103: "SR-R2/3",
S0104: "SR-03",
S0105: "SR-04",
S0106: "R4/5",
S0107: "SR-5",
S0108: "SR-06",
S0109: "R6/7",
S0110: "SR-07",
S0111: "SR-08",
S0112: "R8/9",
S0113: "SR-09",
S0114: "SR-10",
S0115: "R10/11",
S0116: "SR-11",
S0117: "SR-12",
S0118: "SR-13",
S0119: "SR-14",
S0120: "R14/15",
S0121: "SR-15",
S0122: "SR-16",
S0123: "R16/17",
S0124: "SR-17",
S0125: "SR-18",
S0127: "SR-19",
S0128: "SR-20",
S0130: "SR-21",
S0131: "BOX KO",
S0133: "SR-23",
S0134: "SR-24",
S0136: "SR-25",
S0137: "SR-26",
S0139: "SR-27",
S0140: "SR-28",
S0201: "WEST EXP L1",
S0202: "WEST EXP L2",
S0203: "WEST EXP L3",
S0204: "WEST EXP KO",
S0301: "EAST EXP L1",
S0302: "EAST EXP L2",
S0303: "EAST EXP L3",
S0304: "EAST EXP KO",
Sorter2: "WEST EXP",
Sorter3: "EAST EXP",
1080: "MI6 KO",
1001: "WEST EXP",
1040: "MI1 KO",
1041: "EAST EXP",
1002: "FR-102",
1003: "FR-103",
1004: "FR-104",
1005: "FR-105",
1006: "FR-106",
1007: "FR-107",
1008: "FR-108",
1009: "FR-109",
1010: "FR-110",
1011: "FR-111",
1012: "FR-112",
1013: "FR-113",
1014: "FR-114",
1015: "FR-115",
1016: "FR-116",
1017: "FR-117",
1018: "FR-118",
1019: "FR-119",
1020: "FR-120",
1021: "FR-121",
1022: "FR-122",
1023: "FR-123",
1024: "FR-124",
1025: "FR-125",
1026: "FR-126",
1027: "FR-127",
1028: "FR-128",
1029: "FR-129",
1030: "FR-130",
1031: "FR-131",
1032: "FR-132",
1033: "FR-133",
1034: "FR-134",
1035: "FR-135",
1036: "FR-136",
1037: "FR-137",
1039: "FR-139",
1043: "FR-203",
1044: "FR-202",
1045: "FR-205",
1046: "FR-204",
1047: "FR-207",
1048: "FR-206",
1049: "FR-209",
1050: "FR-208",
1051: "FR-211",
1052: "FR-210",
1053: "FR-213",
1054: "FR-212",
1055: "FR-215",
1056: "FR-214",
1057: "FR-217",
1058: "FR-216",
1059: "FR-219",
1060: "FR-218",
1061: "FR-221",
1062: "FR-220",
1063: "FR-223",
1064: "FR-222",
1065: "FR-225",
1066: "FR-224",
1067: "FR-227",
1068: "FR-226",
1069: "FR-229",
1070: "FR-228",
1071: "FR-231",
1072: "FR-230",
1073: "FR-233",
1074: "FR-232",
1075: "FR-235",
1076: "FR-234",
1077: "FR-237",
1078: "FR-236",
1079: "FR-239",
1042: "FR-142Supp",
1038: "FR-138Supp",
1082: "FR-240Supp",
1084: "FR-242Supp",
1042: "FR-142Supp",
1086: "FR-301",
1088: "FR-302",
1090: "FR-401",
1092: "FR-402",

};

regex = {};
for (key in replacements) {
regex[key] = new RegExp(key, "g");
}

textnodes = document.evaluate(
"//body//text()",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null
);

for (var i = 0; i < textnodes.snapshotLength; i++) {


node = textnodes.snapshotItem(i);
s = node.data;
for (key in replacements) {
s = s.replace(regex[key], replacements[key]);
}
node.data = s;
}
})();

}, 5000);

You might also like