PageSourceSearch

https://gamifactory.eu/js/email-obfuscation.js?v=1777902615

js gamifactory.eu collected 2026-10-01 14:17:57 UTC 1,012 bytes, 27 lines download raw bytes

1// Email obfuscation (#252) — rebuild mailto: from data-mail-u + data-mail-d.
2// Raw HTML rendered by `obfuscatedMail` Latte filter has href="#" and no plain
3// "user@domain" string, so naive scrapers (curl + regex on view-source) see
4// nothing useful. After DOM ready, JS rewrites href="#" to mailto:user@domain
5// in the live DOM — restores native UX (status bar, right-click "copy link",
6// middle-click open) without exposing the email in the static HTML payload.
7// Idempotent via data-obf-init flag (survives Naja AJAX snippet replace).
8(function () {
9	'use strict';
10
11	function init() {
12		var links = document.querySelectorAll('a.js-obf-mail:not([data-obf-init])');
13		Array.prototype.forEach.call(links, function (a) {
14			a.dataset.obfInit = '1';
15			var u = a.dataset.mailU;
16			var d = a.dataset.mailD;
17			if (!u || !d) return;
18			a.href = 'mailto:' + u + '@' + d;
19		});
20	}
21
22	if (document.readyState === 'loading') {
23		document.addEventListener('DOMContentLoaded', init);
24	} else {
25		init();
26	}
27})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.