From dc87875c075d5796f32cf2d51689a984625d13f4 Mon Sep 17 00:00:00 2001 From: Will Date: Sun, 4 Aug 2024 22:31:54 -0700 Subject: [PATCH] fix: custom devtools setting --- package.json | 2 +- src/sw.js | 2 +- src/ui/App.vue | 4 +-- src/ui/components/NiSettings.vue | 61 ++++++++++++++++++-------------- 4 files changed, 38 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index c3617d4..1f331d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nimv3", - "version": "3.9.2", + "version": "3.9.3", "scripts": { "dev": "vite --host", "dev:extension": "npm-run-all --parallel build:dev watch:rollup:deps", diff --git a/src/sw.js b/src/sw.js index f30e74b..feaceab 100644 --- a/src/sw.js +++ b/src/sw.js @@ -26,7 +26,7 @@ const NOTIFICATION_CHECK_INTERVAL = ENV !== 'production' ? 60000 : 60 * 60000 // const NOTIFICATION_PUSH_INTERVAL = ENV !== 'production' ? 60000 : 60 * 60000 // Push new notifications no more than 1 every hour if there is a queue. const NOTIFICATION_LIFETIME = ENV !== 'production' ? 3 * 60000 : 7 * 86400000 const SOCKET_PATTERN = /((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])):([0-9]+)/ -const reDevtoolsURL = /(devtools:\/\/|chrome-devtools:\/\/|https:\/\/chrome-devtools-frontend(\.appspot.com|\.june07.com)).*(inspector.html|js_app.html)/ +const reDevtoolsURL = /(devtools|chrome-devtools|https?:\/\/localhost|chrome-devtools-frontend(\.(appspot|june07|brakecode)\.com)).*\/(inspector.html|js_app.html|devtools_app.html|node_app.html|ndb_app.html)/ const reTabGroupTitle = new RegExp(/NiM/) const reSocket = new RegExp(/^((?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}|localhost|(?:\d{1,3}\.){3}\d{1,3}|(\[(?:[A-Fa-f0-9:]+)\]))+(:\d{1,5})?)|^\d{1,5}$/) diff --git a/src/ui/App.vue b/src/ui/App.vue index dfc1c5f..0fd818f 100644 --- a/src/ui/App.vue +++ b/src/ui/App.vue @@ -1,8 +1,8 @@