Permalink
Browse files

Fix gcaptcha in badges/iframe mode (#353)

  • Loading branch information...
chromy authored and rauchg committed Dec 19, 2017
1 parent f3e3b3d commit 7962ff00a6b3563362fccea6e066572321c9e000
Showing with 12 additions and 2 deletions.
  1. +5 −2 lib/index.js
  2. +7 −0 lib/splash.js
View
@@ -245,9 +245,12 @@ export default function slackin ({
let { name } = slack.org
let { active, total } = slack.users
if (!name) return res.send(404)
let dom = splash({ coc, path, name, org, channels, active, total, large, iframe: true })
let page = dom('html',
dom("script src=https://www.google.com/recaptcha/api.js"),
splash({ coc, path, name, org, channels, active, total, large, iframe: true, gcaptcha_sitekey })
)
res.type('html')
res.send(dom.toHTML())
res.send(page.toHTML())
})
app.get('/.well-known/acme-challenge/:id', (req, res) => {
View
@@ -342,5 +342,12 @@ function style ({ logo, active, large, iframe } = {}){
})
}
if (iframe) {
css.add('.g-recaptcha', {
'transform': 'scale(0.76)',
'transform-origin': '0 0',
})
}
return css
}

0 comments on commit 7962ff0

Please sign in to comment.