Difference between revisions of "MediaWiki:Common.js"
From JFA Wiki
Greg.Fuller (talk | contribs) (Replaced content with "→Any JavaScript here will be loaded for all users on every page load.: //Insert 'Justice for Animals .org' in the DOM, for the header jQuery(document).ready(function...") (Tag: Replaced) |
Greg.Fuller (talk | contribs) |
||
Line 4: | Line 4: | ||
jQuery(document).ready(function () { | jQuery(document).ready(function () { | ||
document.body.insertAdjacentHTML( 'afterbegin', '<div id="jfatitle"><a href="/Main_Page">Justice for Animals .org</a></div>'); | document.body.insertAdjacentHTML( 'afterbegin', '<div id="jfatitle"><a href="/Main_Page">Justice for Animals .org</a></div>'); | ||
+ | }) | ||
− | + | jQuery(document).ready(function () { | |
+ | var jfa_short_url = jQuery("span.jfa-page-shorturl").html(); | ||
+ | console.log(jfa-short-url); | ||
+ | jQuery(".jfa-share-option-url a").attr("href",jfa-short-url); | ||
}) | }) |
Revision as of 10:16, 9 February 2019
/* Any JavaScript here will be loaded for all users on every page load. */
//Insert 'Justice for Animals .org' in the DOM, for the header jQuery(document).ready(function () {
document.body.insertAdjacentHTML( 'afterbegin', '
<a href="/Main_Page">Justice for Animals .org</a>
');
})
jQuery(document).ready(function () { var jfa_short_url = jQuery("span.jfa-page-shorturl").html(); console.log(jfa-short-url); jQuery(".jfa-share-option-url a").attr("href",jfa-short-url); })