Skip to content

Commit

Permalink
Fix getStatus, thanks @dlwr
Browse files Browse the repository at this point in the history
Close #273
  • Loading branch information
Constellation committed Jul 24, 2014
1 parent ebb0815 commit 189aab3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/userscripts.js
Expand Up @@ -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);
Expand Down

0 comments on commit 189aab3

Please sign in to comment.