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>
|
||||
</head>
|
||||
<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>
|
||||
</body>
|
||||
</html>
|
@ -6,12 +6,13 @@
|
||||
const style = document.createElement('link');
|
||||
const domain = element.getAttribute('data-domain');
|
||||
const token = element.getAttribute('data-token');
|
||||
const staticPath = element.getAttribute('data-static-path');
|
||||
|
||||
let windowCaptcha = null;
|
||||
|
||||
style.rel = 'stylesheet';
|
||||
style.type = 'text/css';
|
||||
style.href = 'style.css';
|
||||
style.href = staticPath + '/style.css';
|
||||
shadow.appendChild(style);
|
||||
|
||||
button.textContent = 'Я не робот!';
|
||||
|
Loading…
Reference in New Issue
Block a user