mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-27 13:34:30 -04:00
Refactored info page assets.
This commit is contained in:
parent
764bc0034c
commit
908848bfc7
8 changed files with 184 additions and 174 deletions
|
@ -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();
|
||||
}
|
||||
|
|
25
src/_h5ai/js/inc/splash.js
Normal file
25
src/_h5ai/js/inc/splash.js
Normal 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));
|
|
@ -17,3 +17,7 @@
|
|||
// h5ai
|
||||
// ----
|
||||
// @include "inc/H5ai.js"
|
||||
|
||||
// info
|
||||
// ----
|
||||
// @include "inc/splash.js"
|
||||
|
|
|
@ -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));
|
Loading…
Add table
Add a link
Reference in a new issue