Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ms Kimsible
peertube-plugin-mtcaptcha2
Commits
52dd6889
Commit
52dd6889
authored
Aug 26, 2021
by
Ms Kimsible
Browse files
Use MTCaptcha mini
parent
60fbd3a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
client/signup-client-plugin.js
View file @
52dd6889
...
@@ -20,17 +20,18 @@ function initMTC(registerHook, peertubeHelpers) {
...
@@ -20,17 +20,18 @@ function initMTC(registerHook, peertubeHelpers) {
window
.
mtcaptchaConfig
=
{
window
.
mtcaptchaConfig
=
{
'
sitekey
'
:
s
[
'
mtcaptcha-site-key
'
],
'
sitekey
'
:
s
[
'
mtcaptcha-site-key
'
],
'
render
'
:
'
explicit
'
,
'
render
'
:
'
explicit
'
,
'
widgetSize
'
:
'
mini
'
,
'
miniFormWidth
'
:
265
,
'
miniFormHeight
'
:
42
,
'
customStyle
'
:
{
'
customStyle
'
:
{
'
cardColor
'
:
'
#FAFAFA
'
,
'
cardColor
'
:
'
#FAFAFA
'
,
'
inputTextColor
'
:
'
#444444
'
,
'
cardBorder
'
:
'
#C6C6C6
'
,
'
msgTextColor
'
:
'
#777777
'
,
'
invalidMsgTextColor
'
:
'
#F74E39
'
,
'
inputBackgroundColor
'
:
'
#FAFAFA
'
,
'
inputBackgroundColor
'
:
'
#FAFAFA
'
,
'
inputBorderColor
'
:
{
'
inputBorderColor
'
:
{
'
byDefault
'
:
'
#
FAFAFA
'
,
'
byDefault
'
:
'
#
C6C6C6
'
,
'
hover
'
:
'
#
FAFAFA
'
,
'
hover
'
:
'
#
C6C6C6
'
,
'
active
'
:
'
#
FAFAFA
'
'
active
'
:
'
#
C6C6C6
'
}
}
},
},
'
verified-callback
'
:
state
=>
window
.
MTCaptchaLoadCallbackResponse
=
state
.
verifiedToken
,
'
verified-callback
'
:
state
=>
window
.
MTCaptchaLoadCallbackResponse
=
state
.
verifiedToken
,
'
renderQueue
'
:
[]
'
renderQueue
'
:
[]
...
@@ -72,6 +73,7 @@ async function insertMTCaptchaContainer (stepperSelector) {
...
@@ -72,6 +73,7 @@ async function insertMTCaptchaContainer (stepperSelector) {
const
div
=
document
.
createElement
(
'
div
'
)
const
div
=
document
.
createElement
(
'
div
'
)
div
.
id
=
`mtcaptcha-
${
Math
.
random
().
toString
(
16
).
slice
(
2
)}
`
div
.
id
=
`mtcaptcha-
${
Math
.
random
().
toString
(
16
).
slice
(
2
)}
`
div
.
classList
.
add
(
'
mtcaptcha
'
)
div
.
classList
.
add
(
'
mtcaptcha
'
)
div
.
style
=
'
width:270px;height:85px;display:flex;align-items:center;margin:auto
'
stepper
.
appendChild
(
div
)
stepper
.
appendChild
(
div
)
return
div
.
id
return
div
.
id
}
}
...
...
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