Jump to content

User:Tom29739/archiver.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
userIsInGroup = function ( group ) {
	return $.inArray(group, mw.config.get( 'wgUserGroups' )) !== -1;
};
if (userIsInGroup( "autoconfirmed" ) || stuff.userIsInGroup( "confirmed" )) {
var pagename = mw.config.get("wgPageName");
var url = "//tools.wmflabs.org/hall-of-fame/api.php?pageURL=" + pagename;
// Create portlet link
var archive = mw.util.addPortletLink( 'p-cactions', url,
	'Archive', 'ca-archive-stuff',	'Click here to archive this page'
);
var testurl = "//tools.wmflabs.org/hall-of-fame/apitest.php?pageURL=" + pagename;
// Create portlet link
var archive = mw.util.addPortletLink( 'p-cactions', testurl,
	'Test archive', 'ca-archive-stuff',	'Click here to test archive this page'
);
}