From 3b31350df68dc10fcd9c92423cca6cd934b700f0 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sat, 23 Oct 2010 14:53:06 +0000 Subject: [PATCH] Revert r73593, root cause has long been fixed --- skins/common/ajaxwatch.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/skins/common/ajaxwatch.js b/skins/common/ajaxwatch.js index 6406f0b501..9ee5c08209 100644 --- a/skins/common/ajaxwatch.js +++ b/skins/common/ajaxwatch.js @@ -28,7 +28,7 @@ wgAjaxWatch.setLinkText = function( $link, action ) { wgAjaxWatch.processResult = function( response ) { response = response.watch; - var $link = $j( this ); + var $link = $( this ); // To ensure we set the same status for all watch links with the // same target we trigger a custom event on *all* watch links. if( response.watched !== undefined ) { @@ -46,23 +46,23 @@ wgAjaxWatch.processResult = function( response ) { // Bug 12395 - update the watch checkbox on edit pages when the // page is watched or unwatched via the tab. if( response.watched !== undefined ) { - $j( '#wpWatchthis' ).attr( 'checked', '1' ); + $( '#wpWatchthis' ).attr( 'checked', '1' ); } else { - $j( '#wpWatchthis' ).removeAttr( 'checked' ); + $( '#wpWatchthis' ).removeAttr( 'checked' ); } }; -$j( document ).ready( function() { - var $links = $j( '.mw-watchlink a, a.mw-watchlink' ); +$( document ).ready( function() { + var $links = $( '.mw-watchlink a, a.mw-watchlink' ); // BC with older skins $links = $links - .add( $j( '#ca-watch a, #ca-unwatch a, a#mw-unwatch-link1' ) ) - .add( $j( 'a#mw-unwatch-link2, a#mw-watch-link2, a#mw-watch-link1' ) ); + .add( $( '#ca-watch a, #ca-unwatch a, a#mw-unwatch-link1' ) ) + .add( $( 'a#mw-unwatch-link2, a#mw-watch-link2, a#mw-watch-link1' ) ); // allowing people to add inline animated links is a little scary $links = $links.filter( ':not( #bodyContent *, #content * )' ); $links.each( function() { - var $link = $j( this ); + var $link = $( this ); $link .data( 'icon', $link.parents( 'li' ).hasClass( 'icon' ) ) .data( 'action', $link.attr( 'href' ).match( /[\?\&]action=unwatch/i ) ? 'unwatch' : 'watch' ); @@ -71,7 +71,7 @@ $j( document ).ready( function() { }); $links.click( function( event ) { - var $link = $j( this ); + var $link = $( this ); if( wgAjaxWatch.supported === false || !wgEnableWriteAPI || !wfSupportsAjax() ) { // Lazy initialization so we don't toss up @@ -82,7 +82,7 @@ $j( document ).ready( function() { } wgAjaxWatch.setLinkText( $link, $link.data( 'action' ) + 'ing' ); - $j.get( wgScriptPath + $.get( wgScriptPath + '/api' + wgScriptExtension + '?action=watch&format=json&title=' + encodeURIComponent( $link.data( 'target' ) ) + ( $link.data( 'action' ) == 'unwatch' ? '&unwatch' : '' ), @@ -97,7 +97,7 @@ $j( document ).ready( function() { // When a request returns, a custom event 'mw-ajaxwatch' is triggered // on *all* watch links, so they can be updated if necessary $links.bind( 'mw-ajaxwatch', function( event, target, action ) { - var $link = $j( this ); + var $link = $( this ); var foo = $link.data( 'target' ); if( $link.data( 'target' ) == target ) { var otheraction = action == 'watch' -- 2.20.1