File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -40,17 +40,18 @@ function title_to_url(title) {
40
40
const pokemon = title
41
41
. replace ( / \( ( a c t i v e | f a i n t e d ) \) / , '' ) // trim any (active), (fainted)
42
42
. replace ( / .* \( ( .* ) \) / , "$1" ) ; // whatever is in () is the actual pokemon
43
- return "https://www.smogon.com/dex/sm /pokemon/" + pokemon ;
43
+ return "https://www.smogon.com/dex/ss /pokemon/" + pokemon ;
44
44
}
45
45
46
46
function add_picon_links ( room_div ) {
47
47
const picons = document . querySelectorAll ( ".teamicons > .picon" ) ;
48
48
for ( const picon of picons ) {
49
- if ( picon . title === "Not revealed" ) {
49
+ const label = picon . getAttribute ( 'aria-label' )
50
+ if ( label === "Not revealed" ) {
50
51
continue ;
51
52
}
52
53
53
- picon . onclick = ( ) => window . open ( title_to_url ( picon . title ) ) ;
54
+ picon . onclick = ( ) => window . open ( title_to_url ( label ) ) ;
54
55
picon . style . cursor = "pointer" ;
55
56
}
56
57
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " Showdown Helper" ,
3
- "version" : " 1.1 .0" ,
3
+ "version" : " 1.2 .0" ,
4
4
"description" : " Adds UI elements to Pokemon Showdown for easier battles" ,
5
5
"manifest_version" : 2 ,
6
6
"permissions" : [
You can’t perform that action at this time.
0 commit comments