jenkins-bot has submitted this change and it was merged.
Change subject: New hooks for external integration to notification
intiialization
......................................................................
New hooks for external integration to notification intiialization
Adds two new hooks to allow extensions to tie into the notification
loading process. Between these two hooks and the new isInitialized()
method any extension can run code whenever a notification is displayed.
Change-Id: If351835be5f65ca098e2d235ea8c8e4dc40ae2b4
---
M modules/special/ext.echo.special.js
1 file changed, 10 insertions(+), 0 deletions(-)
Approvals:
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/special/ext.echo.special.js
b/modules/special/ext.echo.special.js
index eb92347..36ccf0d 100644
--- a/modules/special/ext.echo.special.js
+++ b/modules/special/ext.echo.special.js
@@ -1,17 +1,25 @@
( function ( $, mw ) {
'use strict';
+ var isInitialized = false;
+
mw.echo.special = {
notcontinue: null,
header: '',
processing: false,
+ isInitialized: function() {
+ return isInitialized;
+ },
+
/**
* Initialize the property in special notification page.
*/
initialize: function () {
var skin = mw.config.get('skin');
+
+ isInitialized = true;
// Convert more link into a button
$( '#mw-echo-more' )
@@ -52,6 +60,7 @@
$( '#contentSub' ).empty();
}
+ mw.hook( 'ext.echo.special.onInitialize' ).fire( this );
},
/**
@@ -100,6 +109,7 @@
unread.push( id );
}
+ mw.hook( 'ext.echo.special.onLoadMore'
).fire( $li, data );
mw.echo.setupNotificationLogging( $li,
'archive' );
if ( $li.find( '.mw-echo-dismiss'
).length ) {
--
To view, visit https://gerrit.wikimedia.org/r/148265
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If351835be5f65ca098e2d235ea8c8e4dc40ae2b4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits