26 lines
868 B
Plaintext
26 lines
868 B
Plaintext
<script>
|
|
function beaudar(){
|
|
if(!document.getElementById("beaudar"))return;
|
|
setTimeout(function() {
|
|
var checkbeaudar = setInterval(function () {
|
|
var el = document.getElementById("beaudar");
|
|
if (!el) return
|
|
clearInterval(checkbeaudar)
|
|
try {
|
|
el.innerHTML="";
|
|
} catch (error) {}
|
|
var script = document.createElement('script');
|
|
script.src = 'https://beaudar.lipk.org/client.js';
|
|
const keys = ['repo', 'issue-term', 'issue-number', 'theme', 'label', 'crossorigin', 'input-position', 'comment-order', 'keep-theme'];
|
|
keys.forEach((key, i) => {
|
|
if (el.attributes[key] && el.attributes[key].value) {
|
|
script.setAttribute(key, el.attributes[key].value);
|
|
}
|
|
});
|
|
el.appendChild(script);
|
|
}, 200)
|
|
});
|
|
}
|
|
beaudar();
|
|
</script>
|