FANDOM

My work

Authored
Co-authored
Contributed
Page src Primary techniques
SelectContent .js Simple jQuery usage
WdsTooltips .js Simple jQuery usage
SkinSwitch .js localStorage, API get request
MultipleFileDelete .js JS object, API post request, BannerNotification
AjaxDiff .js RegExp, CustomModal, API requests
WikiInfo .js JS Date, Ajax cross-domain request
ArchivePoll .js CustomModal, API post request
ProgressBar .css
AjaxEditSection .js API post request, BannerNotification
OnPageForms .js jQuery.load
ArticleRating .js JSON, API requests
FloatingToc .js jQuery UI, shortcut key config
MultiUpload .js Ajax multipart/form-data upload, special page creation, BannerNotification

Common coding practice

Common code snippets and practice I use frequently:

// Immediately Invoked Function Expression
(function() {
    // code
})();
 
// double-load protection
if(window.Module.Loaded) {
    return;
} window.Module.Loaded = true;
 
// i18n
var i18n = {};
importArticle({ type: 'script', article: 'u:dev:MediaWiki:I18n-js/code.js' });
mw.hook('dev.i18n').add(function(i18n) {
    i18n.loadMessages('Module').done(function(i18nLoaded) {
        i18n = i18nLoaded._messages.en;
        for(var i in i18n)
            i18n[i] = i18nLoaded.msg(i).escape();
   });
});
 
// Configurations
var config = $.extend({
    // default configs
}, UserConfig);

Global profile

Community Central

Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+