@@ -154,7 +154,7 @@ function fetchAndUpdateKnownHostList() {
154154 }
155155
156156 // Redirect engine list UI updates
157- if ( knownHosts . indexOf ( "*://*/*" ) > - 1 ) {
157+ if ( knownHosts . indexOf ( "*://*/*" ) > - 1 || knownHosts . indexOf ( "<all_urls>" ) > - 1 ) {
158158 // TODO: Do we need custom logic for the "All websites allowed" permission?
159159 } else {
160160 if ( enginesToDisplayInRedirectList . length > 0 ) {
@@ -190,7 +190,7 @@ function updateKnownHostList(knownHosts) {
190190 var hostsHtml = "" ;
191191
192192 // Check if permissions have been granted for all urls instead of specific ones
193- let hasAllUrlsPermissions = ( knownHosts . indexOf ( "*://*/*" ) > - 1 )
193+ let hasAllUrlsPermissions = ( knownHosts . indexOf ( "*://*/*" ) > - 1 || knownHosts . indexOf ( "<all_urls>" ) > - 1 )
194194
195195 if ( hasAllUrlsPermissions ) {
196196 hostsHtml += `<details class="allUrls"><summary>All Search Engines <a href="#" class="revokePermissions" data-engine="All">${ symbolTrashBase64ImgTag } <span class="confirmationText"> (tap again to remove permissions)</span></a></summary><ul class="noListStyle"><li>` ;
@@ -319,12 +319,7 @@ document.addEventListener("DOMContentLoaded", (event) => {
319319// -----------------------
320320document . getElementById ( "setup-permissions-button" ) . onclick = async function ( evt ) {
321321 console . log ( "Checking kagi.com permissions" ) ;
322- checkSetupPermissions ( )
323- . then ( ( alreadyGranted ) => {
324- if ( ! alreadyGranted ) {
325- return browser . permissions . request ( setupPermissions ) ;
326- }
327- } )
322+ browser . permissions . request ( setupPermissions )
328323 . then ( ( granted ) => {
329324 updateSetupPermissionsUI ( granted ) ;
330325 if ( ! granted ) {
0 commit comments