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
window.onload = function() { | |
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { | |
console.log('Dispositivo Movel'); | |
} | |
} |
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
var ls = window.localStorage; | |
var array_ls = []; | |
for(x in ls){ | |
array_ls.push(x); | |
console.log(x); | |
} | |
for(i=0;i<6;i++){ | |
array_ls.pop(); |
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
//Forçando navagador a usar o https | |
console.log(window.location.href); | |
var protocol = window.location.href; | |
if (protocol.match(/http:/)){ | |
var newUrl = protocol.replace("http://","https://"); | |
window.location = newUrl; | |
}else{ | |
console.log('Protocolo seguro'); | |
} |
NewerOlder