Steam Total Points

Displays total points rewarded to author of workshop post

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==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)