Skip to content

Commit

Permalink
server/tailsql: update default parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
creachadair committed Sep 17, 2023
1 parent a7bee46 commit 0422864
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions server/tailsql/static/script.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { Params, Area, Cycle, Loop } from './sprite.js';

(() => {
const query = document.getElementById('query');
const qButton = document.getElementById('send-query');
const query = document.getElementById('query');
const qButton = document.getElementById('send-query');
const dlButton = document.getElementById("dl-button");
const qform = document.getElementById('qform');
const output = document.getElementById('output');
const origin = document.location.origin;
const sources = document.getElementById('sources');
const body = document.getElementById('tsql');
const velo = 8, delay = 100, runChance = 0.01;
const qform = document.getElementById('qform');
const output = document.getElementById('output');
const origin = document.location.origin;
const sources = document.getElementById('sources');
const body = document.getElementById('tsql');

const nuts = /tailsql|squirrel|acorn/i;
const velo = 8, delay = 100, runChance = 0.03;
let hasRun = false;

const param = new Params(256, 256, 8, 8);
Expand All @@ -22,7 +24,9 @@ import { Params, Area, Cycle, Loop } from './sprite.js';

function shouldSquirrel() {
return !hasRun &&
query.value.trim().toLowerCase().includes("squirrel") &&
(query.value.trim().match(nuts) ||
new Date().toTimeString().slice(0, 5) == "16:20"
) &&
Math.random() < runChance;
}

Expand Down

0 comments on commit 0422864

Please sign in to comment.