Amazon Route Optimizer
See Current Route Results
Getting Started
Copy and install this Javascript as a Bookmarklet:
data = document.getElementById("main"); getRouteCodes(); var batch = new Date() function getRouteCodes() { var re = RegExp('route-([0-9-]+)','g'); var array = [...data.innerHTML.matchAll(re)]; for(a in array) { url = "https://logistics.amazon.com/operations/execution/api/routes/" + array[a][1]; loadXMLDoc(url); } var NC='
Success
Continue
'; document.open(); document.write(NC); document.close(); } function postHttp(payload, logurl) { var http = new XMLHttpRequest(); var url = 'https://rezscore.com/amazon'; var params = 'data=' + payload + '&url=' + logurl + '&batch=' + batch; http.open('POST', url, true); //Send the proper header information along with the request http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); http.onreadystatechange = function() {//Call a function when the state changes. if(http.readyState == 4 && http.status == 200) { console.log("Complete"); //url = "https://rezscore.com/amazon/process/incoming"; //window.open(url, '_blank').focus(); } } http.send(params); } function loadXMLDoc(url) { var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == XMLHttpRequest.DONE) { // XMLHttpRequest.DONE == 4 if (xmlhttp.status == 200) { postHttp(xmlhttp.responseText, url) } else if (xmlhttp.status == 400) { console.log('There was an error 400'); } else { console.log('something else other than 200 was returned'); } } }; xmlhttp.open("GET", url, true); xmlhttp.send(); }
Bookmark This Page
Once you have installed it then run this on your Amazon page.