MediaWiki:Common.js: Difference between revisions
From Screamer Wiki
imported>NodogonToontown No edit summary |
imported>NodogonToontown No edit summary |
||
Line 15: | Line 15: | ||
] | ] | ||
}); | }); | ||
<div class="youtubeplayer" data-id="{{{id}}}" data-width="{{{width|640}}}" data-height="{{{height|360}}}" data-autoplay="{{{autoplay|0}}}"></div> | |||
/* End of the {{USERNAME}} replacement */ | /* End of the {{USERNAME}} replacement */ |
Revision as of 09:44, 1 July 2016
/* Any JavaScript here will be loaded for all users on every page load. */
/* Replaces {{Username}} with the name of the user browsing the page.
Requires copying Template:Username. */
function UserNameReplace() {
if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return;
$("span.insertusername").html(wgUserName);
}
addOnloadHook(UserNameReplace);
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:YoutubePlayer/code.js'
]
});
<div class="youtubeplayer" data-id="{{{id}}}" data-width="{{{width|640}}}" data-height="{{{height|360}}}" data-autoplay="{{{autoplay|0}}}"></div>
/* End of the {{USERNAME}} replacement */