We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1417dc commit ae0821aCopy full SHA for ae0821a
app/assets/javascripts/setdocdomain.js
@@ -1,4 +1,8 @@
1
// Proxino.log("gg.js domain was " + document.domain);
2
// weird, was ggtracker.com even though script was served via CDN
3
-document.domain = /(\w+)(.\w+)?$/.exec(location.hostname)[0];
+if (location.hostname.match(/^[0-9.]*$/) == null) {
4
+ // only set document.domain if our location is a hostname like ggtracker.com or
5
+ // ggtracker.test. But if it's an IP address, dont bother.
6
+ document.domain = /(\w+)(.\w+)?$/.exec(location.hostname)[0];
7
+}
8
// Proxino.log("now gg.js domain is " + document.domain);
0 commit comments