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
// get-scrolls.js v1, https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollX | |
// get-scroll-x.js v1 | |
function getScrollX() { | |
return (window.pageXOffset != undefined) ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body).scrollLeft; | |
}; | |
// get-scroll-y.js v1 | |
function getScrollY() { | |
return (window.pageYOffset != undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop; | |
}; |
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
// between.js v1.1.1 | |
function between(number, a, b, orEqual = false) { | |
const min = Math.min(a, b), | |
max = Math.max(a, b) | |
if (orEqual == true) { | |
return number >= min && number <= max | |
} | |
return number > min && number < max | |
} |
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
// tSeparator.js v1 | |
function tSeparator(number, separator = '.', lastSeparator = ',', prefix = '', suffix = '') { | |
number = number.toString(); | |
let lastPart = '', | |
separatorCount = 0, | |
newNumber = ''; | |
if (number.length == 0) { | |
return '0'; | |
}; | |
if (!!number.match(/[0-9]/)) { |
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
// localStorageGetSpace.js v1, https://stackoverflow.com/questions/4391575/how-to-find-the-size-of-localstorage | |
function localStorageGetSpace(number = false) { | |
let allStrings = ''; | |
for (let key in window.localStorage) { | |
if (window.localStorage.hasOwnProperty(key)) { | |
allStrings += window.localStorage[key]; | |
}; | |
}; | |
allStrings = allStrings ? 3 + ((allStrings.length * 16) / 8192) : 0; | |
if (number == 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
/* bs4-offset.css v1.0.2 */ | |
.offset-x-0 { | |
margin-left: 0%; | |
margin-right: 0%; | |
} | |
.offset-x-1 { | |
margin-left: 8.33333333%; | |
margin-right: 8.33333333%; | |
} | |
.offset-x-2 { |
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
<!-- example - isVisibleInWindow.html v1 --> | |
<!doctype html> | |
<html lang="pt-br"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> |
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
// get-extension.js v1 | |
function getExtension(filename) { | |
if (filename.lastIndexOf('.') > -1) { | |
return filename.substring(filename.lastIndexOf('.') + 1); | |
}; | |
return ''; | |
}; |
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
// bootstrap-3-grid.js v1 | |
let bs_xs = '0px', | |
bs_xs_min = '0px', | |
bs_xs_max = '767px', | |
bs_sm = '768px', | |
bs_sm_min = '768px', | |
bs_sm_max = '991px', | |
bs_md = '992px', |
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
// notifyAPI.js v1.1, inspired by https://developer.mozilla.org/en-US/docs/Web/API/Notification/permission | |
let notifyAPI = { | |
support: function() { | |
return 'Notification' in window; | |
}, | |
permission: function() { | |
switch (Notification.permission) { | |
case 'granted': | |
return true; | |
break; |
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
/* bs-container-max-1368px.css v1.1 */ | |
.container-max-1368px { | |
width: 100%; | |
padding-right: 15px; | |
padding-left: 15px; | |
margin-right: auto; | |
margin-left: auto; | |
max-width: 1368px; | |
} | |
.container-max-1368px.no-gutters{ |