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
// reclame-aqui.js v2 | |
// https://www.reclameaqui.com.br | |
var s = ' '; | |
var $ = function(selector){ | |
return document.querySelector(selector); | |
}; | |
var $$ = function(selector){ | |
return document.querySelectorAll(selector); | |
}; | |
var url = window.location.href; |
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
// odd-or-even.js v1 | |
function oddOrEven(number_){ // 0 = even, 1 = odd | |
return number_ % 2 === 0 ? 0 : 1; | |
}; | |
// is-odd.js v1 | |
function isOdd(number_){ | |
return number_ % 2 !== 0; | |
}; | |
// is-even.js v1 | |
function isEven(number_){ |
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 randomCharacter(characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') { | |
return characters[ Math.floor(Math.random() * characters.length) ]; | |
} |
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
// random-between.js v1.1 | |
function randomBetween(min, max) { | |
const range = max + 1 - min | |
return min + Math.floor(Math.random() * range) | |
} | |
// random-between.js v2 | |
function randomBetween(min, max) { | |
const range = max + 1 - min, | |
randomValue = (window.crypto || window.msCrypto).getRandomValues(new Uint32Array(1))[0] |
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 getFontInfos(selectorOrElement){ | |
if(typeof selectorOrElement === 'string'){ | |
selectorOrElement = $(selectorOrElement); | |
}; | |
let $element = selectorOrElement; | |
let color = $element.css('color'); | |
let fontFamily = $element.css('font-family'); | |
let fontSize = $element.css('font-size'); | |
let fontStyle = $element.css('font-style'); | |
let fontWeight = $element.css('font-weight'); |
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
https://www.google.com/ (related:url) | |
https://www.sitelike.org/ | |
https://www.alexa.com/find-similar-sites/ | |
https://www.similarweb.com/ | |
https://www.findsimilarsites.com/ | |
https://www.freesiteslike.com/ | |
https://www.similarsites.com/ | |
https://www.similarsitesearch.com/ | |
https://www.similarto.us/ |
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
// array-or-obj-swap.js v1 | |
// is.js v0.9.0 | |
let toString_aOOSwap = Object.prototype.toString; | |
// is a given value Array? | |
let isArray_aOOSwap = Array.isArray || function(value) { // check native isArray first | |
return toString_aOOSwap.call(value) === '[object Array]'; | |
}; | |
// is a given value object? | |
let isObject_aOOSwap = function(value) { | |
return Object(value) === value; |
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
// disable-right-click.js v1 | |
document.addEventListener('contextmenu', function(event){ | |
event.preventDefault(); | |
}); |
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
// query-elements.js v1 | |
function getElement(query, scope) { | |
if (typeof scope === 'undefined') { | |
scope = window.document; | |
}; | |
if (typeof query === 'string') { | |
return document.querySelector(query, scope); | |
} else { | |
throw new Error('The argument "query" must be String.'); | |
}; |
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
// native-escapes.js v1 | |
let escape_ = escape('Á'); | |
console.log(escape_); | |
console.log( unescape(escape_) ); | |
let encodeURI_ = encodeURI('Á'); | |
console.log(encodeURI_); | |
console.log( decodeURI(encodeURI_) ); | |
let encodeURIComponent_ = encodeURIComponent('Á'); |