Index: trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js |
— | — | @@ -23,11 +23,17 @@ |
24 | 24 | if ( bucket ) { |
25 | 25 | // Transform the targets of section edit links to route through the click tracking API |
26 | 26 | $( 'span.editsection a' ).each( function() { |
| 27 | + var session = $.cookie( 'clicktracking-session' ); |
| 28 | + var editUrl = $( this ).attr( 'href' ); |
| 29 | + editUrl += ( editUrl.indexOf( '?' ) >= 0 ? '&' : '?' ) + $.param( { |
| 30 | + 'clicktrackingsession': session, |
| 31 | + 'clicktrackinginfo': 'ext.vector.sectionEditLinks-bucket' + bucket + '-save' |
| 32 | + } ); |
27 | 33 | $(this).attr( 'href', mediaWiki.config.get( 'wgScriptPath' ) + '/api.php?' + $.param( { |
28 | 34 | 'action': 'clicktracking', |
29 | 35 | 'eventid': 'ext.vector.sectionEditLinks-bucket' + bucket + '-click', |
30 | | - 'token': $.cookie( 'clicktracking-session' ), |
31 | | - 'redirectto': $( this ).attr( 'href' ) |
| 36 | + 'token': session, |
| 37 | + 'redirectto': editUrl |
32 | 38 | } ) ); |
33 | 39 | } ); |
34 | 40 | if ( bucket == 2 ) { |