Index: trunk/phase3/skins/common/ajaxwatch.js |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | $links.click( function(event){ |
85 | 85 | var $link = $j(this); |
86 | 86 | |
87 | | - if( wgAjaxWatch.supported === false || !wfSupportsAjax() ) { |
| 87 | + if( wgAjaxWatch.supported === false || !wgEnableWriteAPI || !wfSupportsAjax() ) { |
88 | 88 | // Lazy initialization so we don't toss up |
89 | 89 | // ActiveX warnings on initial page load |
90 | 90 | // for IE 6 users with security settings. |
— | — | @@ -93,8 +93,8 @@ |
94 | 94 | |
95 | 95 | wgAjaxWatch.setLinkText( $link, $link.data('action')+'ing' ); |
96 | 96 | $j.get( wgScriptPath |
97 | | - + '/api.php?action=watch&format=json&title=' |
98 | | - + $link.data('target') |
| 97 | + + '/api' + wgScriptExtension + '?action=watch&format=json&title=' |
| 98 | + + encodeURIComponent( $link.data('target') ) |
99 | 99 | + ( $link.data('action')=='unwatch' ? '&unwatch' : '' ), |
100 | 100 | {}, |
101 | 101 | wgAjaxWatch.processResult, |