File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 161
161
} , function ( data ) {
162
162
if ( self . curFormat !== format ) return ;
163
163
var buf = '<div class="ladder pad"><p><button name="selectFormat"><i class="fa fa-chevron-left"></i> Format List</button></p><p><button class="button" name="refresh"><i class="fa fa-refresh"></i> Refresh</button>' ;
164
- buf += '<button class="button" name="send" value="/join view-seasonladder-' + format + '">Season rankings</button>' ;
164
+ buf += ' <button class="button" name="send" value="/join view-seasonladder-' + format + '"><i class="fa fa-trophy"></i> Season rankings</button>' ;
165
165
buf += '<form class="search"><input type="text" name="searchval" class="textbox searchinput" value="' + BattleLog . escapeHTML ( self . curSearchVal || '' ) + '" placeholder="username prefix" /><button type="submit"> Search</button></form></p>' ;
166
166
buf += '<h3>' + BattleLog . escapeFormat ( format ) + ' Top ' + BattleLog . escapeHTML ( self . curSearchVal ? "- '" + self . curSearchVal + "'" : '500' ) + '</h3>' ;
167
167
buf += data + '</div>' ;
Original file line number Diff line number Diff line change @@ -703,7 +703,13 @@ export class BattleScene implements BattleSceneStub {
703
703
// but idk that we're planning that for now so
704
704
const [ threshold , season ] = details . split ( '-' ) ;
705
705
const hover = `Top ${ threshold } in ${ format } during ladder season ${ season } ` ;
706
- badgehtml += `<img src="${ Dex . resourcePrefix } /sprites/misc/${ type } .png" width="20px" height="20px" title="${ hover } " />` ;
706
+ // ou and randbats get diff badges from everyone else, find it
707
+ // (regex futureproofs for double digit gens)
708
+ let formatType = format . split ( / g e n \d + / ) [ 1 ] || 'none' ;
709
+ if ( ! [ 'ou' , 'randombattle' ] . includes ( formatType ) ) {
710
+ formatType = 'base' ;
711
+ }
712
+ badgehtml += `<img src="${ Dex . resourcePrefix } /sprites/misc/${ formatType } -${ type } .png" width="20px" height="20px" title="${ hover } " />` ;
707
713
}
708
714
badgehtml += '</span>' ;
709
715
}
You can’t perform that action at this time.
0 commit comments