I'm using javascript to create some automation action in a website. I know that chrome console would be reset when we hit the refresh button, so I'm trying to manage it by Tampermonkey so the script can run individually from the chrome console.
But my issue still there, tampermonkey userscript still reset when page is reloaded. Can you help me with those problem? Many thanks! p/s I'm an amateur in this coding subject so it is grateful if you guys can give me a hand :)
A part of my script is look like this:
var $balance = $("#balance"), $statusBar = $(".progress #banner"); function getStatus() { var a = $statusBar.text(); if (hasSubString(a, "Rolling in")) return "waiting"; if (hasSubString(a, "***ROLLING***")) return "rolling"; if (hasSubString(a, "rolled")) { var b = parseInt(a.split("rolled")[1]); return lastRollColor = getColor(b), "rolled" } return "unknown" } function getBalance() { return parseInt($balance.text()) }