mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:02:26 -05:00
hush now linter
This commit is contained in:
parent
6c1d0e00eb
commit
21d54e6939
2 changed files with 6 additions and 5 deletions
|
|
@ -24,8 +24,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
const challenge = nollamas.dataset.nollamasChallenge;
|
const challenge = nollamas.dataset.nollamasChallenge;
|
||||||
const difficulty = nollamas.dataset.nollamasDifficulty;
|
const difficulty = nollamas.dataset.nollamasDifficulty;
|
||||||
|
|
||||||
console.log('challenge:', challenge);
|
console.log('challenge:', challenge); // eslint-disable-line no-console
|
||||||
console.log('difficulty:', difficulty);
|
console.log('difficulty:', difficulty); // eslint-disable-line no-console
|
||||||
|
|
||||||
// Prepare the worker with task function.
|
// Prepare the worker with task function.
|
||||||
const worker = new Worker("/assets/dist/nollamasworker.js");
|
const worker = new Worker("/assets/dist/nollamasworker.js");
|
||||||
|
|
@ -37,7 +37,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
// Set the main worker function.
|
// Set the main worker function.
|
||||||
worker.onmessage = function (e) {
|
worker.onmessage = function (e) {
|
||||||
if (e.data.done) {
|
if (e.data.done) {
|
||||||
console.log('solution found for:', e.data.nonce);
|
console.log('solution found for:', e.data.nonce); // eslint-disable-line no-console
|
||||||
let url = new URL(window.location.href);
|
let url = new URL(window.location.href);
|
||||||
url.searchParams.set('nollamas_solution', e.data.nonce);
|
url.searchParams.set('nollamas_solution', e.data.nonce);
|
||||||
window.location.href = url.toString();
|
window.location.href = url.toString();
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onmessage = async function(e) {
|
onmessage = async function(e) {
|
||||||
console.log('worker started');
|
console.log('worker started'); // eslint-disable-line no-console
|
||||||
|
|
||||||
const challenge = e.data.challenge;
|
const challenge = e.data.challenge;
|
||||||
const textEncoder = new TextEncoder();
|
const textEncoder = new TextEncoder();
|
||||||
|
|
@ -30,7 +30,8 @@ onmessage = async function(e) {
|
||||||
const zeroPrefix = '0'.repeat(difficulty);
|
const zeroPrefix = '0'.repeat(difficulty);
|
||||||
|
|
||||||
let nonce = 0;
|
let nonce = 0;
|
||||||
while (true) {
|
while (true) { // eslint-disable-line no-constant-condition
|
||||||
|
|
||||||
// Create possible solution string from challenge + nonce.
|
// Create possible solution string from challenge + nonce.
|
||||||
const solution = textEncoder.encode(challenge + nonce.toString());
|
const solution = textEncoder.encode(challenge + nonce.toString());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue