File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 11
11
*/
12
12
13
13
const forcePopup = ( { id, url } ) => {
14
- if ( / h t t p s ? : \/ \/ ( g i t h u b | g i t l a b ) .c o m \/ .* \/ .* / . test ( url ) ||
15
- / h t t p s ? : \/ \/ g i t p o d .i o \/ .* / . test ( url ) ) {
16
- chrome . pageAction . show ( id ) ;
17
- }
14
+ chrome . pageAction . show ( id ) ;
18
15
} ;
19
16
20
17
chrome . tabs . onUpdated . addListener ( ( tabId , activeInfo , tab ) => {
@@ -26,9 +23,9 @@ chrome.tabs.onActivated.addListener(({ tabId }) => {
26
23
} ) ;
27
24
28
25
chrome . pageAction . onClicked . addListener ( ( { url } ) => {
29
- let popupUrl = ` https://gitpod.io/# ${ url } ` ;
30
- if ( / h t t p s ? : \/ \/ g i t p o d . i o \/ .* / . test ( url ) ) {
31
- popupUrl = ' https://gitpod.io/workspaces/' ;
26
+ let popupUrl = ' https://gitpod.io/workspaces/' ;
27
+ if ( / h t t p s ? : \/ \/ ( g i t h u b | g i t l a b ) . c o m \/ . * \/ .* / . test ( url ) ) {
28
+ popupUrl = ` https://gitpod.io/# ${ url } ` ;
32
29
}
33
30
chrome . windows . create ( { url : popupUrl , type : 'popup' } ) ;
34
31
} ) ;
Original file line number Diff line number Diff line change 10
10
},
11
11
"author" : " Jerome Wu <jeromewus@gmail.com>" ,
12
12
"permissions" : [
13
- " tabs" ,
14
- " *://github.com/*/*" ,
15
- " *://gitlab.com/*/*" ,
16
- " *://gitpod.io/*"
13
+ " tabs"
17
14
],
18
15
"background" : {
19
16
"scripts" : [" background.js" ],
You can’t perform that action at this time.
0 commit comments