route ad script through bare server

This commit is contained in:
Russell2259
2024-03-05 19:34:37 -07:00
parent 4d14a7b047
commit e9b80a0cbd
+10 -7
View File
@@ -1,7 +1,10 @@
<div id="bannerad728"></div>
<script type="module">
import { createBareClient } from 'https://esm.sh/@tomphttp/bare-client@latest/dist/index.js';
import { evalify } from '/assets/js/utils.js';
const client = createBareClient('/bare/');
eval(evalify(() => {
const window = {
...self,
@@ -21,13 +24,13 @@
};
self.adOptions = {
'key' : 'cf0bb7d0401f5ae5534ac09c2e959d20',
'format' : 'iframe',
'height' : 90,
'width' : 728,
'params' : {}
'key': 'cf0bb7d0401f5ae5534ac09c2e959d20',
'format': 'iframe',
'height': 90,
'width': 728,
'params': {}
};
{{ ad_src }}
}).replace('{{ ad_src }}', await (await fetch('outrightsham.com/cf0bb7d0401f5ae5534ac09c2e959d20/invoke.js')).text()));
</script>
}).replace('{{ ad_src }}', await (await client.fetch('//outrightsham.com/cf0bb7d0401f5ae5534ac09c2e959d20/invoke.js')).text()));
</script>