Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
generateur-slogans
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LQDN Adminsys
generateur-slogans
Commits
5817b7be
Verified
Commit
5817b7be
authored
Oct 31, 2017
by
Thibaut Broggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bugs on random server-side generation
parent
0b86c342
Pipeline
#1486
passed with stage
in 40 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
srv.js
srv.js
+2
-2
No files found.
srv.js
View file @
5817b7be
...
...
@@ -44,10 +44,10 @@ app.use(function(req, res, next) {
if
(
req
.
query
.
target
===
'
randomize
'
)
{
req
.
args
.
bgColor
=
bgColors
[
Math
.
floor
(
Math
.
random
()
*
bgColors
.
length
)];
do
{
req
.
args
.
fgColor
=
b
gColors
[
Math
.
floor
(
Math
.
random
()
*
fgColors
.
length
)];
req
.
args
.
fgColor
=
f
gColors
[
Math
.
floor
(
Math
.
random
()
*
fgColors
.
length
)];
}
while
(
req
.
args
.
fgColor
===
req
.
args
.
bgColor
);
req
.
args
.
text
=
_
(
sampleTexts
[
Math
.
floor
(
Math
.
random
()
*
sampleTexts
.
length
)]);
req
.
args
.
font
=
_fonts
[
Math
.
floor
(
Math
.
random
()
*
_fonts
.
length
)];
req
.
args
.
font
=
_fonts
[
Math
.
ceil
(
Math
.
random
()
*
_fonts
.
length
)];
req
.
args
.
icon
=
Math
.
ceil
(
Math
.
random
()
*
36
);
req
.
args
.
signature
=
_
(
sampleSignatures
[
Math
.
floor
(
Math
.
random
()
*
sampleSignatures
.
length
)]);
}
...
...
Write
Preview
Markdown
is supported
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