From cade2e5c365053c760afa18ae54b8d9e1eb7caa3 Mon Sep 17 00:00:00 2001 From: Dragos <86549690+dragos-efy@users.noreply.github.com> Date: Wed, 28 Sep 2022 21:12:32 +0300 Subject: [PATCH 1/3] Better security, Introduce efy modules, Webkit support --- efy/efy.js | 391 ++++++++++++++++++++++++++--------------------------- 1 file changed, 192 insertions(+), 199 deletions(-) diff --git a/efy/efy.js b/efy/efy.js index 23afc1be..30c08b8a 100644 --- a/efy/efy.js +++ b/efy/efy.js @@ -1,209 +1,211 @@ -/*EFY UI 2022.09.11*/ let e$ = document.querySelector.bind(document), e$all = document.querySelectorAll.bind(document), e$create = document.createElement.bind(document), e$body, e$root; window.onload =async ()=>{ e$root = e$(":root"), e$body = e$("body"); +/*EFY UI 2022.09.28*/ let $ = document.querySelector.bind(document), $all = document.querySelectorAll.bind(document), $create = document.createElement.bind(document), $body, $root, $efy_module, +/*Append: Where, Element*/ $append = (where, el) =>{ where.appendChild(el)}, +/*Insert: Where, Position, Element*/ $insert = (where, pos, el) =>{ where.insertAdjacentElement(pos,el)}, +/*Get CSS Property*/ $css_prop = (a) =>{ return getComputedStyle($root).getPropertyValue(a).replaceAll(' ','')}, +/*Add: Element, {Attributes}, [Children, Text] (optional)*/ $add = (el, atb = {}, cld = []) => { const x = $create(el); + for (let a = Object.keys(atb), b= Object.values(atb), i = 0; i < a.length; i++){ x.setAttribute(a[i], b[i])} + cld.forEach(c => { if(!c) return; const cd = (typeof c === 'string') ? document.createTextNode(c) : c; x.appendChild(cd) }) +return x}, +/*Cursor FN*/ cursor_fn = (e) =>{let x = $('[efy_cursor]'); x.style.left = e.pageX + 'px'; x.style.top = e.pageY + 'px'}; -/*Check LocalStorage*/ try {let x = 'LS'; localStorage.setItem(x, x); let y = localStorage.getItem(x); localStorage.removeItem(x); if (x !== y) {throw new Error();}} catch (exception) {e$('body').innerHTML = `
You can block 3rd party cookies, no worries, Privacy matters! But please allow 1st party cookies in your browser's settings. EFYdoesn't use cookies or track you, but the settings related to LocalStorage are grouped as "cookies", although different. Have fun! 🥳
Radius
- -You might have to click / tap on the ssl / lock icon on your browser & allow sounds, to hear them automatically.
-Maybe check your internet connection?