MediaWiki:Common.js: Difference between revisions
Created page with "→Any JavaScript here will be loaded for all users on every page load.: $(function() { if ($('#custom-footer').length === 0) { $('body').append('<div id="custom-footer">Content is available under <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Creative Commons Attribution-ShareAlike</a>. Some of Wikitia\'s pages are sourced from Wikipedia.org\'s Mainspace and Draftspace. Wikitia is not affiliated with the Wikimedia Foundation, un..." |
No edit summary |
||
Line 2: | Line 2: | ||
$(function() { | $(function() { | ||
// Ensure the footer content is only added once | |||
if ($('#custom-footer').length === 0) { | if ($('#custom-footer').length === 0) { | ||
$(' | // Insert the custom footer content before the existing footer links | ||
$('#footer').prepend('<div id="custom-footer">Content is available under <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Creative Commons Attribution-ShareAlike</a>. Some of Wikitia\'s pages are sourced from Wikipedia.org\'s Mainspace and Draftspace. Wikitia is not affiliated with the Wikimedia Foundation, unless otherwise noted.</div>'); | |||
} | } | ||
}); | }); |
Revision as of 09:58, 11 August 2024
/* Any JavaScript here will be loaded for all users on every page load. */ $(function() { // Ensure the footer content is only added once if ($('#custom-footer').length === 0) { // Insert the custom footer content before the existing footer links $('#footer').prepend('<div id="custom-footer">Content is available under <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Creative Commons Attribution-ShareAlike</a>. Some of Wikitia\'s pages are sourced from Wikipedia.org\'s Mainspace and Draftspace. Wikitia is not affiliated with the Wikimedia Foundation, unless otherwise noted.</div>'); } });