This file contains 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
if (!('indexedDB' in window)) { | |
//throw new Error('This browser doesn\'t support IndexedDB'); | |
} | |
var db; | |
const openDb = (dbName, user) => new Promise((resolve, reject) => { | |
const request = indexedDB.open(dbName); | |
var newDb = false; |
This file contains 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 ($) { | |
$.fn.fadeCss = function (action) { | |
try { | |
var defaultOptions = { | |
hideClass: 'hide', | |
fadeInClass: 'fadeIn', | |
fadeOutClass: 'fadeOut', | |
zeroOpacityClass: 'transparent', | |
fullOpacityClass: 'opaque', |
This file contains 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
export default const objHasDeepProp = (obj, deepProp) => { | |
const props = deepProp.split('.'); | |
var objToTest = obj; | |
var result = true; | |
if (!obj) { | |
return false; | |
} | |
for (let i = 0; i < props.length; i++) { |
This file contains 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
[http] | |
sslVerify = false | |
sslCAinfo = C:/Program Files/Git/usr/ssl/certs/ca-bundle.crt | |
sslCAinfo = C:/Program Files/Git/usr/ssl/certs/ca-bundle.trust.crt | |
[core] | |
autocrlf = true | |
excludesfile = C:\\Users\\bedussif\\Documents\\gitignore_global.txt | |
editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor | |
ignorecase = false | |
[user] |
This file contains 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 getRootOf(obj) { | |
var proto = Object.getPrototypeOf(obj); | |
while (!proto.hasOwnProperty('id')) { | |
proto = Object.getPrototypeOf(proto); | |
} | |
return proto; | |
} | |
var Obj = {id: 1} |
This file contains 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 shuffle(array) { | |
for(var j, x, i = array.length; i; j = parseInt(Math.random() * i), x = array[--i], array[i] = array[j], array[j] = x); | |
return array; | |
} |
This file contains 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
/** | |
* @desc returns the duration in milliseconds of a CSS transition on the element $el for the given property | |
* @param {type} $el | |
* @param {type} property = 'transform' | |
* @returns {type} | |
*/ | |
function getTransitionDuration($el, property = 'transform') { | |
return $el | |
.css('transition') | |
.split(',') |
NewerOlder