0

I am on a website, and on this website there is a file named "Away.js". Which starts:

var S = require('core/Storage');
var I = require('core/InputParser');
module.exports = function () { var tAfk;

And everything else is in the function(). I need somehow to change the value of tAfk, is that even possible? I don't want to change the original value in their file, but to write a script which will be changing it for me all the time.

Josh
  • 1
  • 1
  • You are not able to do that, unless the code sets the variable to something that is global, and not local. – skiilaa Apr 15 '17 at 18:52
  • Possible duplicate of [How do JavaScript closures work?](http://stackoverflow.com/questions/111102/how-do-javascript-closures-work) – Jonathan Hall Apr 15 '17 at 18:53
  • You can change it locally using debugger tools. It won't change the original file of course. – inarilo Apr 15 '17 at 18:54
  • You probably want something like [Greasemonkey](https://addons.mozilla.org/fr/firefox/addon/greasemonkey/)... – Badacadabra Apr 15 '17 at 19:10

0 Answers0