File tree 2 files changed +46
-46
lines changed
2 files changed +46
-46
lines changed Original file line number Diff line number Diff line change 1
- # Showdown Helper
2
-
3
- Showdown Helper is a Chrome extension that adds utilities to the Pokemon Showdown UI.
4
-
5
- Feature List:
6
- * Clicking on a Pokemon in the team list will go directly to the Smogon page for it.
7
- * Show a notification on battle end
8
- * That's it for now :)
9
-
10
- # Installation
11
-
12
- Prod build:
13
- * Install from [ Chrome Store] ( https://chrome.google.com/webstore/detail/showdown-helper/lgkjcofboheamlghbmmpegfdjifaaocl )
14
-
15
- Trunk:
16
- * Clone this repo
17
- * Go to extensions -> developer mode -> add unpacked -> pick the repo folder
1
+ # Showdown Helper
2
+
3
+ Showdown Helper is a Chrome extension that adds utilities to the Pokemon Showdown UI.
4
+
5
+ Feature List:
6
+ * Clicking on a Pokemon in the team list will go directly to the Smogon page for it.
7
+ * Show a notification on battle end
8
+ * That's it for now :)
9
+
10
+ # Installation
11
+
12
+ Prod build:
13
+ * Install from [ Chrome Store] ( https://chrome.google.com/webstore/detail/showdown-helper/lgkjcofboheamlghbmmpegfdjifaaocl )
14
+
15
+ Trunk:
16
+ * Clone this repo
17
+ * Go to extensions -> developer mode -> add unpacked -> pick the repo folder
Original file line number Diff line number Diff line change 1
- 'use strict' ;
2
-
3
- function handle_notification ( request ) {
4
- chrome . notifications . create ( {
5
- type : "basic" ,
6
- iconUrl : "icon.png" ,
7
- message : request . message ,
8
- title : request . title
9
- } ) ;
10
- }
11
-
12
- function is_pokemon_tooltip ( tooltip_text ) {
13
- return tooltip_text . match ( / .* L [ 0 - 9 ] + ( .| \n ) * A b i l .* / ) !== null ;
14
- }
15
-
16
- function handle_tooltip ( request ) {
17
- console . log ( is_pokemon_tooltip ( request . contents ) , request . contents ) ;
18
- }
19
-
20
- chrome . runtime . onMessage . addListener ( ( request ) => {
21
- switch ( request . type ) {
22
- case 'notification' :
23
- handle_notification ( request ) ;
24
- break ;
25
- case 'tooltip' :
26
- handle_tooltip ( request ) ;
27
- break ;
28
- }
29
- } ) ;
1
+ 'use strict' ;
2
+
3
+ function handle_notification ( request ) {
4
+ chrome . notifications . create ( {
5
+ type : "basic" ,
6
+ iconUrl : "icon.png" ,
7
+ message : request . message ,
8
+ title : request . title
9
+ } ) ;
10
+ }
11
+
12
+ function is_pokemon_tooltip ( tooltip_text ) {
13
+ return tooltip_text . match ( / .* L [ 0 - 9 ] + ( .| \n ) * A b i l .* / ) !== null ;
14
+ }
15
+
16
+ function handle_tooltip ( request ) {
17
+ console . log ( is_pokemon_tooltip ( request . contents ) , request . contents ) ;
18
+ }
19
+
20
+ chrome . runtime . onMessage . addListener ( ( request ) => {
21
+ switch ( request . type ) {
22
+ case 'notification' :
23
+ handle_notification ( request ) ;
24
+ break ;
25
+ case 'tooltip' :
26
+ handle_tooltip ( request ) ;
27
+ break ;
28
+ }
29
+ } ) ;
You can’t perform that action at this time.
0 commit comments