Christianpedia

MediaWiki: Common.js

(Add)
 
No edit summary
 
Line 14: Line 14:


setInterval(changeBackground, 4000); // Change image every 4 seconds (4000 milliseconds)
setInterval(changeBackground, 4000); // Change image every 4 seconds (4000 milliseconds)
/**
* ProveIt is a reference manager for Wikipedia and any other MediaWiki wiki
* Documentation: https://www.mediawiki.org/wiki/ProveIt
* Source code: https://www.mediawiki.org/wiki/MediaWiki:Gadget-ProveIt.js
*/
function loadProveIt() {
mw.config.set( {
'proveit-tag': 'proveit', // Revision tag defined at Special:Tags (optional)
'proveit-summary': 'Reference edited with [[mw:ProveIt|ProveIt]]', // Automatic edit summary (optional)
'proveit-templates': [ // Local citation templates (without namespace)
'Citation',
'Cite arXiv',
'Cite AV media',
'Cite book',
'Cite bioRxiv',
'Cite comic',
'Cite encyclopedia',
'Cite episode',
'Cite interview',
'Cite journal',
'Cite magazine',
'Cite news',
'Cite paper',
'Cite press release',
'Cite report',
'Cite sign',
'Cite speech',
'Cite thesis',
'Cite tweet',
'Cite video',
'Cite video game',
'Cite web',
],
'proveit-namespaces': [ // Supported namespaces, see https://www.mediawiki.org/wiki/Manual:Namespace_constants
0, // Main namespace
2, // User namespace
]
} );
mw.loader.load( '//www.mediawiki.org/w/load.php?modules=ext.gadget.Global-ProveIt' );
}
// Only load when editing
mw.hook( 'wikipage.editform' ).add( loadProveIt );
mw.hook( 've.activationComplete' ).add( loadProveIt );

Latest revision as of 14:06, 18 May 2024

/* Any JavaScript here will be loaded for all users on every page load. */
const backgrounds = [
    'url(https://christianpedia.site/images/3/37/Main_page_background.jpg)',
    'url(https://wallpapercave.com/wp/wp9066757.jpg)',
    'url(https://getwallpapers.com/wallpaper/full/f/7/2/1001822-church-wallpaper-1920x1080-laptop.jpg)'
];

let currentIndex = 0;

function changeBackground() {
    document.body.style.backgroundImage = backgrounds[currentIndex];
    currentIndex = (currentIndex + 1) % backgrounds.length;
}

setInterval(changeBackground, 4000); // Change image every 4 seconds (4000 milliseconds)


/**
 * ProveIt is a reference manager for Wikipedia and any other MediaWiki wiki
 * Documentation: https://www.mediawiki.org/wiki/ProveIt
 * Source code: https://www.mediawiki.org/wiki/MediaWiki:Gadget-ProveIt.js
 */
function loadProveIt() {
	mw.config.set( {
		'proveit-tag': 'proveit', // Revision tag defined at Special:Tags (optional)
		'proveit-summary': 'Reference edited with [[mw:ProveIt|ProveIt]]', // Automatic edit summary (optional)
		'proveit-templates': [ // Local citation templates (without namespace)
			'Citation',
			'Cite arXiv',
			'Cite AV media',
			'Cite book',
			'Cite bioRxiv',
			'Cite comic',
			'Cite encyclopedia',
			'Cite episode',
			'Cite interview',
			'Cite journal',
			'Cite magazine',
			'Cite news',
			'Cite paper',
			'Cite press release',
			'Cite report',
			'Cite sign',
			'Cite speech',
			'Cite thesis',
			'Cite tweet',
			'Cite video',
			'Cite video game',
			'Cite web',
		],
		'proveit-namespaces': [ // Supported namespaces, see https://www.mediawiki.org/wiki/Manual:Namespace_constants
			0, // Main namespace
			2, // User namespace
		]
	} );
	mw.loader.load( '//www.mediawiki.org/w/load.php?modules=ext.gadget.Global-ProveIt' );
}

// Only load when editing
mw.hook( 'wikipage.editform' ).add( loadProveIt );
mw.hook( 've.activationComplete' ).add( loadProveIt );
Discuss this page