# HG changeset patch
# User Anton Shestakov <av6@dwimlabs.net>
# Date 1511359897 -28800
#      Wed Nov 22 22:11:37 2017 +0800
# Node ID 1207a50a6dc3a18d65ac2f974726ff1508aebfe6
# Parent  69a865dc2adaddf8e1dde84f25d8347a17b11952
hgweb: look up "URLSearchParams" in "window" to work around jshint issues

Unfortunately, current version of jshint (2.9.5) doesn't know such a global
variable and complains that it's undefined. Since this line tries to look up
URLSearchParams in a global scope (i.e. window), let's simply preface it with
"window." to work around jshint.

diff --git a/mercurial/templates/static/mercurial.js b/mercurial/templates/static/mercurial.js
--- a/mercurial/templates/static/mercurial.js
+++ b/mercurial/templates/static/mercurial.js
@@ -451,7 +451,7 @@
         "ignoreblanklines",
     ];
 
-    var urlParams = new URLSearchParams(window.location.search);
+    var urlParams = new window.URLSearchParams(window.location.search);
 
     function updateAndRefresh(e) {
         var checkbox = e.target;