Refactored info page assets.

This commit is contained in:
Lars Jung 2012-03-25 00:45:32 +01:00
parent 764bc0034c
commit 908848bfc7
8 changed files with 184 additions and 174 deletions

View file

@ -48,6 +48,10 @@
h5ai.isJs = $html.hasClass('h5ai-js');
h5ai.isPhp = $html.hasClass('h5ai-php');
if (!h5ai.isJs && !h5ai.isPhp) {
return;
}
if (h5ai.isJs) {
h5ai.extended.init();
}

View file

@ -0,0 +1,25 @@
(function (window, $) {
'use strict';
/*jslint browser: true, confusion: true, white: true */
/*global jQuery */
var deobfuscate = function () {
$('.obfusma').each(function () {
var $this = $(this),
add = $this.text().replace(/\s*/g, '').replace(/\[at\]/gi, '@').replace(/\[dot\]/gi, '.'),
$a = $('<a/>').attr('href', 'mailto:' + add).text(add).addClass('deobfusma');
$this.replaceWith($a);
});
},
init = function () {
deobfuscate();
};
$(init);
}(window, jQuery));

View file

@ -17,3 +17,7 @@
// h5ai
// ----
// @include "inc/H5ai.js"
// info
// ----
// @include "inc/splash.js"

View file

@ -1,27 +0,0 @@
// @include "inc/lib/jquery-1.7.1.min.js"
(function (window, $) {
'use strict';
/*jslint browser: true, confusion: true, white: true */
/*global jQuery */
var deobfuscate = function () {
$(".obfusma").each(function () {
var $this = $(this),
add = $this.text().replace(/\s*/g, "").replace(/\[at\]/gi, "@").replace(/\[dot\]/gi, "."),
$a = $("<a/>").attr("href", "mailto:" + add).text(add).addClass("deobfusma");
$this.replaceWith($a);
});
},
init = function () {
deobfuscate();
};
$(init);
}(window, jQuery));