File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed
Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -415,11 +415,8 @@ class FastToolsNewTab {
415415 } else if ( tool . slug === 'local://notes' ) {
416416 this . createNewNote ( ) ;
417417 } else {
418- // Open all tools in web version (fasttools.ai)
419- const toolSlug = tool . slug . replace ( / ^ l o c a l : \/ \/ / , '' ) . replace ( / ^ t o o l s \/ / , '' ) ;
420- const langPrefix = this . lang === 'en' ? '' : `${ this . lang } /` ;
421- const webUrl = `https://fasttools.ai/${ langPrefix } ${ toolSlug } ` ;
422- chrome . tabs . create ( { url : webUrl , active : true } ) ;
418+ // Use tool.url from tools-loader (local or web)
419+ chrome . tabs . create ( { url : tool . url , active : true } ) ;
423420 }
424421 }
425422
Original file line number Diff line number Diff line change @@ -131,11 +131,8 @@ class FastToolsPopup {
131131 showModal ( 'notes-modal' ) ;
132132 this . loadNotes ( ) ;
133133 } else {
134- // Open all tools in web version (fasttools.ai)
135- const toolSlug = tool . slug . replace ( / ^ l o c a l : \/ \/ / , '' ) . replace ( / ^ t o o l s \/ / , '' ) ;
136- const langPrefix = this . lang === 'en' ? '' : `${ this . lang } /` ;
137- const webUrl = `https://fasttools.ai/${ langPrefix } ${ toolSlug } ` ;
138- chrome . tabs . create ( { url : webUrl , active : true } ) ;
134+ // Use tool.url from tools-loader (local or web)
135+ chrome . tabs . create ( { url : tool . url , active : true } ) ;
139136 window . close ( ) ;
140137 }
141138 }
Original file line number Diff line number Diff line change @@ -48,15 +48,21 @@ export async function loadTools(lang = 'es') {
4848
4949 // Determine URL based on availability
5050 let url ;
51+ let isLocal = false ;
52+
5153 if ( hasExtension && tool . extensionSlug ) {
5254 // Local implementation in extension
5355 url = chrome . runtime . getURL ( tool . extensionSlug ) ;
56+ isLocal = true ;
57+ console . log ( `🔧 ${ tool . id } : Local URL = ${ url } ` ) ;
5458 } else if ( hasWeb ) {
5559 // Redirect to web version
5660 url = `${ BASE_URL } ${ langPrefix } /${ tool . slug } ` ;
61+ console . log ( `🌐 ${ tool . id } : Web URL = ${ url } ` ) ;
5762 } else {
5863 // Should not happen due to filter, but fallback to web
5964 url = `${ BASE_URL } ${ langPrefix } /${ tool . slug } ` ;
65+ console . log ( `⚠️ ${ tool . id } : Fallback URL = ${ url } ` ) ;
6066 }
6167
6268 return {
@@ -65,7 +71,7 @@ export async function loadTools(lang = 'es') {
6571 description : tool . description [ lang ] || tool . description . es ,
6672 category : tool . categories [ 0 ] , // Primary category
6773 url : url ,
68- local : hasExtension && tool . extensionSlug ? true : false
74+ local : isLocal
6975 } ;
7076 } ) ;
7177
You can’t perform that action at this time.
0 commit comments