Adjust style.css path.
Adjusted the path to style.css to be dynamically set using 'data-static-path' attribute. This change allows stylesheets to be fetched from the correct path based on the consumed API.
This commit is contained in:
parent
04eacf66cd
commit
4bac5c10a0
@ -6,7 +6,7 @@
|
|||||||
<title>Title</title>
|
<title>Title</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="captcha-service-kor-elf" data-domain="http://captcha.localhost:9008" data-token=""></div>
|
<div class="captcha-service-kor-elf" data-domain="" data-static-path="./" data-token=""></div>
|
||||||
<script src="script.js" async></script>
|
<script src="script.js" async></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -6,12 +6,13 @@
|
|||||||
const style = document.createElement('link');
|
const style = document.createElement('link');
|
||||||
const domain = element.getAttribute('data-domain');
|
const domain = element.getAttribute('data-domain');
|
||||||
const token = element.getAttribute('data-token');
|
const token = element.getAttribute('data-token');
|
||||||
|
const staticPath = element.getAttribute('data-static-path');
|
||||||
|
|
||||||
let windowCaptcha = null;
|
let windowCaptcha = null;
|
||||||
|
|
||||||
style.rel = 'stylesheet';
|
style.rel = 'stylesheet';
|
||||||
style.type = 'text/css';
|
style.type = 'text/css';
|
||||||
style.href = 'style.css';
|
style.href = staticPath + '/style.css';
|
||||||
shadow.appendChild(style);
|
shadow.appendChild(style);
|
||||||
|
|
||||||
button.textContent = 'Я не робот!';
|
button.textContent = 'Я не робот!';
|
||||||
|
Loading…
Reference in New Issue
Block a user