User:Stargaze Sprinkles/global.js

window.ajaxIndicator = 'https://images.wikia.nocookie.net/software/images/a/a9/Indicator.gif'; window.ajaxRefresh = 30000; window.ajaxSpecialPages = [ "Recentchanges", "WikiActivity", "Watchlist", "Log", "Contributions" ];

$.extend(true, window, {   dev: {        i18n: {            overrides: {                AjaxRC: {                    'ajaxrc-refresh-text': 'AJAX',                    'ajaxrc-refresh-hover': 'Enable page auto-refresh',                }            }        }    } });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:AjaxRC.js',    ] });

var MiniTemplate = function (template, data) { Object.keys(data).forEach(function (key) {       template = template.replace( new RegExp('\\$' + key, 'g'), data[key] )   })    return template; }

var GenerateAdoptionForm = function (wikiURL, wikiName, adoptUser, currAdmin, editsMade) { var data = { wiki: wikiURL, name: wikiName, user: adoptUser, admin: currAdmin, edits: editsMade }   var template = [ "Adoption requests → ", "",       "What is your username? User:$user", "Please link to the wiki here: $name Wiki", "How many edits have you made on that wiki? $edits", "How many days/months have you been editing there? ", "On the Special Pages → Special:ListAdmins when was the last time an admin edited, and who was it? $admin (contributions)", "Any other information: " ].join('\n\n')

console.log(MiniTemplate(template, data)) }