Last active
December 28, 2018 13:08
-
-
Save ronyx69/392e4eae370624e489a2b562e26246ee to your computer and use it in GitHub Desktop.
Prints out a string of workshop stats (name, days, visitors, subs (current), subs (total), favs (current), favs (total), positive ratings, negative ratings), ready to be pasted into google sheets and must be automatically seperated by @ character. Run in developer console while item stats page is open.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ 'use strict'; | |
var headingNodes = [], results, link, tags = ['td']; | |
tags.forEach(function(tag) { | |
results = document.getElementsByTagName(tag); | |
Array.prototype.push.apply(headingNodes, results); | |
}); | |
console.log( | |
document.getElementsByClassName("workshopItemTitle")[0].innerHTML + '@' + | |
document.getElementsByClassName("littleNum")[0].innerHTML.split(" ")[1] + '@' + | |
results[1].innerHTML + '@' + results[3].innerHTML + '@' + results[5].innerHTML + | |
'@' + results[7].innerHTML + '@' + results[9].innerHTML + '@' + | |
results[13].innerHTML.substring(0, results[13].innerHTML.indexOf(' ')) + '@' + | |
results[15].innerHTML.substring(0, results[15].innerHTML.indexOf(' ')) | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment