Open main menu
Home
Random
Log in
Settings
About ICANNWiki
Disclaimers
ICANNWiki
Search
Changes
← Older edit
Newer edit →
MediaWiki:Common.js
(view source)
Revision as of 07:27, 28 August 2024
752 bytes added
,
2 months ago
no edit summary
Line 1:
Line 1:
−
$
(document).
ready
(function() {
+
(
function() {
−
console.log("
jQuery is loaded
"
);
+
// Check if jQuery is loaded
−
$('body').append(`
+
if (typeof jQuery == 'undefined') {
−
<div class="flowing-numbers">
+
// If not, dynamically load jQuery
−
<span>001101010</span>
+
var script = document.createElement('script');
−
<span>110100110</span>
+
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js';
−
<span>011010101</span>
+
script.type = 'text/javascript';
−
<span>101001101</span>
+
document
.getElementsByTagName('head'
)
[0]
.
appendChild
(
script);
−
<span>010110110</span>
+
−
</div>
+
// Wait for jQuery to load before executing the rest of the code
−
`);
+
script.onload =
function() {
−
});
+
runCustomScript();
+
};
+
} else {
+
//
jQuery is
already
loaded
, run the custom script immediately
+
runCustomScript(
);
+
}
+
+
function runCustomScript() {
+
$(document).ready(function() {
+
$('body').append(`
+
<div class="flowing-numbers">
+
<span>001101010</span>
+
<span>110100110</span>
+
<span>011010101</span>
+
<span>101001101</span>
+
<span>010110110</span>
+
</div>
+
`);
+
});
+
}
+
})(
);
jQuery.getScript('//cmp.osano.com/Azyw1RRk4ZCOx2wli/04c9aa84-7b4a-45a8-bb7e-3b3767dd3378/osano.js');
jQuery.getScript('//cmp.osano.com/Azyw1RRk4ZCOx2wli/04c9aa84-7b4a-45a8-bb7e-3b3767dd3378/osano.js');
('#free_text').wikiEditor;
('#free_text').wikiEditor;
MarkWD
Bureaucrats
,
Check users
,
Interface administrators
, steward,
Suppressors
,
Administrators
, translator
1,947
edits