File tree Expand file tree Collapse file tree 11 files changed +104
-4
lines changed Expand file tree Collapse file tree 11 files changed +104
-4
lines changed Original file line number Diff line number Diff line change
1
+ < meta charset ="utf-8 " />
2
+ < link rel ="stylesheet " type ="text/css " href ="./popup.css " />
3
+
4
+ < p >
5
+ < strong > VitePress + Vue.js is detected on this page.</ strong > < br />
6
+ Devtools inspection is not available because it's in production mode or
7
+ explicitly disabled by the author.
8
+ </ p >
Original file line number Diff line number Diff line change
1
+ < meta charset ="utf-8 " />
2
+ < link rel ="stylesheet " type ="text/css " href ="./popup.css " />
3
+
4
+ < div class ="flex ">
5
+ < div class ="screenshot ">
6
+ < img src ="./devtools-screenshot.png " alt ="Screenshot " />
7
+ </ div >
8
+
9
+ < div >
10
+ < p >
11
+ < strong > VitePress + Vue.js is detected on this page.</ strong > < br />
12
+ Open DevTools and look for the Vue panel.
13
+ </ p >
14
+
15
+ < p >
16
+ < a
17
+ href ="https://devtools-next.vuejs.org/help/troubleshooting "
18
+ target ="_blank "
19
+ > Troubleshooting</ a
20
+ >
21
+ </ p >
22
+ </ div >
23
+ </ div >
Original file line number Diff line number Diff line change @@ -90,7 +90,12 @@ chrome.runtime.onConnect.addListener((port) => {
90
90
91
91
chrome . runtime . onMessage . addListener ( ( req , sender ) => {
92
92
if ( sender . tab && req . vueDetected ) {
93
- const suffix = req . nuxtDetected ? '.nuxt' : ''
93
+ let suffix = ''
94
+
95
+ if ( req . nuxtDetected )
96
+ suffix = '.nuxt'
97
+ else if ( req . vitePressDetected )
98
+ suffix = '.vitepress'
94
99
95
100
chrome . action . setIcon ( {
96
101
tabId : sender . tab . id ,
Original file line number Diff line number Diff line change @@ -26,7 +26,21 @@ function detect(win: Window) {
26
26
return
27
27
}
28
28
29
- // 2. check Vue
29
+ // 2. check VitePress
30
+ // @ts -expect-error types
31
+ const vitePressDetected = ! ! ( window . __VITEPRESS__ )
32
+ if ( vitePressDetected ) {
33
+ sendMessage ( {
34
+ devtoolsEnabled : window . __VUE_DEVTOOLS_GLOBAL_HOOK__ && window . __VUE_DEVTOOLS_GLOBAL_HOOK__ . enabled ,
35
+ vueDetected : true ,
36
+ vitePressDetected : true ,
37
+ vitePluginDetected : ! ! window . __VUE_DEVTOOLS_VITE_PLUGIN_DETECTED__ ,
38
+ vitePluginClientUrl : window . __VUE_DEVTOOLS_VITE_PLUGIN_CLIENT_URL__ ,
39
+ } )
40
+ return
41
+ }
42
+
43
+ // 3. check Vue
30
44
// @ts -expect-error types
31
45
const vueDetected = ! ! ( window . __VUE__ )
32
46
if ( vueDetected ) {
Original file line number Diff line number Diff line change
1
+ < meta charset ="utf-8 " />
2
+ < link rel ="stylesheet " type ="text/css " href ="./popup.css " />
3
+
4
+ < p >
5
+ < strong > VitePress + Vue.js is detected on this page.</ strong > < br />
6
+ Devtools inspection is not available because it's in production mode or
7
+ explicitly disabled by the author.
8
+ </ p >
Original file line number Diff line number Diff line change
1
+ < meta charset ="utf-8 " />
2
+ < link rel ="stylesheet " type ="text/css " href ="./popup.css " />
3
+
4
+ < div class ="flex ">
5
+ < div class ="screenshot ">
6
+ < img src ="./devtools-screenshot.png " alt ="Screenshot " />
7
+ </ div >
8
+
9
+ < div >
10
+ < p >
11
+ < strong > VitePress + Vue.js is detected on this page.</ strong > < br />
12
+ Open DevTools and look for the Vue panel.
13
+ </ p >
14
+
15
+ < p >
16
+ < a
17
+ href ="https://devtools-next.vuejs.org/help/troubleshooting "
18
+ target ="_blank "
19
+ > Troubleshooting</ a
20
+ >
21
+ </ p >
22
+ </ div >
23
+ </ div >
Original file line number Diff line number Diff line change @@ -88,7 +88,12 @@ chrome.runtime.onConnect.addListener((port) => {
88
88
89
89
chrome . runtime . onMessage . addListener ( ( req , sender ) => {
90
90
if ( sender . tab && req . vueDetected ) {
91
- const suffix = req . nuxtDetected ? '.nuxt' : ''
91
+ let suffix = ''
92
+
93
+ if ( req . nuxtDetected )
94
+ suffix = '.nuxt'
95
+ else if ( req . vitePressDetected )
96
+ suffix = '.vitepress'
92
97
93
98
chrome . browserAction . setIcon ( {
94
99
tabId : sender . tab . id ,
You can’t perform that action at this time.
0 commit comments