show apps on top menu
This commit is contained in:
parent
5cc8569277
commit
4e62b2e7dc
4 changed files with 107 additions and 58 deletions
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
header('Content-type: text/javascript');
|
||||
|
||||
$display = 'default';
|
||||
|
||||
if ($_['always-displayed']) {
|
||||
|
|
@ -12,6 +14,24 @@ if ($_['always-displayed']) {
|
|||
|
||||
?>
|
||||
|
||||
const SMcreateElement = (tagName, attributes) => {
|
||||
const element = document.createElement(tagName)
|
||||
|
||||
if (typeof attributes === 'object') {
|
||||
for (let i in attributes) {
|
||||
if (i === 'text') {
|
||||
element.textContent = attributes[i]
|
||||
} else if (i === 'html') {
|
||||
element.innerHTML = attributes[i]
|
||||
} else {
|
||||
element.setAttribute(i, attributes[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return element
|
||||
}
|
||||
|
||||
(function() {
|
||||
const sideMenuContainer = SMcreateElement('div', {id: 'side-menu-container'})
|
||||
const sideMenuOpener = SMcreateElement('button', {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue