Verified Commit 4e83175e authored by Thibaut Broggi's avatar Thibaut Broggi
Browse files

Add random text

    It needs more than 3 words
parent 759f240d
let cachedImages = [];
let sampleTexts = ["démocratie", "raclette", "couleurs moches"];
let canvas = document.getElementById('output');
let ctx = canvas.getContext('2d');
......@@ -131,5 +132,6 @@ document.getElementById('randomize').onclick = function(e) {
randomElement('input[name="fg-color"]').checked = true;
randomElement('input[name="font"]').checked = true;
randomElement('input[name="icon"]').checked = true;
document.getElementById('step2value').value = document.getElementById('step2value').innerText = sampleTexts[Math.trunc(Math.random() * sampleTexts.length)];
draw();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment