diff options
Diffstat (limited to 'Echo/modules/logger/mw.echo.Logger.js')
-rw-r--r-- | Echo/modules/logger/mw.echo.Logger.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Echo/modules/logger/mw.echo.Logger.js b/Echo/modules/logger/mw.echo.Logger.js index cf380bbb..4c82926f 100644 --- a/Echo/modules/logger/mw.echo.Logger.js +++ b/Echo/modules/logger/mw.echo.Logger.js @@ -1,4 +1,5 @@ -( function ( $, mw ) { +( function () { + var configVars = require( './config.json' ); mw.echo = mw.echo || {}; /** @@ -28,7 +29,7 @@ * @static * @property {boolean} */ - mw.echo.Logger.static.clickThroughEnabled = !!mw.config.get( 'wgEchoInteractionLogging' ); + mw.echo.Logger.static.clickThroughEnabled = !!configVars.EchoInteractionLogging && !mw.user.isAnon(); /** * Context definitions. @@ -84,7 +85,7 @@ myEvt = { action: action, - version: mw.config.get( 'wgEchoEventLoggingVersion' ), + version: configVars.EchoEventLoggingVersion, userId: +mw.config.get( 'wgUserId' ), editCount: +mw.config.get( 'wgUserEditCount' ) }; @@ -103,7 +104,7 @@ myEvt.mobile = mobile || mw.config.get( 'skin' ) === 'minerva'; } - if ( notifWiki && notifWiki !== mw.config.get( 'wgDBname' ) && notifWiki !== 'local' ) { + if ( notifWiki && notifWiki !== mw.config.get( 'wgWikiID' ) && notifWiki !== 'local' ) { myEvt.notifWiki = notifWiki; } @@ -123,7 +124,7 @@ var i, len, key; for ( i = 0, len = notificationIds.length; i < len; i++ ) { - key = notifWiki && notifWiki !== mw.config.get( 'wgDBname' ) && notifWiki !== 'local' ? + key = notifWiki && notifWiki !== mw.config.get( 'wgWikiID' ) && notifWiki !== 'local' ? notificationIds[ i ] + '-' + notifWiki : notificationIds[ i ]; @@ -137,4 +138,4 @@ }; mw.echo.logger = new mw.echo.Logger(); -}( jQuery, mediaWiki ) ); +}() ); |