diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..1412985cfe8e7990d207b31b07e41c4f5ddc3ffa --- /dev/null +++ b/package-lock.json @@ -0,0 +1,76 @@ +{ + "name": "gsper", + "version": "2.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/runtime": { + "version": "7.0.0-beta.46", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0-beta.46.tgz", + "integrity": "sha512-/3a3USMKk54BEHhDgY8rtxtaQOs4bp4aQwo6SDtdwmrXmgSgEusWuXNX5oIs/nwzmTD9o8wz2EyAjA+uHDMmJA==", + "requires": { + "core-js": "^2.5.3", + "regenerator-runtime": "^0.11.1" + } + }, + "@noderize/runtime": { + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@noderize/runtime/-/runtime-0.3.16.tgz", + "integrity": "sha512-FMDN50uhufZQCVD1cp0vqwnZ2pHvoZDX9SRvvfdcZ4Zbnj+m5b6O515Z5ZwHW5Ubr+juPE8tT/RBNIvr2IriKw==", + "requires": { + "@babel/runtime": "^7.0.0-beta.40" + } + }, + "@types/estree": { + "version": "0.0.38", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.38.tgz", + "integrity": "sha512-F/v7t1LwS4vnXuPooJQGBRKRGIoxWUTmA4VHfqjOccFsNDThD5bfUNpITive6s352O7o384wcpEaDV8rHCehDA==", + "dev": true + }, + "@types/node": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.0.6.tgz", + "integrity": "sha512-2whhQUfDHRBiZ3L54Ulyl1X+fZWbWabxPYRDAsibgOAtE6adwusD15Xv0Bw/D7cPah35Z/wKTdW3iAKsevw1uw==", + "dev": true + }, + "core-js": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", + "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==" + }, + "jasmine-core": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.1.0.tgz", + "integrity": "sha1-pHheE11d9lAk38kiSVPfWFvSdmw=", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "rollup": { + "version": "0.58.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.58.2.tgz", + "integrity": "sha512-RZVvCWm9BHOYloaE6LLiE/ibpjv1CmI8F8k0B0Cp+q1eezo3cswszJH1DN0djgzSlo0hjuuCmyeI+1XOYLl4wg==", + "dev": true, + "requires": { + "@types/estree": "0.0.38", + "@types/node": "*" + } + }, + "scrypt-async-modern": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/scrypt-async-modern/-/scrypt-async-modern-3.0.6.tgz", + "integrity": "sha512-B72/EtP/pkk8GZrbcqh807ZJJRKfpn5C6NT8/WZ7rSbQL4ug+JNk3kin4tcnbXWqAAR/gDt0IOU8Hu2KyjkfXg==", + "requires": { + "@noderize/runtime": "^0.3.11" + } + }, + "tweetnacl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz", + "integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins=" + } + } +} diff --git a/package.json b/package.json index 394cdb30e28af38962716fda271377bee932fa84..f528a253a5ecdd14c4c1400d55bb5aae6f27cf84 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "gsper", - "version": "2.0.0", + "version": "2.0.2", "description": "Ǧ'Perdu l'accès à mon compte, Ǧ'spère le retrouver", "main": "public/index.html", "scripts": { "postinstall": "node build.js", - "build":"rollup public/worker.js --format iife --file public/generated.worker.js && rollup public/main.js --format iife --file public/generated.main.js", + "build": "rollup public/worker.js --format iife --file public/generated.worker.js && rollup public/main.js --format iife --file public/generated.main.js", "test": "echo open public/test.html in your browser" }, "repository": { diff --git a/public/index.html b/public/index.html index d551f456b8ffde3a01f7b20217c7602301499ab1..2d60f5648b45aad51e2560db907faca6e6b734d1 100644 --- a/public/index.html +++ b/public/index.html @@ -29,11 +29,11 @@ <button id="compute">Gsper !</button> </div> </header> -<div id="resultat" class="pasEncore"> +<div id="resultat" class="subPage"> <h2>Ǧ'trouvé ! ǦéLéClé !</h2> <div class="gift"> <a href="https://cesium.g1.1000i100.fr/#/app/wot/2sZF6j2PkxBDNAqUde7Dgo5x3crkerZpQ4rBqqJGn8QT/1000i100" target="_blank">Ǧ'spère vous avoir été utile.<br/> - Soutenez mon travail avec un don !<br/> + Soutenez mon travail avec un don !<br/> 👤 : 1000i100 🔑 : 2sZF6j2P </a> </div> @@ -48,6 +48,16 @@ <div><span>Graine : </span><span id="resSeed"></span></div> </div> </div> +<div id="fini" class="subPage"> + <h2>Ǧ'spéré... ǦéTouTesté... ǦéPasTrouvé.</h2> + <br/> + <br/> + <p> + Ǧ'srais vous, Ǧéssérai des combinaisons plus avancées.<br/> + <br/> + <a href="https://git.duniter.org/tools/gsper#guide-dutilisation">⇉⇛⇒ Guide et documentation ⇐⇚⇇</a> + </p> +</div> <div id="lists"> <fieldset class="salt"> <legend title="dictionnaire">Liste d'identifiants secrets à tester :</legend> diff --git a/public/main.js b/public/main.js index 15287a7a49824774ec82506193212cfddd29c7f0..d1030548931576001fb056ee546bde3259f26dea 100644 --- a/public/main.js +++ b/public/main.js @@ -23,7 +23,7 @@ function combiTested(event){ document.getElementById("temps").innerHTML = `${Math.round((combi-tested)/combiPerSec)}s (${Math.round(combiPerSec)}/s)`; } if(event.data.match){ - document.getElementById("resultat").classList.remove("pasEncore"); + document.getElementById("resultat").classList.add("active"); document.getElementById("resIdSec").innerText = event.data.idSec; document.getElementById("resPass").innerText = event.data.password; document.getElementById("resPublicKey").innerText = event.data.publicKey; @@ -33,7 +33,8 @@ function combiTested(event){ } if(tested === combi) { document.getElementById("percent").innerHTML = "Fini sans résultats"; - idleStateBtn(); + document.getElementById("fini").classList.add("active"); + idleStateBtn(); } } @@ -113,3 +114,36 @@ function apply(data,funcList){ } return oldData; } + + + +/* pop-in handling */ +function bgCloseBuilder(side){ + const bgClose = document.createElement("a"); + bgClose.classList.add(`bg${side}`); + bgClose.classList.add("bgPopupClose"); + bgClose.href = "#"; + bgClose.title = "Fermer"; + return bgClose; +} +document.querySelectorAll('.subPage').forEach( popup => { + const fermer = document.createElement("a"); + fermer.classList.add("close"); + fermer.href = "#"; + fermer.title = "Fermer"; + fermer.innerHTML = "X"; + popup.appendChild(fermer); + popup.appendChild(bgCloseBuilder('Top')); + popup.appendChild(bgCloseBuilder('Left')); + popup.appendChild(bgCloseBuilder('Right')); + popup.appendChild(bgCloseBuilder('Bottom')); +} ); +document.querySelectorAll('a[href^="#"]').forEach( + link => link.addEventListener('click', + e => { + document.querySelectorAll('.subPage').forEach( section => section.classList.remove("active") ); + e.preventDefault(); + return false; + } + ) +); \ No newline at end of file diff --git a/public/style.css b/public/style.css index c4bbe5effbf6ba9457e4cbdc657485d4ab58f089..f83b43e935e72e1391faed103a3c2dd51ce46fb4 100644 --- a/public/style.css +++ b/public/style.css @@ -39,7 +39,22 @@ h1{padding-left: 3em; margin-top: 10px;} a {color: #666; text-decoration-style: dotted; text-decoration-color: #ccc;} a:hover {color: #666; text-decoration-style: solid; text-decoration-color: #ccc;} -#resultat { +.gift{ + float:right; + text-align: right; +} +.basic {margin-top: 10px;} +#advShow {margin-top: 10px;} +#advShow, #adv {opacity: 0.3;} + +#resultat{ + background-color: #efe; +} +#fini{ + background-color: #fee; +} + +.subPage { position: fixed; z-index: 2; top: 50%; @@ -48,14 +63,57 @@ a:hover {color: #666; text-decoration-style: solid; text-decoration-color: #ccc; margin-left: -500px; height: 200px; margin-top: -100px; - background-color: #efe; padding: 20px; border: 2px groove grey; + box-shadow: 0 0 50px 10px #000; + overflow: auto; + z-index: 3; + display:none; } -.gift{ - float:right; - text-align: right; + +.subPage.active { + display:block; +} +.subPage.active .close { + position: fixed; + top: 50%; + left: 50%; + padding: 6px 30px 2px; + margin-top:-100px; + margin-left:410px; + font-family: sans-serif; + font-weight: bold; + text-decoration: none; + display: block; + border: 0; + border-bottom: 1px solid transparent; + border-image: linear-gradient(to right, transparent 0%, #666 25%, #666 75%, transparent 100%) 100% 1; +} +.subPage.active .bgPopupClose { + position: fixed; + background-color: rgba(0,0,0,0.4); +} +.subPage.active .bgTop { + top: 0; + bottom: calc(50% + 100px); + left: 0; + right: 0; +} +.subPage.active .bgBottom { + top: calc(50% + 100px); + bottom: 0; + left: 0; + right: 0; +} +.subPage.active .bgLeft { + top: calc(50% - 100px); + bottom: calc(50% - 100px); + left: 0; + right: calc(50% + 500px); +} +.subPage.active .bgRight { + top: calc(50% - 100px); + bottom: calc(50% - 100px); + left: calc(50% + 500px); + right: 0; } -.basic {margin-top: 10px;} -#advShow {margin-top: 10px;} -#advShow, #adv {opacity: 0.3;}