This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This snippet when executed in the browser will log a valid JSON-LD FAQ rich snippet | |
// derived from the existing HTML FAQ. | |
// www.theScottKrause.com | |
const jOut = {"@context": "https://schema.org", "@type": "FAQPage","mainEntity": []} | |
const aelQs = [ ... document.querySelectorAll(".l-faq") ] | |
aelQs.forEach(function( elFAQ ){ | |
let elQ = elFAQ.querySelector("summary") | |
let elA = elFAQ.querySelector("p") | |
let oOut = {"@type": "Question", "name": "##Q##", "acceptedAnswer": {"@type": "Answer", "text": "##A##" }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Clear the Cache | |
caches.keys().then((keyList) => | |
Promise.all( | |
keyList.map((key) => { | |
return caches.delete(key); | |
}) | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
use | |
(min-aspect-ratio: 13/9) | |
(max-aspect-ratio: 13/9) | |
instead of | |
(orientation : landscape) | |
(orientation : portrait) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function testUniqueChars(text) { | |
// www.theScottKrause.com | |
const aDucks = Array.from(new Set(Array.from(text))); | |
return text.length == aDucks.length; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener("keyup", function( ev ){ | |
let elKey = null | |
let sKeyVal = ev.key.toLowerCase() | |
if( sKeyVal ){ | |
if( sKeyVal == "backspace" ) sKeyVal = "bs" | |
if( sKeyVal == "enter" ) sKeyVal = "cr" | |
elKey = WrdKey.getKeyEl( sKeyVal ) | |
if( elKey ){ // Simulate Tap | |
const evMD = new MouseEvent('mousedown', {view: window, bubbles: true, cancelable: true }) | |
const evMU = new MouseEvent('mouseup', {view: window, bubbles: true, cancelable: true }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- phpMyAdmin SQL Dump | |
-- version 4.9.7 | |
-- https://www.phpmyadmin.net/ | |
-- | |
-- Host: localhost | |
-- Generation Time: Feb 09, 2022 at 11:40 AM | |
-- Server version: 10.3.29-MariaDB | |
-- PHP Version: 7.4.9 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var simuClick = function (elem) { | |
var evt = new MouseEvent("click", { | |
bubbles: true, | |
cancelable: true, | |
view: window | |
}); | |
var canceled = !elem.dispatchEvent(evt); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var limitGraphics = (function( _d, _q ){ | |
var aImgs = _d.querySelectorAll( _q ); | |
if( aImgs.length >= 75 ) window.stop(); | |
})(document, "[src*=graphics-prod"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let aTiny = {"a":"ᵃ","b":"ᵇ","c":"ᶜ","d":"ᵈ","e":"ᵉ","f":"ᶠ","g":"ᵍ","h":"ʰ","i":"ᶦ","j":"ʲ","k":"ᵏ","l":"ᶫ","m":"ᵐ","n":"ᶰ","o":"ᵒ","p":"ᵖ","q":"ᑫ","r":"ʳ","s":"ˢ","t":"ᵗ","u":"ᵘ","v":"ᵛ","w":"ʷ","x":"ˣ","y":"ʸ","z":"ᶻ","A":"ᴬ","B":"ᴮ","C":"ᶜ","D":"ᴰ","E":"ᴱ","F":"ᶠ","G":"ᴳ","H":"ᴴ","I":"ᴵ","J":"ᴶ","K":"ᴷ","L":"ᴸ","M":"ᴹ","N":"ᴺ","O":"ᴼ","P":"ᴾ","Q":"ᑫ","R":"ᴿ","S":"ˢ","T":"ᵀ","U":"ᵁ","V":"ⱽ","W":"ᵂ","X":"ˣ","Y":"ʸ","Z":"ᶻ","`":"`","~":"~","!":"﹗","@":"@","#":"#","$":"﹩","%":"﹪","^":"^","&":"﹠","*":"﹡","(":"⁽",")":"⁾","_":"⁻","-":"⁻","=":"⁼","+":"+","{":"{","[":"[","}":"}","]":"]",":":"﹕",";":"﹔","?":"﹖"}; | |
let doTinyCaption = ( (_d, _q, _t) => { // Inject Tiny type | |
let aTinyCnt = [..._d.querySelectorAll( _q )]; | |
if( aTinyCnt ){ setTimeout( ()=>{ doTinyCaption.tick(); }, 32); } | |
return { | |
"tick": ()=>{ | |
let sMU = ""; | |
aTinyCnt.forEach( (eVivCnt) => { | |
if(eVivCnt.atTiny !== eVivCnt.dataset.atTiny){ // Data atr changed | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//. Parent Component | |
provide() { | |
return { | |
cyRef: this.cytoRef, | |
obsId: this.obsId, | |
hostname: () => this.reactiveHostname | |
} | |
} | |
//. Child Component |