diff --git a/package.json b/package.json index 710afc8..f201775 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ }, "devDependencies": { "@types/chrome": "^0.0.268", - "@types/dompurify": "^3.0.5", "copy-webpack-plugin": "^12.0.2", "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", diff --git a/public/manifest.json b/public/manifest.json index 6c8d3b1..df30dd8 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -4,7 +4,7 @@ "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "zh_CN", - "version": "0.10.0", + "version": "0.10.1", "icons": { "48": "assets/result48.png", "128": "assets/icon_128.png" diff --git a/src/background.js b/src/background.js index 19c964c..b1192b9 100644 --- a/src/background.js +++ b/src/background.js @@ -34,11 +34,10 @@ function initDatabase() { function saveToIndexedDB(q, data) { const transaction = db.transaction(['dictionary'], 'readwrite') const objectStore = transaction.objectStore('dictionary') - console.log('save to db', data) const request = objectStore.add({ q: q.toLowerCase(), data: data }) request.onsuccess = function(event) { - console.log('Data saved to IndexedDB:', q) + console.info(`\x1B[31msaved to DB ==> \x1B[34m${q}`) } request.onerror = function(event) { @@ -142,7 +141,7 @@ function initialize_extension() { getFromIndexedDB(request.q) .then(cachedData => { if (cachedData) { - console.info(`\t==>db cache : ${request.q}`) + console.info(`\tcache: \x1b[43m${request.q}`) sendResponse(cachedData) } else { console.log('fetch bing: ', request.q) @@ -152,10 +151,10 @@ function initialize_extension() { .then(html => { const minimizeHtml = html .replace(/