User:Stumblean/common.js: Difference between revisions
No edit summary Tags: Mobile edit Mobile web edit Advanced mobile edit |
No edit summary Tags: Mobile edit Mobile web edit Advanced mobile edit |
||
Line 20: | Line 20: | ||
}); | }); | ||
// === HEADER WITH ICONS AND MINIMIZE BUTTON === | |||
const header = document.createElement("div"); | const header = document.createElement("div"); | ||
header.style.display = "flex"; | header.style.display = "flex"; | ||
Line 25: | Line 26: | ||
header.style.alignItems = "center"; | header.style.alignItems = "center"; | ||
header.style.marginBottom = "8px"; | header.style.marginBottom = "8px"; | ||
const titleWrap = document.createElement("div"); | |||
titleWrap.style.display = "flex"; | |||
titleWrap.style.alignItems = "center"; | |||
titleWrap.style.gap = "6px"; | |||
const leftIcon = document.createElement("img"); | |||
leftIcon.src = iconURL; | |||
leftIcon.width = 15; | |||
leftIcon.height = 15; | |||
const title = document.createElement("div"); | const title = document.createElement("div"); | ||
Line 30: | Line 41: | ||
title.style.fontWeight = "bold"; | title.style.fontWeight = "bold"; | ||
title.style.color = "#fff"; | title.style.color = "#fff"; | ||
const rightIcon = document.createElement("img"); | |||
rightIcon.src = iconURL; | |||
rightIcon.width = 15; | |||
rightIcon.height = 15; | |||
titleWrap.appendChild(leftIcon); | |||
titleWrap.appendChild(title); | |||
titleWrap.appendChild(rightIcon); | |||
const minimizeBtn = document.createElement("button"); | const minimizeBtn = document.createElement("button"); | ||
Line 43: | Line 63: | ||
}); | }); | ||
header.appendChild( | header.appendChild(titleWrap); | ||
header.appendChild(minimizeBtn); | header.appendChild(minimizeBtn); | ||
Line 58: | Line 78: | ||
display: "none", | display: "none", | ||
cursor: "pointer", | cursor: "pointer", | ||
borderRadius: "6px", // | borderRadius: "6px", // rounded square | ||
width: "30px", | width: "30px", | ||
height: "30px" | height: "30px" |