Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamespsterling/d7f355dfa82b25fd2d0a920bad68721a to your computer and use it in GitHub Desktop.
Save jamespsterling/d7f355dfa82b25fd2d0a920bad68721a to your computer and use it in GitHub Desktop.
Auto sorts by review count
(function() {
'use strict';
const amazonSearchUrls = ['https://www.amazon.com/s', 'https://smile.amazon.com/s']
const sortQsp = '&s=review-count-rank';
if (amazonSearchUrls.some(substr => window.location.href.startsWith(substr)) && !window.location.href.includes(sortQsp)) {
console.log(`adding ${sortQsp}`);
window.location.replace(`${window.location.href}${sortQsp}`)
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment