File tree Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Original file line number Diff line number Diff line change 1
- chrome . browserAction . onClicked . addListener ( function ( tab ) {
2
- chrome . tabs . insertCSS ( tab . id , { file : "combined.css" } ) ;
3
- chrome . tabs . executeScript ( tab . id , { file : "combined.js" } ) ;
1
+ chrome . action . onClicked . addListener ( function ( tab ) {
2
+ chrome . scripting . executeScript ( {
3
+ target : { tabId : tab . id } ,
4
+ files : [ 'combined.js' ]
5
+ } ) ;
6
+
7
+ chrome . scripting . insertCSS ( {
8
+ target : { tabId : tab . id } ,
9
+ files : [ 'combined.css' ]
10
+ } ) ;
4
11
} ) ;
Original file line number Diff line number Diff line change 5
5
var interval = setInterval ( function ( ) {
6
6
if ( typeof SelectorGadget != 'undefined' ) {
7
7
clearInterval ( interval ) ;
8
- SelectorGadget . toggle ( ) ;
8
+ SelectorGadget . toggle ( { analytics : false } ) ;
9
9
}
10
10
} , 50 ) ;
11
- } ) ( ) ;
11
+ } ) ( ) ;
Original file line number Diff line number Diff line change 1
1
{
2
- "manifest_version" : 2 ,
2
+ "manifest_version" : 3 ,
3
3
"icons" : { "16" : " icons/16x16.png" ,
4
4
"48" : " icons/48x48.png" ,
5
5
"128" : " icons/128x128.png" },
6
6
"name" : " SelectorGadget" ,
7
7
"homepage_url" : " http://selectorgadget.com" ,
8
8
"description" : " Easy, powerful CSS Selector generation." ,
9
- "version" : " 1.1.1" ,
10
- "permissions" : [
11
- " http://*/*" , " https://*/*"
9
+ "version" : " 1.2.0" ,
10
+ "permissions" : [" scripting" ],
11
+ "host_permissions" : [
12
+ " http://*/*" ,
13
+ " https://*/*"
12
14
],
13
15
"background" : {
14
- "scripts " : [ " background.js" ] ,
15
- "persistent " : false
16
+ "service_worker " : " background.js" ,
17
+ "type " : " module "
16
18
},
17
- "browser_action " : {
19
+ "action " : {
18
20
"default_icon" : {
19
21
"19" : " icons/action19x19.png" ,
20
22
"38" : " icons/action38x38.png"
You can’t perform that action at this time.
0 commit comments