+1
-1
@@ -1,1 +0,1 @@ | ||
| (function(){"use strict";var d=function(c){var h=c.server,i=c.domain,j=function(){fetch(h+"/pageview",{method:"POST",body:JSON.stringify({url:location.href,domain:i,referrer:document.referrer}),headers:{"content-type":"application/json"}})};return{pageview:j}},a=document.currentScript||document.querySelector("script[data-analybase]");if(a){var e=a.getAttribute("data-site"),f=a.getAttribute("data-server")||"https://api.analybase.com",b=d({server:f,domain:e});b.pageview();var g=history.pushState;history.pushState=function(){return b.pageview(),g.apply(this,arguments)},window.addEventListener("popstate",function(){b.pageview()})}})(); | ||
| (function(){"use strict";var d=function(c){var i=c.server,j=c.domain,k=function(){fetch(i+"/pageview",{method:"POST",body:JSON.stringify({url:location.href,domain:j,referrer:document.referrer}),headers:{"content-type":"application/json"}})};return{pageview:k}},a=document.currentScript||document.querySelector("script[data-analybase]");if(a){var e=a.getAttribute("data-site"),f=a.getAttribute("data-server")||"https://api.analybase.com",g=location.hostname==="localhost"||/\.local$/.test(location.hostname);if(!g){var b=d({server:f,domain:e});b.pageview();var h=history.pushState;history.pushState=function(){return b.pageview(),h.apply(this,arguments)},window.addEventListener("popstate",function(){b.pageview()})}}})(); |
+15
-12
@@ -30,17 +30,20 @@ (function () { | ||
| var server = script.getAttribute("data-server") || "https://api.analybase.com"; | ||
| var api = init({ | ||
| server: server, | ||
| domain: domain | ||
| }); | ||
| api.pageview(); | ||
| var p = history.pushState; | ||
| history.pushState = function() { | ||
| var isLocal = location.hostname === "localhost" || /\.local$/.test(location.hostname); | ||
| if (!isLocal) { | ||
| var api = init({ | ||
| server: server, | ||
| domain: domain | ||
| }); | ||
| api.pageview(); | ||
| return p.apply(this, arguments); | ||
| }; | ||
| window.addEventListener("popstate", function () { | ||
| api.pageview(); | ||
| }); | ||
| var p = history.pushState; | ||
| history.pushState = function() { | ||
| api.pageview(); | ||
| return p.apply(this, arguments); | ||
| }; | ||
| window.addEventListener("popstate", function () { | ||
| api.pageview(); | ||
| }); | ||
| } | ||
| } | ||
| }()); |
+1
-1
| { | ||
| "name": "analybase", | ||
| "version": "1.1.2", | ||
| "version": "1.1.3", | ||
| "files": [ | ||
@@ -5,0 +5,0 @@ "*.js", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
2336
10.66%47
6.82%