Remove buttons update on javascript

       It also fixes URL edition
parent af06790b
Pipeline #1456 passed with stage
in 36 seconds
...@@ -89,9 +89,6 @@ let draw = function() { ...@@ -89,9 +89,6 @@ let draw = function() {
ctx.fillStyle = fgColor; ctx.fillStyle = fgColor;
ctx.fillText(fillText, width * 0.08, height * 0.2 + fontSize * 1.4); ctx.fillText(fillText, width * 0.08, height * 0.2 + fontSize * 1.4);
// Update download button
document.querySelector('#save-image > a').href = canvas.toDataURL();
// Edit URL // Edit URL
history.replaceState('', '', window.location.pathname + '?' history.replaceState('', '', window.location.pathname + '?'
+ 'bg-color=' + encodeURIComponent(bgColor) + 'bg-color=' + encodeURIComponent(bgColor)
...@@ -101,12 +98,6 @@ let draw = function() { ...@@ -101,12 +98,6 @@ let draw = function() {
+ '&icon=' + encodeURIComponent(icon) + '&icon=' + encodeURIComponent(icon)
+ '&signature=' + encodeURIComponent(signature) + '&signature=' + encodeURIComponent(signature)
+ window.location.hash); + window.location.hash);
// Update tweet button
document.querySelector('#tweet-button a').href = 'https://twitter.com/intent/tweet?text=Soutenez La Quadrature du Net ! ' + encodeURIComponent(window.location.href.split('#')[0]);
// Update facebook button
document.querySelector('#fb-button a').href = 'https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(window.location.href.split('#')[0]);
}, false); }, false);
}); });
} }
......
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