# fakespot-amazon.js -rw-r--r-- 611 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// ==UserScript==
// @name     FakeSpot Amazon
// @version  1
// @match    https://*.amazon.com/gp/product/*
// ==/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 = "Fake Spot"
  a.target="_blank"
  
  let askPipe = document.createElement('span')
  askPipe.className = "askPipe"
  askPipe.innerText = "|"
  
  ratings.append(askPipe)
  ratings.append(a)
  
}, false);