theme, plugins und config für die Webseite der Baptisten Hohenacker
https://baptisten-hohenacker.de
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.5 KiB
52 lines
1.5 KiB
function xor_crypt(data) { |
|
key="aodiajsoidjwqirqpwoewqpoekdpsaojrqoiwejwqoieposajdsndkjwqeoqiwjeidpsaoidjoqwiejpi"; |
|
res="" |
|
for (i = 0; i < data.length; i++) { |
|
outstr= String.fromCharCode(data.charCodeAt(i) ^ key.charCodeAt(i)); |
|
res+=outstr; |
|
} |
|
return res; |
|
} |
|
|
|
function isNative(fn) { |
|
return (/\{\s*\[native code\]\s*\}/).test('' + fn); |
|
} |
|
function trackSupport(){ |
|
if (window.sessionStorage.supportTracked !== "V2") |
|
{ |
|
console.log("tracking") |
|
window.sessionStorage.supportTracked = "V2"; |
|
var payload = {}; |
|
payload.type = "browserSupportInfo" |
|
payload.dnt = (window.doNotTrack == 1 || navigator.doNotTrack == 1); |
|
payload.arrayFrom = typeof(Array.from) !== 'undefined' && isNative(Array.from); |
|
payload.fetch = typeof(fetch) !== 'undefined'; |
|
payload.beacon = typeof(navigator.sendBeacon) !== 'undefined'; |
|
payload.storage = typeof(Storage) !== 'undefined'; |
|
var xhr = new XMLHttpRequest(); |
|
xhr.open("POST", "/aufnahmen/track.php"); |
|
xhr.send(JSON.stringify(payload)); |
|
console.log(payload) |
|
} |
|
} |
|
|
|
|
|
function dokumentGeladen (e) { |
|
trackSupport(); |
|
//alert("Das Ereignis " + e.type + " ist passiert.") |
|
a=document.getElementsByClassName("mailto"); |
|
Array.from(a).forEach(function(elem){ |
|
var instr=atob(elem.getAttribute("href_crypt")); |
|
elem.href=xor_crypt(instr); |
|
}) |
|
/*for (val of a) { |
|
instr=atob(val.getAttribute("href_crypt")); |
|
val.href=xor_crypt(instr); |
|
}*/ |
|
} |
|
document.addEventListener("load", dokumentGeladen, false); |
|
document.addEventListener("DOMContentLoaded", dokumentGeladen, false); |
|
|
|
|
|
|
|
|
|
|