mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 06:42:25 -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 difficulty = nollamas.dataset.nollamasDifficulty;
|
||||
|
||||
console.log('challenge:', challenge);
|
||||
console.log('difficulty:', difficulty);
|
||||
console.log('challenge:', challenge); // eslint-disable-line no-console
|
||||
console.log('difficulty:', difficulty); // eslint-disable-line no-console
|
||||
|
||||
// Prepare the worker with task function.
|
||||
const worker = new Worker("/assets/dist/nollamasworker.js");
|
||||
|
|
@ -37,7 +37,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
// Set the main worker function.
|
||||
worker.onmessage = function (e) {
|
||||
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);
|
||||
url.searchParams.set('nollamas_solution', e.data.nonce);
|
||||
window.location.href = url.toString();
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
onmessage = async function(e) {
|
||||
console.log('worker started');
|
||||
console.log('worker started'); // eslint-disable-line no-console
|
||||
|
||||
const challenge = e.data.challenge;
|
||||
const textEncoder = new TextEncoder();
|
||||
|
|
@ -30,7 +30,8 @@ onmessage = async function(e) {
|
|||
const zeroPrefix = '0'.repeat(difficulty);
|
||||
|
||||
let nonce = 0;
|
||||
while (true) {
|
||||
while (true) { // eslint-disable-line no-constant-condition
|
||||
|
||||
// Create possible solution string from challenge + nonce.
|
||||
const solution = textEncoder.encode(challenge + nonce.toString());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue