File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ chrome . browserAction . onClicked . addListener ( function ( tab ) {
2
+ chrome . tabs . create ( { url : "http://www.mymap.ai/vizmap?type=vgmap&mid=pg-enFXnlaT66Zh&url=" + encodeURIComponent ( tab . url ) } ) ;
3
+ } ) ;
4
+
5
+ chrome . commands . onCommand . addListener ( function ( command ) {
6
+ if ( command === "_execute_browser_action" ) {
7
+ chrome . tabs . query ( { active : true , currentWindow : true } , function ( tabs ) {
8
+ chrome . tabs . create ( { url : "http://www.mymap.ai/vizmap?type=vgmap&mid=pg-enFXnlaT66Zh&url=" + encodeURIComponent ( tabs [ 0 ] . url ) } ) ;
9
+ } ) ;
10
+ }
11
+ } ) ;
12
+
Original file line number Diff line number Diff line change
1
+ {
2
+ "manifest_version" : 2 ,
3
+ "name" : " StoryMap" ,
4
+ "description" : " Opens mymap.ai with current URL" ,
5
+ "version" : " 1.0" ,
6
+ "background" : {
7
+ "scripts" : [" background.js" ],
8
+ "persistent" : false
9
+ },
10
+ "commands" : {
11
+ "_execute_browser_action" : {
12
+ "suggested_key" : {
13
+ "default" : " Ctrl+Shift+M" ,
14
+ "mac" : " MacCtrl+Shift+M"
15
+ }
16
+ }
17
+ },
18
+ "permissions" : [
19
+ " activeTab"
20
+ ],
21
+ "browser_action" : {}
22
+ }
23
+
You can’t perform that action at this time.
0 commit comments