mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
Fix mismerge
This commit is contained in:
parent
dfbe3dbc84
commit
0b0412786f
3 changed files with 9 additions and 8 deletions
|
@ -1,18 +1,19 @@
|
|||
import { assertNotNull } from './utils/assert';
|
||||
import { delegate, leftClick } from './utils/events';
|
||||
import { clearEl, makeEl } from './utils/dom';
|
||||
|
||||
function insertCaptcha(_event, target) {
|
||||
const { parentNode, dataset: { sitekey } } = target;
|
||||
function insertCaptcha(_event: Event, target: HTMLInputElement) {
|
||||
const parentElement = assertNotNull(target.parentElement);
|
||||
|
||||
const script = makeEl('script', {src: 'https://hcaptcha.com/1/api.js', async: true, defer: true});
|
||||
const frame = makeEl('div', {className: 'h-captcha'});
|
||||
|
||||
frame.dataset.sitekey = sitekey;
|
||||
frame.dataset.sitekey = target.dataset.sitekey;
|
||||
|
||||
clearEl(parentNode);
|
||||
clearEl(parentElement);
|
||||
|
||||
parentNode.insertAdjacentElement('beforeend', frame);
|
||||
parentNode.insertAdjacentElement('beforeend', script);
|
||||
parentElement.insertAdjacentElement('beforeend', frame);
|
||||
parentElement.insertAdjacentElement('beforeend', script);
|
||||
}
|
||||
|
||||
export function bindCaptchaLinks() {
|
||||
|
|
|
@ -39,7 +39,7 @@ export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
|
|||
cssCodeSplit: true,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
'js/app': './js/app.js',
|
||||
'js/app': './js/app.ts',
|
||||
...Object.fromEntries(themes)
|
||||
},
|
||||
output: {
|
||||
|
|
|
@ -23,7 +23,7 @@ html lang="en"
|
|||
|
||||
= vite_hmr? do
|
||||
script type="module" src="http://localhost:5173/@vite/client"
|
||||
script type="module" src="http://localhost:5173/js/app.js"
|
||||
script type="module" src="http://localhost:5173/js/app.ts"
|
||||
- else
|
||||
script type="text/javascript" src=~p"/js/app.js" async="async"
|
||||
= render PhilomenaWeb.LayoutView, "_opengraph.html", assigns
|
||||
|
|
Loading…
Reference in a new issue