From 224263afad65cf4eee0bf67c6c20c26e751a1e34 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 12 Nov 2017 12:57:38 +1300 Subject: [PATCH] ts: fix this parameter when calling minifier-helper versions of document functions --- client/dcwebui.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/client/dcwebui.ts b/client/dcwebui.ts index 296f9e9..7fc440a 100644 --- a/client/dcwebui.ts +++ b/client/dcwebui.ts @@ -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();