In search queries, replace underscores with spaces

Spaces perform better with the default search engines in both MediaWiki and Doku
pull/400/head
Kevin Payravi 2023-12-20 02:58:54 -05:00
parent d3d8d7e34f
commit b4e17af2a7
3 changed files with 9 additions and 0 deletions

View File

@ -356,6 +356,9 @@ async function main(url, tabId) {
article = site['destination_main_page'];
}
// Replace underscores with spaces as that performs better in search
article = article.replaceAll('_', ' ');
let searchParams = '';
switch (site['destination_platform']) {
case 'mediawiki':

View File

@ -294,6 +294,9 @@ function main() {
article = site['destination_main_page'];
}
// Replace underscores with spaces as that performs better in search
article = article.replaceAll('_', ' ');
let searchParams = '';
switch (site['destination_platform']) {
case 'mediawiki':

View File

@ -203,6 +203,9 @@ function replaceSearchResults(searchResultContainer, site, link) {
article = site['destination_main_page'];
}
// Replace underscores with spaces as that performs better in search
article = article.replaceAll('_', ' ');
let searchParams = '';
switch (site['destination_platform']) {
case 'mediawiki':