mirror of
https://github.com/Findus23/typo3-keyboard.git
synced 2024-08-27 19:52:16 +02:00
broken collapse
This commit is contained in:
parent
4448635622
commit
168418c2e2
2 changed files with 35 additions and 2 deletions
|
@ -18,7 +18,9 @@ const defaultkeys = {
|
||||||
viewPage: 'v',
|
viewPage: 'v',
|
||||||
flushFrontendCaches: 'mod+del',
|
flushFrontendCaches: 'mod+del',
|
||||||
flushAllCaches: 'mod+shift+del',
|
flushAllCaches: 'mod+shift+del',
|
||||||
searchField: 'mod+shift+f'
|
searchField: 'mod+shift+f',
|
||||||
|
expand: 'mod+shift+plus',
|
||||||
|
collapse: 'mod+shift+-'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,5 +88,34 @@ chrome.storage.sync.get(defaultkeys, function (keys) {
|
||||||
searchField.focus();
|
searchField.focus();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
Mousetrap.bind("a", function () {
|
||||||
|
console.log("expand");
|
||||||
|
const contentDocument = getContentDocument();
|
||||||
|
const closed = contentDocument.querySelectorAll('.panel-collapsed');
|
||||||
|
closed.forEach((el) => {
|
||||||
|
const header = el.querySelector(".panel-heading");
|
||||||
|
console.log(header.dataset);
|
||||||
|
delete header.dataset.expandsingle;
|
||||||
|
});
|
||||||
|
closed.forEach((el) => {
|
||||||
|
// if (el.offsetParent === null) {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
const header = el.querySelector(".panel-heading");
|
||||||
|
delete header.dataset.expandsingle;
|
||||||
|
header.click();
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
Mousetrap.bind("b", function () {
|
||||||
|
console.log("close");
|
||||||
|
const contentDocument = getContentDocument();
|
||||||
|
const opened = contentDocument.querySelectorAll('.panel-visible');
|
||||||
|
opened.forEach((el) => {
|
||||||
|
console.info(el);
|
||||||
|
el.querySelector(".panel-heading").click();
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,7 +9,9 @@ const keys = {
|
||||||
viewPage: 'v',
|
viewPage: 'v',
|
||||||
flushFrontendCaches: 'mod+del',
|
flushFrontendCaches: 'mod+del',
|
||||||
flushAllCaches: 'mod+shift+del',
|
flushAllCaches: 'mod+shift+del',
|
||||||
searchField: 'mod+shift+f'
|
searchField: 'mod+shift+f',
|
||||||
|
expand: 'mod+shift+plus',
|
||||||
|
collapse: 'mod+shift+-'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue