dataset wird mit übertragen
This commit is contained in:
10
flag.js
10
flag.js
@@ -23,7 +23,7 @@
|
||||
},3000);
|
||||
}
|
||||
|
||||
var openFlag = function(ev) {
|
||||
var openFlag = function(ev, infos=false) {
|
||||
flag = document.createElement('div');
|
||||
document.body.style.overflowY = 'hidden';
|
||||
flag.id = 'flag-overlay';
|
||||
@@ -49,6 +49,11 @@
|
||||
if(window.location.href) {fields['u'] = window.location.href;}
|
||||
if(navigator.userAgent) {fields['a'] = navigator.userAgent;}
|
||||
fields['d'] = ''+window.screen.width+'x'+window.screen.height+' ('+window.screen.colorDepth+'bit)';
|
||||
if(infos && typeof(infos) == typeof({})) {
|
||||
for(var i in infos) {
|
||||
fields[i] = infos[i];
|
||||
}
|
||||
}
|
||||
|
||||
for(var f in fields) {
|
||||
var inp = document.createElement('input');
|
||||
@@ -92,7 +97,8 @@
|
||||
for(var l=0;l<links.length;l++) {
|
||||
//console.log(l,links[l]);
|
||||
links[l].addEventListener('click',function(ev) {
|
||||
openFlag(ev);
|
||||
|
||||
openFlag(ev,ev.dataset);
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user