Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/*
* Adds a button next to the regular edit button which acts as a "section edit" button for the intro
* Written by Grunny (https://www.wikia.com/wiki/User:Grunny)
*
*/
(function() {
if (
mw.config.get('wgNamespaceNumber') === -1 ||
window.EditIntroButtonLoaded
) {
return;
}
window.EditIntroButtonLoaded = true;
importArticle({
type: 'script',
article: 'u:dev:MediaWiki:I18n-js/code.js'
});
mw.hook('dev.i18n').add(function(i18no) {
i18no.loadMessages('EditIntroButton').then(function(i18n) {
var text = window.EditIntroButtonText ||
i18n.msg('text').plain();
$(
'.UserProfileActionButton > .wikia-menu-button > ul,' +
'.page-header__contribution-buttons .wds-list,' +
'.page-header__actions .wds-list'
).first().append(
$('<li>', {
id: 'ca-intro'
}).append(
$('<a>', {
href: '?action=edit§ion=0',
title: text,
text: text
})
)
);
});
});
})();