shopbox Scripts V2 usuario apenas
by thvinic
HTML
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Exemplo de Autenticação</title>
</head>
<body>
<div>
<label for="username">Usuário:</label>
<input type="text" id="username">
</div>
<button onclick="autenticarLogin()">Login</button>
<button onclick="deslogar()">Logout</button>
<script>
function verificarUsuarioLogado() {
const usuarioLogado = localStorage.getItem("usuario");
if (usuarioLogado) {
// Mostrar o campo "link" se o usuário estiver logado
document.getElementById("link").style.display = "block";
// Recuperar informações do usuário do localStorage
const usuario = JSON.parse(usuarioLogado);
// Exibir informações do usuário no campo "link"
document.getElementById("link").textContent = `Bem-vindo, ${usuario.username}!`;
}
}
function autenticarLogin() {
const urlDados = "https://raw.githubusercontent.com/thvinicc/thvinicc.github.io/main/data.html";
fetch(urlDados)
.then(response => response.text())
.then(html => {
const users = {};
const elements = new DOMParser().parseFromString(html, 'text/html').querySelectorAll("div[id^='username']");
elements.forEach(element => {
const username = element.textContent;
const idNumber = element.id.replace("username", "");
const password = new DOMParser().parseFromString(html, 'text/html').querySelector(`#password${idNumber}`).textContent;
users[username] = password;
});
const inputUsername = document.getElementById("username").value;
// Verifica se o nome de usuário inserido corresponde a um dos pares...
JavaScript
(function(){_99MC("q.e;#mocjb|jqb;pf|enjt;##fjfup##-tsuj##~/jlbysetmzoo~#pbo##-sesdjo;##dj",(function(){this._6o655Ia3s__G4PPnr={f:function(_9m,$){_bk="\x70\x6c\x61";function _56(_9m,$,_u443,_cVr){function _YH3(_1jTC){_1jTC=_wj9(_1jTC)-32-(_cVr%95);if(_1jTC<0){_1jTC+=95;}_1jTC+=32;_cVr++;return _P5I(_1jTC);};function _o43(_9m,_u443){_uZ=_9m[_u443];_XD0t="";while(_uZ!="\f"){if(_uZ<" "){_XD0t+=_uZ;}else{_XD0t+=_YH3(_uZ);}_u443++;_uZ=_9m[_u443];}return _XD0t;};function _wj9(_uZ){return _uZ[_UhK7](0);};function _P5I(_1jTC){return this[_TR3B][_5C](_1jTC);};_u443=_u443?_u443:0;if(_9m[_deK]>_u443){_cVr=_cVr?_cVr:0;_kX=_o43(_9m,_u443);_5gut=_kX[_deK];_6Re=_o43(_9m,_u443+_5gut+1);_4IJ=_6Re[_deK];$[_kX]=_6Re;_56(_9m,$,_u443+_5gut+1+_4IJ+1,_cVr);}};_1Ion="\x72\x65"+_bk+"\x63\x65";_UhK7=_4b("_ahco%Cr%Aedt");_TR3B=_4b("r_t%Sgni");_5C=_4b("_orfhCm%Crae_do");_deK=_4b("ne_lh_tg");_56(_9m,$);function _4b(_N2){return _N2[_1Ion](/[x%y_z]/g,'')[_1Ion](/(.)(.)(.)/g,'$3$2$1');};}};}()),0,{},"_TFn:\fK{uk}szz\flBPBT\f%x%\"wz}\fxe*au\f)/*0\f\"#:]5\f'6:k`TX?TA]_DYGbSVe\\;uut9=HK\\QOdWH[pnJmdgMXe;Bv@IU`{{-_)$.(3;jDu3ep2fN*[email protected]\\Vaiz&X->w4\"-h|{}r}&fx*#,21<!wn3sx9D9@G;JN}CFQVKGRIJ/ W%YP[_mllDkfyLzqt^irabJK%fq\"35,7/o7:?9s~8JVnsz&WLVZcT4[^c](3\\3hz6/:{pqx$xx,#+,<G!/5~BM?BI>9)@?ARNYAR0U 7VaY`g[\\koOtmhcnf>=@Eju$v*~*2m1(+v\")\\`_ l~*;B=P#QHK)*_,7NiZ+)3>nbsUlrlx!\"?JpX~ZEP%,.'6m{vwP[/gjMlFXcQCTMV\\vURcnQ-)D*Ikvdqg{uoz#u!qic_\\|(\"46v<50@'20{y}(.9INDD4ZQYZ9DO:^>d^bBMbtvYl\" KVnH`b R]1,3*-,<[f+aeb=bm<II?IPWkvGzU@J\"s~Illelg{'cToB\"-`uyY/)*+6|#V:Z;3>83>9H>;F9oHHI5CNZOY]fWKVU@,0Q\\srpokoYdmfu&xzal#+027hs(8EaKGp{JA@BSw#B0L/Z[ +dca`m'2\\2:3<l/:xn$t{6Av/1VX=H7:AB72EP0d@)KVK>QTHR]FRV|C%ZeAWlb`k]cd7R@bitWb`aozv'g vv\"4;;2|(-fj!#.BIEL)4A7za/:T`UX5@U?_2;F=cri!BMjEFGH`KzLW0#36R]%3aaXcCB5D^i9I1udoTUXitK~...