Steam Total Points

Displays total points rewarded to author of workshop post

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Steam Total Points
// @version      0.1
// @description  Displays total points rewarded to author of workshop post
// @author       Artzert
// @include      https://steamcommunity.com/sharedfiles/filedetails/*
// @include      https://steamcommunity.com/workshop/filedetails/*
// @icon         https://www.google.com/s2/favicons?domain=steamcommunity.com
// @namespace https://greasyfork.org/users/781358
// ==/UserScript==

var holder = document.getElementsByClassName("review_award_ctn")[0];
var awards = holder.children;
var i
var total = 0
var totalamount = 0
console.log(document.getElementsByClassName("workshopItemTitle")[0].innerHTML, "- Point Breakdown")
for (i = 0; i < awards.length; i++) {
    var element = awards[i]
    var amount = element.getAttribute("data-reactioncount");
    var data = element.getAttribute("data-tooltip-html");
    var npart1 = data.slice(data.indexOf("<div class=\"reaction_award_name\">"), data.length)
    var name = npart1.slice("<div class=\"reaction_award_name\">".length, npart1.indexOf("</div>"))
    var wpart1 = data.slice(data.indexOf("<div class=\"reaction_award_points\">Award gives creators "), data.length)
    var wpart2 = wpart1.slice("<div class=\"reaction_award_points\">Award gives creators ".length, wpart1.indexOf(" Steam Points."))
    var rawworth = wpart2.replace(",", "");
    var totalindiv = rawworth * parseInt(amount)
    total += totalindiv
    totalamount += parseInt(amount)
    console.log(name,"(",wpart2,") x",new Intl.NumberFormat().format(amount),"=",new Intl.NumberFormat().format(totalindiv))
}
console.log("TOTAL AWARDS GIVEN:", new Intl.NumberFormat().format(totalamount))
console.log("TOTAL POINTS GAINED:", new Intl.NumberFormat().format(total))
var node = document.createElement("temp");
node.innerHTML = "<div class=\"review_award tooltip\"><span class=\"review_award_count \">&nbsp;"+new Intl.NumberFormat().format(totalamount)+" Awards Worth "+new Intl.NumberFormat().format(total)+" Points&nbsp;</span></div>"
holder.appendChild(node)
console.log(node)