User:Theopolisme/Scripts/ajaxWatchlist.js: Difference between revisions

Content deleted Content added
Created page with '/** * ajaxWatchlist.js * * A watchlist that automatically updates, so you can * spend less time refreshing and more time... er, * doing whatever you do. *...'
 
no longer used
Line 49:
// to display the new contents.
var $newContent = $( data ).find( '#mw-content-text #mw-watchlist-form' ).nextAll().addBack(); // Same selector as $ajaxWatchlist
if ( $ajaxWatchlist.text() !== $newContent.text() ) { // .slice(1) is so we don't show alerts for a change solely in the time
$ajaxWatchlist.empty().append( $newContent );
mw.hook( 'wikipage.content' ).fire( $ajaxWatchlist ); // So scripts will run on the updated content