diff --git a/src/lib/userscripts.js b/src/lib/userscripts.js index e56763e..557a4a6 100644 --- a/src/lib/userscripts.js +++ b/src/lib/userscripts.js @@ -292,8 +292,9 @@ document.removeEventListener('keydown', this.wrap, false); }, getStatus: function () { + var that = this; return new Promise(function (resolve) { - var ev_name = 'LDRize.status.Taberareloo' + (++this.count); + var ev_name = 'LDRize.status.Taberareloo' + (++that.count); document.addEventListener(ev_name, function callee(e) { document.removeEventListener(ev_name, callee, false); var data = JSON.parse(e.data);