Verified Commit c346e242 authored by Thibaut Broggi's avatar Thibaut Broggi
Browse files

Update tweet value on image update

parent 3d2dc2b8
Pipeline #1359 passed with stage
in 2 minutes and 51 seconds
......@@ -88,6 +88,8 @@ let draw = function() {
ctx.font = fontSize + 'pt ' + font;
ctx.fillStyle = fgColor;
ctx.fillText(fillText, width * 0.08, height * 0.2 + fontSize * 1.4);
// Update download button
document.querySelector('#save-image').href = canvas.toDataURL();
}, false);
});
......@@ -101,6 +103,9 @@ let draw = function() {
+ '&icon=' + encodeURIComponent(icon)
+ '&signature=' + encodeURIComponent(signature)
+ window.location.hash);
// Update tweet button
document.getElementById('tweet-button').href = 'https://twitter.com/intent/tweet?text=Soutenez La Quadrature du Net ! ' + encodeURIComponent(decodeURIComponent(window.location.href));
}
let bgColorElems = document.querySelectorAll('.colorpicker input[type="radio"], #step3 input[type="radio"], #step4 input[type="radio"]');
......
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