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 / 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!
@neodigm
neodigm / infinite_scroll_sample.html
Created Mar 20, 2019
Infinite Scroll ⚡️ Scott C. Krause, lazy load and intersection observer
View infinite_scroll_sample.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Infinite Scroll ⚡️ Scott C. Krause</title>
<style>
/* --------------------
Add your styling here
-------------------- */
.container {
View monetate_inspector.js
(function(){var a=Math.floor(((new Date).getTime()+1112009)/864E5),b=window,c=b.document,d="https://marketer.monetate.net/control/inspector/"+a+"/",e=b.__mti&&b.__mti.open;if(e)e();else if(!c.getElementById("mtInspector-script")){var f=c.getElementsByTagName("head")[0]||c.body;if(f){var g=f,h=d,i=c.createElement("link");i.href=h+"inspector.css";i.rel="stylesheet";g.insertBefore(i,g.firstChild);var j=f,k=d,l=c.createElement("script");l.src=k+"inspector.js";l.id="mtInspector-script";j.insertBefore(l,j.firstChild)}};})();
@neodigm
neodigm / canIUseWebP.js
Last active Dec 18, 2018
JavaScript WebP support detection
View canIUseWebP.js
function canIUseWebP() { // Original Author Unknown
var elem = document.createElement('canvas');
if (!!(elem.getContext && elem.getContext('2d'))) {
return elem.toDataURL('image/webp').indexOf('webp') == 0;
}
return false;
}
@neodigm
neodigm / email_popup.js
Created Dec 13, 2018
The email promo dialog script and markup are below. The markup must exist in the DOM before the JS is executed. The modal will show once every seven (7) days. The image displayed will be determined by the site brand. Clicking on the image will open the drawer and the email panel then close the reveal. If the reveal component is not on the page t…
View email_popup.js
"use strict";
// Show email promo image (branded) reveal once, every 7 days
// Open drawer to email panel when clicked
var fElmRevPromo = function( _d, _aIds ){
var _eRev = _d.getElementById( _aIds[0] ), _sBrand="LTD";
var _eRevI = _d.getElementsByClassName( _aIds[1] )[0];
return {
init: function( sBrand ){
if( sBrand && ( typeof _eRevI != "undefined") ){
@neodigm
neodigm / blinked_class.js
Last active Dec 7, 2018
Vanilla JavaScript Blink Class
View blinked_class.js
// Add and Remove a class repeatedly for a set duration for a set number of times (blinking or animating).
// This is good for blinking an element for a few seconds to attract attention to it.
var fBlinkClass = function( _sQuery, _sClass, _nItra, _nDura ){
var eChevr = document.querySelector( _sQuery ), _nCur = 0, _si;
eChevr.classList.add( _sClass );
_si = window.setInterval(function(){
if( ++_nCur <= _nItra ){
if( eChevr.classList.contains( _sClass ) ){
eChevr.classList.remove( _sClass );
}else{
@neodigm
neodigm / page_fade.js
Created Nov 19, 2018
Fade a page so that it is difficult for shoulder surfers to see. On the DL.
View page_fade.js
// Run as a Chrome Snippet
document.body.style = "opacity: 0.2;filter:grayscale(100%);";
@neodigm
neodigm / extract_long_tail_keywords_google_ai.js
Last active Nov 11, 2018
Get Long Tail Keywords from the Google Drop-down
View extract_long_tail_keywords_google_ai.js
// Persist Long Key Words from Google
var fLong = (function(){
var _aPKW = localStorage.getItem( "gogl_ai_keywords" );
if( _aPKW ){
_aPKW = JSON.parse( _aPKW );
}else{
_aPKW = [];
}
return {
doit : function(){
You can’t perform that action at this time.