File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 661 . No longer display patch notes when notifying about update
771 . @O now tags opponent
881 . Added options for legend rank announcement
9+ 1 . Can now decline all friend requests at once
9101 . Added some settings
1011
1112## Version 0.23.0-4
Original file line number Diff line number Diff line change 1+ settings . register ( {
2+ name : 'Disable decline all button' ,
3+ key : 'underscript.disable.declineAll' ,
4+ refresh : true ,
5+ page : 'Friends' ,
6+ } ) ;
7+
8+ onPage ( 'Friends' , function groupButtons ( ) {
9+ eventManager . on ( 'jQuery' , ( ) => {
10+ if ( settings . value ( 'underscript.disable.declineAll' ) ) return ;
11+ const declineAll = $ ( '<span>' ) ;
12+ const container = $ ( 'p:contains("Friend requests")' ) . append ( ' ' , declineAll ) . parent ( ) ;
13+ declineAll . text ( ' ' ) . addClass ( 'glyphicon glyphicon-remove red' ) . css ( {
14+ cursor : 'pointer'
15+ } ) . hover ( hover . show ( 'Decline all' ) ) . click ( ( ) => {
16+ container . find ( 'a[href^="Friends?delete="]' ) . each ( function ( ) {
17+ eventManager . emit ( 'friendAction' , $ ( this ) ) ;
18+ } ) ;
19+ } ) ;
20+ } ) ;
21+ } ) ;
You can’t perform that action at this time.
0 commit comments