diff options
| author | Ray <[email protected]> | 2023-01-21 19:47:55 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2023-01-21 19:47:55 +0100 |
| commit | bf2db5dc10c9b8d10ab555c3834a9e96d2873d3e (patch) | |
| tree | 06011738a562f6071bbcb0a433d326f967848dd6 /common | |
| parent | 2ca294e1fe33f58e989f1783b61992b8c026a6b3 (diff) | |
| download | raylib.com-bf2db5dc10c9b8d10ab555c3834a9e96d2873d3e.tar.gz raylib.com-bf2db5dc10c9b8d10ab555c3834a9e96d2873d3e.zip | |
REMOVED: Google Analytics
Diffstat (limited to 'common')
| -rw-r--r-- | common/common.js | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/common/common.js b/common/common.js deleted file mode 100644 index d79f659..0000000 --- a/common/common.js +++ /dev/null @@ -1,36 +0,0 @@ -/* Cookies */ -// Source: https://www.w3schools.com/js/js_cookies.asp -function getCookie(cname) { - let name = cname + "="; - let decodedCookie = decodeURIComponent(document.cookie); - let ca = decodedCookie.split(';'); - - for(let i = 0; i <ca.length; i++) { - let c = ca[i]; - while (c.charAt(0) == ' ') { - c = c.substring(1); - } - if (c.indexOf(name) == 0) { - return c.substring(name.length, c.length); - } - } - - return ""; -} - -/* Analytics */ -if(getCookie("confirmed_analytics") !== "true") { - document.body.innerHTML += - "<div id='analytics-banner'>\ - <p><strong>NOTE: </strong>This website uses Google Analytics to collect visitor statistics.</p>\ - <button id='analytics-confirm'><strong>I UNDERSTAND</strong></button>\ - </div>"; - - const div_analyticsBanner = document.getElementById("analytics-banner"); - const btn_analyticsConfirm = document.getElementById("analytics-confirm"); - - btn_analyticsConfirm.onclick = function() { - div_analyticsBanner.setAttribute("confirmed", "true"); - document.cookie += "confirmed_analytics=true;"; - }; -}
\ No newline at end of file |
