MediaWiki:Gadget-code-snippets.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with "→‎*<nowiki> * Gadget that loads a couple of snippets for easier access to commonly copy/pasted templates and sections * Authors: ** Joeytje50: $(function() { var today = new Date().toLocaleString('en-GB', {day: 'numeric', month: 'long', year: 'numeric', timeZone: 'UTC'}); var pagename = mw.config.get('wgTitle'); var preloadMsgs = [ 'NPC', 'equipment', 'item', 'location', 'monster', 'scenery', 'shop', //'navbox', //'navbox-oneline', //'navbox...")
 
No edit summary
Line 339:
{
text: { html:
'You can <a href="https://oldschool.runescape.wiki/w/RuneScape:Administrator_requestsUser_help?action=edit&section=new&preloadtitle=Requesting%20new%20code%20snippet%20in%20editor" target="_blank">'+
'request a snippet</a> to be added.'+
(mw.config.get('wgUserGroups').includes('sysop') ? '<br/>Admins may edit the <a href="/w/MediaWiki:Gadget-code-snippets.js" title="MediaWiki:Gadget-code-snippets.js">code snippets script</a>.' : ''),
Line 360:
 
// Show additional snippets, except for MediaWiki:, Module:, Exchange:, talk mw.pages.
// Other namespaces might not necessarily need very many of these snippets, but there might be snippets for those in the future.
if (!$('body').is('.ns-8, .ns-114, .ns-828, .ns-talk')) {
Line 368:
'type': 'booklet',
'label': 'Presets/snippets',
'mw.pages': groups,
}
}

Navigation menu