Add AFCH.log as a wrapper for mw.log

This commit is contained in:
theopolisme 2014-02-15 00:39:49 -06:00
parent ec66d1619e
commit 3d49e292d9
2 changed files with 13 additions and 1 deletions

View File

@ -1,7 +1,17 @@
//<nowiki>
// Script should be located at [[MediaWiki:Gadget-afchelper.js/core.js]]
( function ( AFCH, $, mw ) {
AFCH = $.extend( AFCH, {
$.extend( AFCH, {
/**
* Log a string to the console
* @param {string} text
*/
log: function ( text ) {
if ( AFCH.consts.beta ) {
mw.log( 'AFCH: ' + text );
}
},
/**
* Prepares the AFCH gadget by setting constants and checking environment
@ -30,6 +40,7 @@
load: function ( type ) {
// Run setup function
AFCH.beforeLoad();
AFCH.log( 'loading ' + type );
if ( AFCH.consts.beta ) {
// Load css

View File

@ -4,6 +4,7 @@
var $afchReviewPanel,
thePage,
theSubmission;
AFCH.log( 'submissions.js executing...' );
/**
* Represents an AfC submission and its status. Call submission.parse() to