ts: fix this parameter when calling minifier-helper versions of document functions

This commit is contained in:
mappu 2017-11-12 12:57:38 +13:00
parent d2dd96dcd3
commit 224263afad

View File

@ -22,10 +22,9 @@ var CHAT_SCROLLBACK_LIMIT = 200;
var EXTERN_ROOT = window.location.protocol + "//" + window.location.host + "/";
// Help out the braindead minifier, use these functions instead
var document_getElementById = document.getElementById;
var document_getElementsByClassName = document.getElementsByClassName;
var document_createElement = document.createElement;
var document_addEventListener = document.addEventListener;
var document_getElementById = function(x) { return document.getElementById(x); }
var document_getElementsByClassName = function(x) { return document.getElementsByClassName(x); }
var document_createElement = function(x) { return document.createElement(x); }
/**
* Encode a string for NMDC
@ -510,7 +509,7 @@ var pagevis_setup = function(fnActive, fnInactive) {
pagevis_currently_visible = true
} else {
document_addEventListener(vc, function() {
document.addEventListener(vc, function() {
if (document[h]) {
pagevis_currently_visible = false;
fnInactive();