adding qr codes, converting site to quill

This commit is contained in:
metacryst
2025-10-29 00:06:59 -05:00
parent 9a829ab34f
commit a61562abfb
16 changed files with 353 additions and 130 deletions

View File

@@ -113,10 +113,9 @@ window.quill = {
if(el instanceof Shadow) {
let parent = quill.rendering[quill.rendering.length-1]
if(!parent) {
document.currentScript.replaceWith(el)
} else {
parent.appendChild(el)
parent = document.body
}
parent.appendChild(el)
} else {
if(!el.render) {el.render = () => {}}
let parent = quill.rendering[quill.rendering.length-1]
@@ -572,11 +571,11 @@ window.form = function(cb) {
return el
}
window.input = function(placeholder, dimensions) {
window.input = function(placeholder, width, height) {
let el = document.createElement("input")
el.placeholder = placeholder
if(dimensions.width) el.style.width = dimensions.width
if(dimensions.height) el.style.height = dimensions.height
el.style.width = width
el.style.height = height
quill.render(el)
return el
}
@@ -751,8 +750,17 @@ HTMLElement.prototype.removeAllListeners = function() {
/* ATTRIBUTES */
HTMLElement.prototype.attr = function(attributes) {
if (
typeof attributes !== "object" ||
attributes === null ||
Array.isArray(attributes)
) {
throw new TypeError("attr() expects an object with key-value pairs");
}
for (const [key, value] of Object.entries(attributes)) {
this.setAttribute(key, value);
}
console.log(this)
return this;
};