Skip to content

Commit

Permalink
Fix search
Browse files Browse the repository at this point in the history
  • Loading branch information
fawazahmed0 authored Nov 21, 2023
1 parent f3f7986 commit 2c60803
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions template/commoncode.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,13 @@ window.getQuranCardElem = function (quran, editionName, dirval, lang, authorName
}

window.beginSearch = function () {
let newparams = new window.URLSearchParams();
let searchquery = document.getElementById('searchquery').value
newparams.set('q', `${searchquery}`)
window.open(`https://github.com/fawazahmed0/quran-hadith-search/search?${newparams.toString()}`, '_blank');
window.open(`https://github.com/fawazahmed0/quran-hadith-search/search?${newparams.toString()}&type=wikis`, '_blank');
let newparams = new window.URLSearchParams();
let searchquery = document.getElementById('searchquery').value
newparams.set('q', `repo:fawazahmed0/quran-hadith-search ${searchquery.trim()}`)
let link2 = `https://github.com/search?${newparams.toString()}&type=wikis`
newparams.set('q', `repo:fawazahmed0/quran-hadith-search path:/^Quran\\// ${searchquery.trim()}`)
window.open(`https://github.com/search?${newparams.toString()}&type=code`)
window.open(link2)
}


Expand Down

0 comments on commit 2c60803

Please sign in to comment.