Commit c7fb278a by Luciano Barletta

merge js

1 parent fdde39b7
...@@ -64,3 +64,20 @@ function generate(tabs){ ...@@ -64,3 +64,20 @@ function generate(tabs){
} }
console.log(JSON.stringify(dict)); console.log(JSON.stringify(dict));
} }
function sortTabs(){
let tabs = document.getElementById("tabs");
Array.from(tabs.children).sort(
(a,b) => a.children[0].value < b.children[0].value ? -1 : a.children[0].value > b.children[0].value ? 1 : 0
).forEach(
c => tabs.appendChild(c)
)
}
function sortFields(tab){
Array.from(tab.children).sort(
(a,b) => a.children[0].value < b.children[0].value ? -1 : a.children[0].value > b.children[0].value ? 1 : 0
).forEach(
c => tabs.appendChild(c)
)
}
\ No newline at end of file \ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!