diff --git a/src/mods/ui.js b/src/mods/ui.js index f4d4a99..1cb4c13 100644 --- a/src/mods/ui.js +++ b/src/mods/ui.js @@ -1056,39 +1056,57 @@ idrinth.ui = { * @returns {Array} */ var buildRaidJoinList = function () { - return [ { - content: idrinth.text.get ( "raids.clickCopy" ), - type: 'strong' - }, { - id: 'idrinth-raid-link-list' - }, { - content: idrinth.text.get ( "raids.disableSpecific" ), - type: 'strong' - }, { - content: idrinth.text.get ( "raids.disable.none" ), - type: 'button', - attributes: [ + /** + * + * @param {Array} list + * @param {String} header + * @returns {object} + */ + var wrap = function ( list, header ) { + return { + children: [ { - name: 'onclick', - value: 'idrinth.tier.allCheck(false)' - }, { - name: 'style', - value: 'width:50%;' - } ] - }, { - content: idrinth.text.get ( "raids.disable.all" ), - type: 'button', - attributes: [ + type: 'strong', + content: idrinth.text.get ( "raids." + header ) + }, { - name: 'onclick', - value: 'idrinth.tier.allCheck(true)' - }, { - name: 'style', - value: 'width:50%;' - } ] - }, { - id: 'idrinth-raid-may-join-list' - } ]; + children: list + } + ], + css: 'idrinth-openclick' + }; + }; + return [ + wrap ( [ { + id: 'idrinth-raid-link-list' + } ], + "clickCopy" + ), + wrap ( [ { + content: idrinth.text.get ( "raids.disable.none" ), + type: 'button', + attributes: [ + { + name: 'onclick', + value: 'idrinth.tier.allCheck(false)' + }, { + name: 'style', + value: 'width:50%;' + } ] + }, { + content: idrinth.text.get ( "raids.disable.all" ), + type: 'button', + attributes: [ + { + name: 'onclick', + value: 'idrinth.tier.allCheck(true)' + }, { + name: 'style', + value: 'width:50%;' + } ] + }, { + id: 'idrinth-raid-may-join-list' + } ], "disableSpecific" ) ]; }; return makeTabs ( { 'Actions': buildActions (),