Skip to content

Commit bfdb063

Browse files
committed
Refactored menus.toolbar.refresh() for readability
1 parent f1329aa commit bfdb063

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

assets/js/components/chatbot/menus.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ window.menus = {
143143
refresh() { // requires <GM_unregisterMenuCommand|log>
144144
if (typeof GM_unregisterMenuCommand == 'undefined')
145145
return log.debug('GM_unregisterMenuCommand not supported.')
146-
for (const id of this.entryIDs) { GM_unregisterMenuCommand(id) } this.register()
146+
this.entryIDs.forEach(id => GM_unregisterMenuCommand(id))
147+
this.register()
147148
},
148149

149150
register() { // requires <app|config|env|modals|settings|toggle>

0 commit comments

Comments
 (0)