Add AFCH.log as a wrapper for mw.log
This commit is contained in:
parent
ec66d1619e
commit
3d49e292d9
@ -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
|
||||
|
@ -4,6 +4,7 @@
|
||||
var $afchReviewPanel,
|
||||
thePage,
|
||||
theSubmission;
|
||||
AFCH.log( 'submissions.js executing...' );
|
||||
|
||||
/**
|
||||
* Represents an AfC submission and its status. Call submission.parse() to
|
||||
|
Loading…
x
Reference in New Issue
Block a user