Skip to content

Instantly share code, notes, and snippets.

💭
🏖️ Inspired Problem Solver ☁ Visual Storyteller

scott krause neodigm

💭
🏖️ Inspired Problem Solver ☁ Visual Storyteller
Block or report user

Report or block neodigm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@neodigm
neodigm / multiClick.js
Created Nov 12, 2019
mutiClick Super Simple Vanilla JavaScript ES5 Clicker IIFE
View multiClick.js
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 / remove_all_bootstrap_stylesheets.js
Created Oct 29, 2019
Remove all Bootstrap CSS from a page. Useful for Tailwind migration testing. Vanilla JavaScript ES5.
View remove_all_bootstrap_stylesheets.js
var eSS = document.querySelectorAll('link[rel=stylesheet]');
for(var i=0;i<eSS.length;i++){
if( typeof eSS[i].href != "undefined" ){
if( eSS[i].href.indexOf("bootstrap") != -1 ){
eSS[i].parentNode.removeChild(eSS[i]);
}
}
}
@neodigm
neodigm / SimpleExpand.js
Created Oct 15, 2019
Simple Vanilla JavaScript Expand and Collapse (async). Summary and Details paired elements 1:1
View SimpleExpand.js
var oSimpleExpand = (function( doc ){ // Simple expand / collapse
var aSum, aDet; // Summary and Details paired elements 1:1
return {
"rebind": function(){
aSum = [].slice.call( doc.querySelectorAll("[data-expand-summary]") );
aDet = [].slice.call( doc.querySelectorAll("[data-expand-details]") );
aSum.forEach( function( aE ){
var aDecl = aE.dataset.expandSummary.split("|");
if( aDecl.length > 0 ){
aE.aDecl = aDecl;
@neodigm
neodigm / material_design_skin.js
Last active Sep 22, 2019
Another MD input box, but this one is declarative. Requires a separate CSS file. Works on IE11.
View material_design_skin.js
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" );
}
@neodigm
neodigm / tt_custom_comment.html
Created Aug 13, 2019
Override the BR stuff in the TT booking tool comment
View tt_custom_comment.html
Front End Testing
<style>p.header-description { font-size: 22px!important; font-weight: 100; color: #edba08 !important; } BR {display: none;}</style>
@neodigm
neodigm / grid_system.html
Last active Aug 5, 2019
A simple grid system based on Flexbox.
View grid_system.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>v2 standard grid system</title>
<meta charset = "UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="Description" content="Site UX interactive Prototype">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap" rel="stylesheet">
<link href="css/grid_system.css" rel="stylesheet">
View m2g_tab_click.js
"use strict"; // Act on Tab when link clicked
var oTb, oLk;
oTb = document.querySelectorAll(".tablink4")[0];
oLk = document.querySelectorAll("[href='/#tablink4']")[0];
if( oTb && oLk ){
oLk.addEventListener( "click", function(e){
oTb.click();
} );
}
@neodigm
neodigm / material_design_input.js
Last active Jun 16, 2019
Simple vanilla JavaScript Material Design INPUT element IIFE. Exception list can be class or id.
View material_design_input.js
var labelMD_default = { // Detault configuration
mode: "default",
aExcludeID: ["js-qty__input--id","js-inp-search--id","js-toplogo-slide__input--id","js-inp-topsearch--id","quickSearch-query-for-small","emailSubscribeAddressModal","emailAddressFieldId","quickSearch-query"],
aExcludeCL: ["js-eml__input--field", "js-sms__input"]
};
//var labelMD_custom = { mode: "custom" } // Custom configuration
var labelMD = ( function( _d, _g ){ // Dynamic Material Design INPUT Labels
var aInp = [], aLab = [], oCnf = {}, sBrand;
@neodigm
neodigm / ax.html
Last active Jun 16, 2019
Simple quad CSS grid layout
View ax.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>QQQQ | emoji</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html, body {
@neodigm
neodigm / isPalimdrome.js
Last active Jun 16, 2019
Palindrome test 🐱
View isPalimdrome.js
// Is TACOCAT spelled backward still TACOCAT?
// People have been asking this question for thousands of years until...
// I wrote a function in JavaScript to prove it and end the debate.
let isPalindrome = ( sIn = "tacocat" ) => ( sIn.split("").reverse().join("") === sIn );
/*
_._ _,-'""`-._
(,-.`._,'( |\`-/|
`-.-' \ )-`( , o o)
`- \`_`"'- My name is Omelette!
You can’t perform that action at this time.