This file contains hidden or 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( doc, dNow ){ | |
var bOk = false; | |
var urlParams = new URLSearchParams( window.location.search ); | |
if( urlParams.has( "token" ) ){ | |
var sToken = urlParams.get( "token" ); | |
var nDiff = ( dNow.getTime() - Number( sToken ) ) / 1000; | |
if( nDiff >= 3000 || isNaN( nDiff ) ){ | |
bOk = false; | |
}else{ | |
bOk = true; |
This file contains hidden or 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
// jQuery | |
$(".review").addClass("hide"); | |
// JavaScript | |
[].slice.call( document.querySelectorAll(".review") ).filter( function( _e ){ | |
_e.classList.add("hide"); | |
}); | |
This file contains hidden or 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 strict"; | |
var fLazy = (function(doc){ | |
return { "init" : function( _bMobl ){ | |
var _aE = [].slice.call( doc.querySelectorAll( "[data-lz-src]" ) ); | |
_aE.filter( function( _e ){ | |
if( _bMobl ){ // isMobile | |
if( _e.dataset.lzM ){ // data-lz-m | |
_e.src = _e.dataset.lzSrc; | |
} | |
}else{ |
This file contains hidden or 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
@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) { /*ms*/ | |
.flex__item:nth-child(2) { flex-basis: 88% } | |
} | |
@supports (display: grid) { | |
.l-productthumb>section { | |
display: grid; | |
justify-content: center; | |
grid-template-columns: repeat(auto-fill, 242px); | |
} | |
} |
This file contains hidden or 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
// JavaScript | |
[].slice.call( document.querySelectorAll(".js-mybutton") ).filter( function( _e ){ | |
_e.addEventListener("click", function( e ){ | |
document.body.dataset.brand = ( document.body.dataset.brand == "LS" ) ? "LTD" : "FF"; | |
}, true); | |
}); |
This file contains hidden or 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
// Persist Long Tail Key Words from Google SERP | |
var fLong = (function(){ | |
var _aPKW = localStorage.getItem( "gogl_ai_keywords" ); | |
if( _aPKW ){ | |
_aPKW = JSON.parse( _aPKW ); | |
}else{ | |
_aPKW = []; | |
} | |
return { | |
doit : function(){ |
This file contains hidden or 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
// Run as a Chrome Snippet | |
document.body.style = "opacity: 0.2;filter:grayscale(100%);"; |
This file contains hidden or 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
// 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{ |