Open haarp opened 5 years ago
Correct. No longer working. Please update- I love this script!
I miss this beautiful script for shopping!
This is a great script. Can you update your script? It is currently unavailable.
我想念这个漂亮的购物脚本!
I miss this beautiful script for shopping!
The author may not update again. Do you know that there are other similar products?
Hello,
it seems Amazon has changed their site slightly.
While this script still works on categories, such as https://www.amazon.de/s?k=&rh=n%3A2077447031
But it will not work anymore if a search term or filter is active, such as https://www.amazon.de/s?k=proxxon&rh=n%3A2077447031
The author may not update again. Do you know that there are other similar products?
I'm sure someone can write something more succinct, but this works for me.
(function() {
function getDataUrl() {
let qSelector = document.querySelector('#s-result-sort-select');
let featuredrankDataUrl = qSelector.options[1].getAttribute('data-url');
return featuredrankDataUrl.replace(/price-asc-rank/gi,"review-count-rank");
}
function addOption() {
let sortDropdown = document.getElementById('s-result-sort-select');
let hasOption = document.getElementById('sort-rcr');
for(const opt in sortDropdown){
if(sortDropdown.options[opt].value == "review-count-rank"){
hasOption = true;
break;
}
}
if (sortDropdown && !hasOption) {
let newOption = `<option data-url="${getDataUrl()}" value="review-count-rank" id="sort-rcr">Most reviews</option>`;
sortDropdown.insertAdjacentHTML('beforeend', newOption);
}
}
setInterval(addOption, 1000);
})();
Hello,
it seems Amazon has changed their site slightly.
While this script still works on categories, such as https://www.amazon.de/s?k=&rh=n%3A2077447031
But it will not work anymore if a search term or filter is active, such as https://www.amazon.de/s?k=proxxon&rh=n%3A2077447031