mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AJAXPoll
synced 2024-11-15 03:04:14 +00:00
Only load "ext.ajaxpoll" on pages that need it
Change-Id: I0e989b3c059b7aaf049476c8bb847bebf9ef4089
This commit is contained in:
parent
7e65ec1e61
commit
b7ab4f23f4
|
@ -22,9 +22,7 @@ class AJAXPoll {
|
|||
* @return Boolean: true
|
||||
*/
|
||||
static function onParserInit( $parser ) {
|
||||
global $wgOut;
|
||||
$parser->setHook( 'poll', array( __CLASS__, 'AJAXPollRender' ) );
|
||||
$wgOut->addModules( 'ext.ajaxpoll' );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -34,6 +32,7 @@ class AJAXPoll {
|
|||
|
||||
$parser->disableCache();
|
||||
$parser->addTrackingCategory( 'ajaxpoll-tracking-category' );
|
||||
$parser->getOutput()->addModules( 'ext.ajaxpoll' );
|
||||
|
||||
if ( $wgUser->getName() == '' ) {
|
||||
$userName = $wgRequest->getIP();
|
||||
|
|
Loading…
Reference in a new issue