This repository was archived by the owner on Mar 29, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ idrinth.settings = {
310310 /**
311311 *
312312 * @param {String } field
313- * @param {String|Booleab |Number } value
313+ * @param {String|Boolean |Number } value
314314 * @returns {undefined }
315315 */
316316 change : function ( field , value ) {
Original file line number Diff line number Diff line change @@ -470,5 +470,19 @@ idrinth.tier = {
470470 type : document . getElementById ( 'idrinth-tierlist-typesearch' ) . value ,
471471 list : idrinth . tier . list
472472 } ) ;
473+ } ,
474+ /**
475+ *
476+ * @param {Boolean } yes
477+ * @returns {undefined }
478+ */
479+ allCheck : function ( yes ) {
480+ var boxes = document . getElementById ( 'idrinth-raid-may-join-list' ) . getElementsByTagName ( 'input' ) ;
481+ for ( var counter = boxes . length - 1 ; counter >= 0 ; counter -- ) {
482+ if ( boxes [ counter ] . getAttribute ( 'type' ) === 'checkbox' && boxes [ counter ] . checked !== yes ) {
483+ boxes [ counter ] . checked = yes ;
484+ idrinth . settings . change ( boxes [ counter ] . getAttribute ( 'name' ) , yes ) ;
485+ }
486+ }
473487 }
474488} ;
Original file line number Diff line number Diff line change @@ -1064,6 +1064,14 @@ idrinth.ui = {
10641064 } , {
10651065 content : idrinth . text . get ( "raids.disableSpecific" ) ,
10661066 type : 'strong'
1067+ } , {
1068+ content : idrinth . text . get ( "raids.disable.none" ) ,
1069+ type : 'button' ,
1070+ attributes : [ { name :'onclick' , value :'idrinth.tier.allCheck(false)' } ]
1071+ } , {
1072+ content : idrinth . text . get ( "raids.disable.all" ) ,
1073+ type : 'button' ,
1074+ attributes : [ { name :'onclick' , value :'idrinth.tier.allCheck(false)' } ]
10671075 } , {
10681076 id : 'idrinth-raid-may-join-list'
10691077 } ] ;
You can’t perform that action at this time.
0 commit comments