Skip to content

Latest commit

 

History

History
40 lines (35 loc) · 1.44 KB

README.md

File metadata and controls

40 lines (35 loc) · 1.44 KB

GloeLIB

Gloe is a library for creating window style debugging tools on the fly.

Usage

  1. Pick Gloe CDN link (or self host, it doesnt matter) - You can replace gloe.js with gloe.min.js if needed (HEAVILY in beta. Classnames minified)
# Pick from one of these:
https://rawcdn.githack.com/klashdevelopment/gloe/main/gloe.js
https://raw.githack.com/klashdevelopment/gloe/refs/heads/main/gloe.js
https://raw.githubusercontent.com/klashdevelopment/gloe/refs/heads/main/gloe.js
  1. Fetch gloe to register
fetch('https://raw.githubusercontent.com/klashdevelopment/gloe/refs/heads/main/gloe.js')
    .then(gloeScript => gloeScript.text())
    .then(gloeScript => eval(gloeScript))
    .then(_ => {
        // do step 3 here!!
    });
  1. Make your windows
window.gloe.create({ ... });

All parameters are optional, see below for more information:

Name Type Example
title String "Awesome Title"
id HTML ID compiliant String "awesome-title"
content String or HTMLElement "Hello, World!"
onCreated Function (window)=>{ ... }

Use onCreated to add event listeners to inputs/buttons. Takes in the generated gloe-window

Manual minification

Minify and make this as small as physically possible, removing all unused funcs and minifying variable names (however keep the syntax window.gloe.create({title: "", content: "", id: "", onCreated: ()=>{}})