diff options
Diffstat (limited to 'resources/src/mediawiki.special/mediawiki.special.search.js')
-rw-r--r-- | resources/src/mediawiki.special/mediawiki.special.search.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/src/mediawiki.special/mediawiki.special.search.js b/resources/src/mediawiki.special/mediawiki.special.search.js index b27fe349..730119e8 100644 --- a/resources/src/mediawiki.special/mediawiki.special.search.js +++ b/resources/src/mediawiki.special/mediawiki.special.search.js @@ -39,12 +39,12 @@ var parts = $( this ).attr( 'href' ).split( 'search=' ), lastpart = '', prefix = 'search='; - if ( parts.length > 1 && parts[1].indexOf( '&' ) !== -1 ) { - lastpart = parts[1].slice( parts[1].indexOf( '&' ) ); + if ( parts.length > 1 && parts[ 1 ].indexOf( '&' ) !== -1 ) { + lastpart = parts[ 1 ].slice( parts[ 1 ].indexOf( '&' ) ); } else { prefix = '&search='; } - this.href = parts[0] + prefix + encodeURIComponent( searchterm ) + lastpart; + this.href = parts[ 0 ] + prefix + encodeURIComponent( searchterm ) + lastpart; } ); } ).trigger( 'change' ); |