MediaWiki:EmailObfuscate.js: Unterschied zwischen den Versionen

Aus Freifunk MWU Wiki
Zur Navigation springen Zur Suche springen
K
K (Nanu?)
Zeile 7: Zeile 7:
 
var email = document.getElementById('emailobfuscated');
 
var email = document.getElementById('emailobfuscated');
  
email.innerHTML = '<a href="mailto:' + user + '@' + host + '.' + suffix + '">' + user + '@' + host + '.' + suffix + '</a>';
+
email.innerHTML = '<a href="mailto:' + user.innerHTML + '@' + host.innerHTML + '.' + suffix.innerHTML + '">' + user.innerHTML + '@' + host.innerHTML + '.' + suffix.innerHTML + '</a>';

Version vom 27. Mai 2014, 23:46 Uhr

/* Ich verschleiere Email-Adressen zum Spamschutz */

var user = document.getElementById('emailuser');
var host = document.getElementById('emailhost');
var suffix = document.getElementById('emailsuffix'); 

var email = document.getElementById('emailobfuscated');

email.innerHTML = '<a href="mailto:' + user.innerHTML + '@' + host.innerHTML + '.' + suffix.innerHTML + '">' + user.innerHTML + '@' + host.innerHTML + '.' + suffix.innerHTML + '</a>';