File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44### New Features
551 . Added settings to auto decline specific friend requests
661 . Automatically update the online friends list
7+ 1 . Click on hovered cards (that shouldn't be there) to remove them
78
89### Fixes
9101 . Fixed bug where the spectate list refreshes too quickly
Original file line number Diff line number Diff line change 1+ wrap ( function hoverWrapper ( ) {
2+ function wrapper ( ...rest ) {
3+ this . super ( ...rest ) ;
4+ $ ( '#hover-card' ) . click ( function ( ) {
5+ $ ( this ) . remove ( ) ;
6+ } ) ;
7+ }
8+
9+ eventManager . on ( ':loaded' , ( ) => {
10+ const options = {
11+ throws : false ,
12+ } ;
13+ globalSet ( 'displayCardDeck' , wrapper , options ) ;
14+ globalSet ( 'displayCardHelp' , wrapper , options ) ;
15+ } ) ;
16+ } ) ;
Original file line number Diff line number Diff line change 11function debug ( message , permission = 'debugging' ) {
22 if ( ! settings . value ( permission ) && ! settings . value ( 'debugging.*' ) ) return ;
33 //message.stack = new Error().stack.split('\n').slice(2);
4- console . log ( message ) ;
4+ console . log ( `[ ${ permission } ]` , message ) ;
55}
66
77fn . debug = ( arg , permission = 'debugging' ) => {
Original file line number Diff line number Diff line change @@ -4,9 +4,22 @@ function global(...key) {
44 return window [ found ] ;
55}
66
7- function globalSet ( key , value ) {
8- if ( ! window . hasOwnProperty ( key ) ) throw new Error ( `[${ key } ] does not exist` ) ;
7+ function globalSet ( key , value , {
8+ throws= true ,
9+ } = { } ) {
10+ if ( ! window . hasOwnProperty ( key ) ) {
11+ const msg = `[${ key } ] does not exist` ;
12+ if ( throws ) throw new Error ( msg ) ;
13+ return debug ( msg ) ;
14+ }
915 const original = window [ key ] ;
10- window [ key ] = value ;
16+ if ( typeof value === 'function' ) {
17+ const wrapper = {
18+ super : original ,
19+ } ;
20+ window [ key ] = value . bind ( wrapper ) ;
21+ } else {
22+ window [ key ] = value ;
23+ }
1124 return original ;
1225}
You can’t perform that action at this time.
0 commit comments