Jump to content

User:DannyS712 test/remind bot.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by DannyS712 test (talk | contribs) at 04:13, 31 January 2019 (start basic). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
RemindBot_config = {
	name: "[[User:DannyS712/Remind Bot.js|Remind Bot]]",
	version: 1.0,
	debug: true
};

var user = "";

mw.loader.using( 'mediawiki.util', function () {
    importScript('User:DannyS712 test/get JSON.js');
    importScript('User:DannyS712 test/set JSON.js');
    $(document).ready( function () { 
        var link = mw.util.addPortletLink( 'p-cactions', null, 'Remind BOT', 'ca-BOT-reminder', 'Check reminders'); 
        $( link ).click( function ( event ) {
            event.preventDefault();
            check_reminders();
        } );
    } );
} );
function add_reminder(){
	var arr_JSONed = get_JSON( 'User:DannyS712 test/reminders.json' );
	if (RemindBOT_config.debug) console.log( arr_JSONed );
}