/*===========================================================================*\
| The Amazon Review Tabulator - TART |
| (c) 2016 by Another Floyd |
| From your "Public Reviews Written by You" page on Amazon, this script |
| collects and tabulates vote tallies and related information, from all of |
| your Amazon reviews. Click the "Tabulate" link in the "Your Profile" |
| panel. See item on script host menu, on browser toolbar, to toggle |
| Display Mode, between using the Amazon tab (default), or showing in a |
| new tab, but with fewer features. |
\*===========================================================================*/
// ==UserScript==
// @name The Amazon Review Tabulator - TART
// @namespace floyd.scripts
// @version 1.3.1
// @author Another Floyd at Amazon.com
// @description Lists all of your reviews with vote and comment tallies, with updates highlighted
// @include https://*amazon.com/gp/cdp/member-reviews*
// @include https://*amazon.co.uk/gp/cdp/member-reviews*
// @include https://*amazon.ca/gp/cdp/member-reviews*
// @include https://*amazon.com.au/gp/cdp/member-reviews*
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_xmlhttpRequest
// @grant GM_log
// @grant GM_openInTab
// @grant GM_registerMenuCommand
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
// @require https://greasyfork.org/scripts/20744-sortable/code/sortable.js?version=132520
// @downloadURL none
// ==/UserScript==
// Start
(function() {
var showUpdatesOnly = false;
var primaryDisplayBuffer = "";
var updateDisplayBuffer = "";
var userID = "";
var reviewCount = 0;
var reviewerRanking = "";
var helpfulVotes = 0;
var oldStoreItemIDs = [];
var oldStoreUpvotes = [];
var oldStoreDownvotes = [];
var oldStoreComments = [];
var newStoreItemIDs = "";
var newStoreUpvotes = "";
var newStoreDownvotes = "";
var newStoreComments = "";
var tallyUpvotes = 0;
var tallyDownvotes = 0;
var tallyStars = 0;
var tallyComments = 0;
// use this reference for progress indicator
var profileDiv = "";
var profileDivOriginalHTML = "";
var profileDivTabulateHTML = "
Tabulate";
function assembleDisplayBuffers (completeSetOfTableRows, reviewsProcessed) {
var today = new Date();
var formattedToday = today.toLocaleDateString('en-US',{month:'long',day:'numeric',year:'numeric'});
var toggleLink = (GM_getValue("AltDisplayMode", true)) ? "
Toggle View: All Reviews | Updates Only" : ""; var bMargin = (GM_getValue("FixedFooter", true)) ? "36" : "0"; // set up top of display page primaryDisplayBuffer = "" + "
Reviewer Ranking: " + reviewerRanking + "
" +
"Review Count: " + reviewCount + "
" +
"Helpful Votes: " + helpfulVotes + "
" +
"Upvote/Review Ratio: " + (helpfulVotes/reviewCount).toFixed(2) + toggleLink +
"
| # | " + "Item | " + "Date | " + "Stars | " + "Upvotes | " + "Downvotes | " + "% Helpful | " + "Comments |
|---|---|---|---|---|---|---|---|
| " + " | " + " | " + " | " + calcStars + " | " + "" + tallyUpvotes + " | " + "" + tallyDownvotes + " | " + "" + calcHelpfulPct + " | " + "" + tallyComments + " | " + "