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.
/**
* WebArchive
* @author Rail01
*/
(function() {
var config = mw.config.get([
'wgArticleId',
'wgUserGroups'
]);
if (
config.wgArticleId === 0 ||
config.wgUserGroups.indexOf( 'autoconfirmed' ) === -1 ||
window.WebArchiveLoaded
) return;
window.WebArchiveLoaded = true;
function init(i18n) {
$('<a>', {
class: 'wds-button wds-is-secondary',
id: 'WebArchiveLink',
href: 'https://web.archive.org/save/' + window.location.href,
target: ( !window.WebArchiveNewTab ? '_blank' : null ),
text: i18n.msg( 'archive-text' ).plain(),
title: i18n.msg( 'archive-title' ).plain()
}).appendTo( '.page-header__contribution-buttons, .page-header__actions' );
}
mw.hook( 'dev.i18n' ).add(function(i18n) {
i18n.loadMessages( 'WebArchive' ).then(init);
});
importArticle({
type: 'script',
article: 'u:dev:MediaWiki:I18n-js/code.js'
});
})();