Skip to content

Commit

Permalink
flashTitle doc theme emoji alt thread
Browse files Browse the repository at this point in the history
  • Loading branch information
neodigm committed Nov 21, 2023
1 parent 926b8f0 commit eafe815
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions dist/neodigm55__v3_1.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ neodigmWWInterval: true,
N55_DEBUG_lOG: false,
N55_AMPM_THEME: "light",
N55_EVENT_HAPTIC: true,
N55_EVENT_FLASH_TITLE: true,
N55_FLASH_TITLE: true,
N55_GENRE_MOTIF: "neodigm", // anime artdeco casino cyberpunk expressionist graffiti noir rainforest seasonal steampunk
N55_THEME_DEFAULT: "brand",
N55_THEME_COLORS: {"brand":["EDBA08","915E00","🟧"], "primary":["92a8d1","364C75","🟦"], "secondary":["EDCED0","978284","🟫"], "success":["009473","003817","🟩"], "white":["FFFFFF","FDFDFD","⬜"], "ghost":["ffffff","000000","⬜"],
"danger":["DD4124","810000","🟥"], "warning":["F5DF4D","988200","🟨"], "info":["7BC4C4","1F6868","🟦"], "disabled":["868686","767676","⬜"], "night":["6a6a6a","242424","⬛"], "marcom":["B163A3","5F4B8B","🟪"], "party":["FF6F61","C93F60","🩷"]},
"danger":["DD4124","810000","🟥"], "warning":["F5DF4D","988200","🟨"], "info":["7BC4C4","1F6868","🟦"], "disabled":["868686","767676","⬜"], "night":["6a6a6a","242424","⬛"], "marcom":["B163A3","5F4B8B","🟪"], "party":["FF6F61","C93F60","🟪"]},
N55_APP_STATE: {"CONTEXT": "body", "FIRST_TAP": false, "ONLINE": true, "PWA_READY": false, "PWA_CONTAIN": false, "SHAKE": false, "CONTEXTMNU": false, "FOCUS": true, "AMPM": "light", "REDUCE_MOTION": true},
ROOT: document.querySelector(':root'),
N55_TYPE: "https://fonts.googleapis.com/css?family=Roboto+Condensed:wght@100;300;400|Roboto+Slab:wght@300|Roboto+Mono:wght@300|Material+Symbols+Outlined:opsz,wght,FILL,GRAD@40,300,0,0"
Expand Down Expand Up @@ -129,10 +129,11 @@ const neodigmUtils = ( ( _d ) =>{
capFirst: s => (s && s[0].toUpperCase() + s.slice(1)) || "",
genHash: ( sV ) => {sV = String(sV); return Math.abs(sV.split("").reduce((a,b) => (((a << 5) - a) + b.charCodeAt(0))|0, 0)) }, // ABS
flashTitle: ( sTheme=neodigmOpt.N55_THEME_DEFAULT, nT=4e3 )=>{ // Tab Emoji
if( neodigmOpt.N55_EVENT_FLASH_TITLE ){
if( neodigmOpt.N55_FLASH_TITLE ){
if( !document?.n55Title ) document.n55Title = document.title
document.title = neodigmOpt.N55_THEME_COLORS[ sTheme ][2] + document.n55Title
setTimeout( function(){ document.title = document.n55Title }, nT ) // TODO use alt thread
//setTimeout( function(){ document.title = document.n55Title }, nT ) // TODO use alt thread
neodigmUtils.doSetT( document.title = document.n55Title, nT ) // Call overloaded setT if FF is true (alt thread)
}
},
robinTheme: function( sTheme = Object.keys( neodigmOpt.N55_THEME_COLORS )[0] ){ // Round Robin Whole Page
Expand Down Expand Up @@ -252,7 +253,7 @@ let neodigmToast = (function(_d, eID, _q) {
if( neodigmOpt.neodigmWired4Sound && neodigmOpt.EVENT_SOUNDS ) neodigmWired4Sound.sound( 1, "QUITE" )
_eSb.classList.add("snackbar__cont--show")
if( neodigmOpt.neodigmWired4Sound ) neodigmWired4Sound.doHaptic([48, 56])
neodigmUtils.doSetT( _fClose, _nTimeout ) // Call overloaded setT if FF is true
neodigmUtils.doSetT( _fClose, _nTimeout ) // Call overloaded setT if FF is true (alt thread)
};
return {
init: function(){
Expand All @@ -264,7 +265,7 @@ let neodigmToast = (function(_d, eID, _q) {
_eSb.classList.remove("snackbar__cont--show")
_eSb.classList.add("snackbar__cont--hide")
if(_aQ.length != 0) {
neodigmUtils.doSetT( _fOpen, 1200 ) // Call overloaded setT if FF is true
neodigmUtils.doSetT( _fOpen, 1200 ) // Call overloaded setT if FF is true (alt thread)
}
_eSb.classList.remove("snackbar__cont--alt")
}
Expand Down

0 comments on commit eafe815

Please sign in to comment.