Simple.js Docs
Setup/Installation
            All you need to do is add the simple.js library to your html file.
            In the head tag just add this line of code:
            
        <script src="https://cdn.jsdelivr.net/gh/kgsensei/[email protected]/simple.min.js"></script>Dom Manipulation
            Get element by id, will return html element as object. Function name stands for Get ID.
            
Append HTML to html object, will add specified html
Mirror of insertAdjacentHTML.beforeBegin
Set element attribute
Hide html element by id
Get element width
Value getter/setter for inputs
Add event listener, usage is the same as normal. Function name stands for Add Event Listener.
        gid("example_id") // Will return html object, same as document.getElementById()gcn("example_class_name") // Will return html object array, same as document.getElementsByClassName()idex("example_id") // Will return boolAppend HTML to html object, will add specified html
gid("example_id").addHTML("Hello World!") // Will add 'Hello World!' to end of the #example_id contentgid("example_id").preHTML("Hello World!") // Will add 'Hello World!' to start of the #example_id contentgid("example_id").setHTML("Hello World!") // Will set #example_id content to 'Hello World!'gid("example_id").setText("Hello World!") // Will set #example_id content to 'Hello World!'Mirror of insertAdjacentHTML.beforeBegin
gid("example_id").insertBefore("<i>Hello World!</i>")gid("example_id").insertTop("<i>Hello World!</i>")gid("example_id").insertBottom("<i>Hello World!</i>")gid("example_id").insertEnd("<i>Hello World!</i>")Set element attribute
gid("example_id").setAttr("data-key", "value") // Sets the 'data-key' attribute on #example_id to 'value'gid("example_id").getAttr("data-key") // Gets the value of the 'data-key' attribute on #example_idHide html element by id
gid("example_id").hide() // Will hide #example_id from viewport (display: none)gid("example_id").show() // Will un-hide #example_id from viewport (display: block)Get element width
gid("example_id").width() // Will return pixel value for widthgid("example_id").height() // Will return pixel value for heightgid("example_id").top() // Will return pixel value for topgid("example_id").left() // Will return pixel value for leftValue getter/setter for inputs
gid("example_id").val() // Will get the input value for #example_id
gid("example_id").val("") // Will set the input value for #example_id
gid("example_id").val("placeholder") // Will set the input value for #example_idgid("example_id").parent() // Gets the parent element of #example_idAdd event listener, usage is the same as normal. Function name stands for Add Event Listener.
gid("example_id").ael() // Will add event listener
// Full Example:
gid("example_id").ael("click", myFunction)
function myFunction(evt) {
    alert("Hello World!")
}gid("example_id").rel() // Will remove event listener
// Full Example:
gid("example_id").rel("click", myFunction)
function myFunction() {
    alert("Hello World!")
}Data Storage
            Use the localStorage API to save data to the local machine
            
        simple.save(<key>, <data>) // Saves data to keysimple.load(<key>) // Loads data from keyPage Variables
            Get current page width in pixels, updates on window resize
            
        simple.page.width // Current page width in pixelssimple.page.height // Current page height in pixelsData Manipulation/Creation
            Pick random item from array
            
        [1, 2, 3, 4, 5].sample() // Will return any one item from array"Hello World!".isUpper() // Will return false
"HELLO WORLD!".isUpper() // Will return true"Hello World!".isLower() // Will return false
"hello world!".isLower() // Will return true"".isEmpty() // Will return true
" ".isEmpty() // Will return true
"_".isEmpty() // Will return false"Hello World".invertCase() // Will return "hELLO wORLD"'{"key": "value"}'.JSONify() // Will return JSON data parsed from stringsimple.randint(min, max) // Will return integer between or of values
simple.randint(0, 1) // Will return either 0 or 1
simple.randint(0, 2) // Will return 0, 1, or 2"hello".capitalize() // Will return 'Hello'UI Tools
            Add class to element
            
        gid("example_id").classAdd("test-class-name")gid("example_id").classRemove("test-class-name")Miscellaneous
            Opens a given URL in a new tab
            
        
    simple.openURL("https://example.com") // Will open example.com in a new tab