Add widget code

This commit is contained in:
FullGreaM 2025-12-28 15:53:59 +03:00
parent 2664cf5a3a
commit 8c96ae1782
3 changed files with 689 additions and 0 deletions

17
widget/opc-widget.html Normal file
View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>Test Element</title>
</head>
<body>
<div value="" success="false" class="opc-widget" captcha-url='http://127.0.0.1:8081/test' style='border: 1px solid; border-color: #AFAFAF; border-radius: 15px; width: 365px; padding-top: 10px; padding-left: 10px; font: 12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'>
<canvas width="350" height="350">Your browser don't support Canvas</canvas>
<!-- Required by license -->
<a href="https://git.fullgream.tech/fullgream/openpuzzle-captcha">OpenPuzzle Captcha</a>
</div>
<script type="module">
import { initOPCWidgets } from "./opc-widget.js";
initOPCWidgets();
</script>
</body>
</html>

670
widget/opc-widget.js Normal file

File diff suppressed because one or more lines are too long

2
widget/run-server.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
npx http-server .