mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-28 00:01:05 +00:00
fix: fix rich search suggestion link (#272)
* bug: Fix search result links * fix: fix search suggestion article path duplication Co-authored-by: Hannes <hannes@octofox.de>
This commit is contained in:
parent
6e4f1223ed
commit
340fd78bcb
|
@ -87,7 +87,6 @@ window.WMTypeAhead = function ( appendTo, searchInput ) {
|
|||
appendEl = document.getElementById( appendTo ),
|
||||
searchEl = document.getElementById( searchInput ),
|
||||
server = mw.config.get( 'wgServer' ),
|
||||
articleurl = server + mw.config.get( 'wgArticlePath' ).replace( '$1', '' ),
|
||||
searchurl = server + mw.config.get( 'wgScriptPath' ) + '/index.php?title=Special%3ASearch&search=',
|
||||
thumbnailSize = Math.round( getDevicePixelRatio() * 80 ),
|
||||
descriptionSource = mw.config.get( 'wgCitizenSearchDescriptionSource' ),
|
||||
|
@ -430,7 +429,7 @@ window.WMTypeAhead = function ( appendTo, searchInput ) {
|
|||
suggestionLink = mw.html.element( 'a', {
|
||||
class: 'suggestion-link',
|
||||
id: suggestionLinkID,
|
||||
href: articleurl + encodeURIComponent( page.title.replace( / /gi, '_' ) )
|
||||
href: server + (new mw.Title( page.title, page.ns ?? 0 ).getUrl()),
|
||||
}, new mw.html.Raw( suggestionThumbnail + suggestionText ) );
|
||||
|
||||
string += suggestionLink;
|
||||
|
|
Loading…
Reference in a new issue