Skip to content

Instantly share code, notes, and snippets.

@gitatmax
Forked from jeregrine/fakespot.js
Last active January 29, 2023 18:23
Show Gist options
  • Save gitatmax/6f5f62c55b43defdbdc82e75316ef516 to your computer and use it in GitHub Desktop.
Save gitatmax/6f5f62c55b43defdbdc82e75316ef516 to your computer and use it in GitHub Desktop.
Add a Fakespot Link to Amazon Product Pages
// ==UserScript==
// @name Fakespot Amazon
// @version 1
// @match https://*.amazon.com/*
// ==/UserScript==
const url = "https://www.fakespot.com/analyze?url="+ encodeURIComponent(window.location)
window.addEventListener('load', () => {
let ratings = document.getElementById("averageCustomerReviews_feature_div");
let a = document.createElement('a')
a.href = url
a.innerText = "Fakespot"
a.target="_blank"
let askPipe = document.createElement('span')
askPipe.className = "askPipe"
askPipe.innerText = "|"
ratings.append(askPipe)
ratings.append(a)
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment