Process buttons for extension and site settings
This commit is contained in:
parent
8bdb7b9e94
commit
65c35d369c
@ -247,6 +247,14 @@ function processButtonsForPopupCategory(category, buttons) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function configureGlobalTab() {
|
function configureGlobalTab() {
|
||||||
|
const popupButtons = settings.getActionsForSite(site).filter(action => action.popup_global === true);
|
||||||
|
|
||||||
|
const stretchButtons = popupButtons.filter(action => action.cmd.length === 1 && action.cmd[0].action === 'set-stretch');
|
||||||
|
const alignButtons = popupButtons.filter(action => action.cmd.length === 1 && action.cmd[0].action === 'set-alignment');
|
||||||
|
|
||||||
|
processButtonsForPopupCategory(VideoPanel.elements.stretchSettings, stretchButtons);
|
||||||
|
processButtonsForPopupCategory(VideoPanel.elements.alignmentSettings, alignButtons);
|
||||||
|
|
||||||
return; // todo: revisit
|
return; // todo: revisit
|
||||||
if (Debug.debug) {
|
if (Debug.debug) {
|
||||||
console.log("[popup.js] Configuring global tab (ExtPanel).",
|
console.log("[popup.js] Configuring global tab (ExtPanel).",
|
||||||
@ -278,7 +286,7 @@ function configureGlobalTab() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function configureSitesTab(site) {
|
function configureSitesTab(site) {
|
||||||
const popupButtons = settings.getActionsForSite(site).filter(action => action.popup === true);
|
const popupButtons = settings.getActionsForSite(site).filter(action => action.popup_site === true);
|
||||||
|
|
||||||
const stretchButtons = popupButtons.filter(action => action.cmd.length === 1 && action.cmd[0].action === 'set-stretch');
|
const stretchButtons = popupButtons.filter(action => action.cmd.length === 1 && action.cmd[0].action === 'set-stretch');
|
||||||
const alignButtons = popupButtons.filter(action => action.cmd.length === 1 && action.cmd[0].action === 'set-alignment');
|
const alignButtons = popupButtons.filter(action => action.cmd.length === 1 && action.cmd[0].action === 'set-alignment');
|
||||||
|
Loading…
Reference in New Issue
Block a user