code cleanup

This commit is contained in:
SethBurkart123
2023-12-20 13:19:18 +11:00
parent 6d896caebf
commit 202944247a
+11 -11
View File
@@ -862,17 +862,6 @@ function addExtensionSettings() {
};
}
function saveNewOrder(sortable: any) {
var order = sortable.toArray();
browser.storage.local.set({ menuorder: order });
}
function cloneAttributes(target: any, source: any) {
[...source.attributes].forEach((attr) => {
target.setAttribute(attr.nodeName, attr.nodeValue);
});
}
export function OpenMenuOptions() {
const result = browser.storage.local.get()
function open (result: any) {
@@ -1089,6 +1078,17 @@ export function OpenMenuOptions() {
result.then(open, onError)
}
function saveNewOrder(sortable: any) {
var order = sortable.toArray();
browser.storage.local.set({ menuorder: order });
}
function cloneAttributes(target: any, source: any) {
[...source.attributes].forEach((attr) => {
target.setAttribute(attr.nodeName, attr.nodeValue);
});
}
function ReplaceMenuSVG(element: HTMLElement, svg: string) {
let item = element.firstChild as HTMLElement;
item!.firstChild!.remove();