1- // Background Service Worker - QuickTools Extension
1+ // Background Service Worker - FastTools Extension
22// Maneja eventos en segundo plano, analytics, sync
33
44// ====================
@@ -9,7 +9,7 @@ let creating; // A promise to prevent race conditions
99
1010// Cuando se instala la extensión
1111chrome . runtime . onInstalled . addListener ( ( details ) => {
12- console . log ( '🚀 QuickTools Extension instalado:' , details . reason ) ;
12+ console . log ( '🚀 FastTools Extension instalado:' , details . reason ) ;
1313
1414 if ( details . reason === 'install' ) {
1515 // Primera instalación
@@ -61,24 +61,24 @@ async function initializeExtension() {
6161 }
6262 } ) ;
6363
64- console . log ( '✅ QuickTools inicializado correctamente' ) ;
64+ console . log ( '✅ FastTools inicializado correctamente' ) ;
6565}
6666
6767function generateUserId ( ) {
68- return 'qt_ ' + Math . random ( ) . toString ( 36 ) . substr ( 2 , 9 ) + '_' + Date . now ( ) ;
68+ return 'ft_ ' + Math . random ( ) . toString ( 36 ) . substr ( 2 , 9 ) + '_' + Date . now ( ) ;
6969}
7070
7171function showWelcomeNotification ( ) {
7272 chrome . notifications . create ( {
7373 type : 'basic' ,
7474 iconUrl : chrome . runtime . getURL ( 'icons/icon-128x128.png' ) ,
75- title : '¡Bienvenido a QuickTools !' ,
75+ title : '¡Bienvenido a FastTools !' ,
7676 message : 'Tu suite de productividad está lista. Usa Ctrl+Shift+Q para abrir.'
7777 } ) ;
7878}
7979
8080function handleUpdate ( previousVersion ) {
81- console . log ( `🔄 QuickTools actualizado de ${ previousVersion } a 1.0.0` ) ;
81+ console . log ( `🔄 FastTools actualizado de ${ previousVersion } a 1.0.0` ) ;
8282
8383 // Migrar datos si es necesario
8484 chrome . storage . local . get ( null , ( data ) => {
@@ -98,60 +98,60 @@ function createContextMenus() {
9898 chrome . contextMenus . removeAll ( ( ) => {
9999 // Menu principal
100100 chrome . contextMenus . create ( {
101- id : 'quicktools -main' ,
102- title : '🛠️ QuickTools ' ,
101+ id : 'fasttools -main' ,
102+ title : '🛠️ FastTools ' ,
103103 contexts : [ 'page' , 'selection' , 'image' , 'link' ]
104104 } ) ;
105105
106106 // Submenu para texto
107107 chrome . contextMenus . create ( {
108- id : 'quicktools -text' ,
108+ id : 'fasttools -text' ,
109109 title : '📝 Herramientas de Texto' ,
110- parentId : 'quicktools -main' ,
110+ parentId : 'fasttools -main' ,
111111 contexts : [ 'selection' ]
112112 } ) ;
113113
114114 chrome . contextMenus . create ( {
115115 id : 'text-encode-url' ,
116116 title : '🔗 Codificar URL' ,
117- parentId : 'quicktools -text' ,
117+ parentId : 'fasttools -text' ,
118118 contexts : [ 'selection' ]
119119 } ) ;
120120
121121 chrome . contextMenus . create ( {
122122 id : 'text-base64' ,
123123 title : '🔐 Base64 Encode' ,
124- parentId : 'quicktools -text' ,
124+ parentId : 'fasttools -text' ,
125125 contexts : [ 'selection' ]
126126 } ) ;
127127
128128 // Submenu para imagen
129129 chrome . contextMenus . create ( {
130- id : 'quicktools -image' ,
130+ id : 'fasttools -image' ,
131131 title : '🖼️ Herramientas de Imagen' ,
132- parentId : 'quicktools -main' ,
132+ parentId : 'fasttools -main' ,
133133 contexts : [ 'image' ]
134134 } ) ;
135135
136136 chrome . contextMenus . create ( {
137137 id : 'image-color-picker' ,
138138 title : '🎨 Extraer Colores' ,
139- parentId : 'quicktools -image' ,
139+ parentId : 'fasttools -image' ,
140140 contexts : [ 'image' ]
141141 } ) ;
142142
143143 // Acciones directas
144144 chrome . contextMenus . create ( {
145145 id : 'capture-screen' ,
146146 title : '📸 Capturar Pantalla' ,
147- parentId : 'quicktools -main' ,
147+ parentId : 'fasttools -main' ,
148148 contexts : [ 'page' ]
149149 } ) ;
150150
151151 chrome . contextMenus . create ( {
152152 id : 'quick-notes' ,
153153 title : '📝 Nueva Nota Rápida' ,
154- parentId : 'quicktools -main' ,
154+ parentId : 'fasttools -main' ,
155155 contexts : [ 'page' ]
156156 } ) ;
157157 } ) ;
@@ -370,7 +370,7 @@ function showNotification(message, type = 'info', buttons = [], notificationId =
370370 chrome . notifications . create ( notificationId , {
371371 type : 'basic' ,
372372 iconUrl : chrome . runtime . getURL ( icons [ type ] ) ,
373- title : 'QuickTools ' ,
373+ title : 'FastTools ' ,
374374 message : message ,
375375 buttons : buttons ,
376376 requireInteraction : requireInteraction
@@ -460,7 +460,7 @@ chrome.notifications.onButtonClicked.addListener(async (notificationId, buttonIn
460460 if ( dataUrl && buttonIndex === 0 ) { // "Descargar"
461461 chrome . downloads . download ( {
462462 url : dataUrl ,
463- filename : `QuickTools -Capture-${ Date . now ( ) } .png` ,
463+ filename : `FastTools -Capture-${ Date . now ( ) } .png` ,
464464 saveAs : true
465465 } ) ;
466466 }
@@ -496,4 +496,4 @@ self.addEventListener('unhandledrejection', (event) => {
496496 console . error ( '💥 Unhandled promise rejection:' , event . reason ) ;
497497} ) ;
498498
499- console . log ( '🚀 QuickTools Service Worker cargado' ) ;
499+ console . log ( '🚀 FastTools Service Worker cargado' ) ;
0 commit comments