From 5a5ab47edfe3b69d62dc53278c7747c00ad02484 Mon Sep 17 00:00:00 2001 From: Thibaut Broggi Date: Tue, 24 Oct 2017 13:06:09 +0200 Subject: [PATCH] Fix buttons --- static/canvas.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/canvas.js b/static/canvas.js index 5baf062..34d4d81 100644 --- a/static/canvas.js +++ b/static/canvas.js @@ -90,7 +90,7 @@ let draw = function() { ctx.fillText(fillText, width * 0.08, height * 0.2 + fontSize * 1.4); // Update download button - document.querySelector('#save-image').href = canvas.toDataURL(); + document.querySelector('#save-image > a').href = canvas.toDataURL(); // Edit URL history.replaceState('', '', window.location.pathname + '?' @@ -163,8 +163,8 @@ window.addEventListener('load', function() { document.getElementById('step2value').oninput = draw; document.getElementById('signature').oninput = draw; - // Remove server calls for random/fb./twtr buttons - let buttons = document.querySelectorAll('button.randomize, button.tweet-button, button.fb-button'); + // Remove server calls for random buttons + let buttons = document.querySelectorAll('button.randomize'); for (let i = 0; i < buttons.length; ++i) { buttons[i].type = "button"; } -- GitLab