Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
generateur-slogans
Commits
c346e242
Verified
Commit
c346e242
authored
Oct 09, 2017
by
Thibaut Broggi
Browse files
Update tweet value on image update
parent
3d2dc2b8
Pipeline
#1359
passed with stage
in 2 minutes and 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
static/canvas.js
View file @
c346e242
...
...
@@ -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"]
'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment