remote control: restore /TABS command

This commit is contained in:
jean-emmanuel 2021-02-11 07:52:47 +01:00
parent 6046715f68
commit c1feb5f628
3 changed files with 23 additions and 3 deletions

View file

@ -259,10 +259,21 @@ var callbacks = {
sessionManager.save(args[0])
},
'/TABS': function(args) {
if (!Array.isArray(args)) args = [args]
for (let id of args) {
let ws = widgetManager.getWidgetById(id)
for (let w of ws) {
if (w.getProp('type') === 'tab') {
var index = w.parent.children.indexOf(w)
w.parent.setValue(index, {sync: true, send: false})
}
}
}
}
}
module.exports = {