Add random signature

    It only works if the user didn't chose its own signature
parent 56d771e1
let cachedImages = [];
let sampleTexts = ["arachnides", "bicyclette", "bidule", "bilboquet", "biscuit", "bitcoins", "bitte", "bollard", "cantine", "casserole", "chausse-pied", "chaloupe", "chalutier", "champignons", "chignon", "chouchen", "couleurs moches", "coton-tige", "cucurbitacée", "culotte", "démocratie", "élastique", "enzyme", "fonte", "frigogidaire", "germanium", "gousse", "gousset", "hurluberlu", "hypocondrie", "loquet", "mammouth", "marmite", "Michel Sardou", "musaraigne", "narcotype", "ornythorinque", "palette", "parc de stationnement", "pelle à tarte", "perpendicularité", "plat à tarte", "poêle", "pogne", "poireau", "polochon", "pop-corn", "poulpe", "poutrelle", "prolétariat", "protozoaire", "rateau", "sabot", "sabre laser", "semi-remorque", "soulier", "taquet", "tartenpion", "tartignol", "téléportation", "tentacules", "tractopelle", "trou noir", "vérité", "zeste"];
let sampleSignatures = ["\t", "moi\t", "les gens sympas\t", "les gens biens\t"];
let canvas = document.getElementById('output');
let ctx = canvas.getContext('2d');
......@@ -137,5 +138,7 @@ document.getElementById('randomize').onclick = function(e) {
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)];
if (document.getElementById('signature').value.match(/\t$/))
document.getElementById('signature').value = sampleSignatures[Math.trunc(Math.random() * sampleSignatures.length)];
draw();
}
Markdown is supported
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