Skip to content

Instantly share code, notes, and snippets.

View neodigm's full-sized avatar
๐Ÿ’ฏ
Product Designer โšก Interactive Storyteller

Scott C. Krause neodigm

๐Ÿ’ฏ
Product Designer โšก Interactive Storyteller
View GitHub Profile
// Automotive Dealership stock photo gallery components (Adobe ActionScript 3.0)
import com.mosesSupposes.fuse.*;
import flash.external.*;
ZigoEngine.simpleSetup(Shortcuts, PennerEasing);
ZigoEngine.EASING = 'easeOutExpo';
ZigoEngine.DURATION = 5;
ZigoEngine.OUTPUT_LEVEL = 9;
@GlauberF
GlauberF / KeyEventSimulator.js
Created April 29, 2020 10:28
A function for simulating key event in JavaScript. You just have to choose what key and keyboard event you want to simulate.
/**
* Simulate a key event.
* @param {Number} keyCode The keyCode of the key to simulate
* @param {String} type (optional) The type of event : down, up or press. The default is down
* @param {Object} modifiers (optional) An object which contains modifiers keys { ctrlKey: true, altKey: false, ...}
*/
function simulateKey (keyCode, type, modifiers) {
var evtName = (typeof(type) === "string") ? "key" + type : "keydown";
var modifier = (typeof(modifiers) === "object") ? modifier : {};
@sumitpore
sumitpore / chrome-local-storage-api.js
Last active October 7, 2024 11:02
Chrome's Local StorageArea API in Synchronous way for use in Chrome extensions. Replace 'chrome.storage.local' by 'chrome.storage.sync' if you want to use Sync StorageArea
/**
* Retrieve object from Chrome's Local StorageArea
* @param {string} key
*/
const getObjectFromLocalStorage = async function(key) {
return new Promise((resolve, reject) => {
try {
chrome.storage.local.get(key, function(value) {
resolve(value[key]);
});

Keybase proof

I hereby claim:

  • I am neodigm on github.
  • I am neodigm (https://keybase.io/neodigm) on keybase.
  • I have a public key ASDzn1bBMQ39o2wKC4ZvecfI8YsYBf2lxq2j0JBlXrprawo

To claim this, I am signing this object:

// Desc: Asynchronous recursive crawl report the total number of products by category
// Usage: catCount.init();
var catCount = (function(_d,_q){
"use strict";
let aSub = [];
console.clear();
return {
@neodigm
neodigm / html_data_attrib_2_javascript_dataset.js
Last active July 15, 2020 16:04
Convert HTML data attribute name to JS dataset name in camel case
function data2prop( sDset ){ // Convert HTML data attrib name to JS dataset name
sDset = sDset.replace("data-", "").toLowerCase();
let aDset = sDset.split(""), aDret = [], bUpper = false;
aDset.forEach( (sVal, nIx) => {
if( sVal == "-" ){
bUpper = true;
}else{
aDret.push( ( bUpper ) ? sVal.toUpperCase() : sVal );
bUpper = false;
}
@akella
akella / setup.md
Last active July 4, 2026 22:27
My Setup
@neodigm
neodigm / snackbar_toast.js
Last active January 17, 2024 06:20
DataVis ๐Ÿ‘๏ธ UX ๐Ÿญ PWA ๐Ÿ‘๏ธ ThreeJS โœจ Vue ๐Ÿš€ Svelte
// ๐ŸŒ‘๐ŸŒ’๐ŸŒ“๐ŸŒ”๐ŸŒ•๐ŸŒ–๐ŸŒ—๐ŸŒ˜๐ŸŒ‘ Infographics UX PWA Typescript Svelte ThreeJS Vue โœจ
let neodigmToast = (function(_d, eID, _q) {
let _nTimeout = 5800, _aQ = [], _eSb, _eSbText, _sTheme
let bIsInit = bIsPause = false
let _fOpen = function() {
_eSbText.innerHTML = _aQ[0].sMsg.replace("|", "<br>").replace("##", "")
_eSb.style.left = ((_d.body.clientWidth / 2) - (_eSb.clientWidth / 2)) + "px"
if( _aQ[0].sTheme ) _eSb.dataset.n55Theme = _aQ[0].sTheme
if( _sTheme ) {
_eSb.dataset.n55Theme = _sTheme
@neodigm
neodigm / multiClick.js
Created November 12, 2019 19:01
mutiClick Super Simple Vanilla JavaScript ES5 Clicker IIFE
var multiClick = (function( _d ){ // Click lots of stuff
return {
"all": function( sQuery ){
if( sQuery ){
[].slice.call( _d.querySelectorAll( sQuery ) )
.filter(function( eL ){ eL.click() })
}
}
}
@neodigm
neodigm / material_design_skin.js
Last active July 15, 2020 16:05
Another MD input box, but this one is declarative. Requires a separate CSS file. Works on IE11.
var oMDPage = ( function( _d ){ // Material Design INPUT Labels
var aInp = [], aLab = [], sBrand="", bBound = false, nCnt = -1;
function onInpFoc( _el ){ // focus
if( typeof _el.dataset.mdLabel !== "undefined" ){
var sPH = _el.getAttribute("placeholder");
if( sPH ){
_el.dataset.mdLabelPh = sPH;
_el.placeholder = "";
aLab[ _el.dataset.mdLabel ].classList.remove( "h-vs__hidden" );
}