feat: implement avatar caching and refactor obfuscation decoding
This commit is contained in:
parent
981c81a865
commit
285ff01303
6 changed files with 101 additions and 16 deletions
|
|
@ -45,14 +45,7 @@ import BaseLayout from '~/layouts/BaseLayout.astro';
|
|||
</BaseLayout>
|
||||
|
||||
<script>
|
||||
function decode() {
|
||||
document.querySelectorAll<HTMLElement>('[data-obf]').forEach((el) => {
|
||||
el.textContent = atob(el.dataset.obf!);
|
||||
el.removeAttribute('data-obf');
|
||||
});
|
||||
}
|
||||
decode();
|
||||
document.addEventListener('astro:page-load', decode);
|
||||
import '~/scripts/decode-obf';
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
|
|||
|
|
@ -45,14 +45,7 @@ import BaseLayout from '~/layouts/BaseLayout.astro';
|
|||
</BaseLayout>
|
||||
|
||||
<script>
|
||||
function decode() {
|
||||
document.querySelectorAll<HTMLElement>('[data-obf]').forEach((el) => {
|
||||
el.textContent = atob(el.dataset.obf!);
|
||||
el.removeAttribute('data-obf');
|
||||
});
|
||||
}
|
||||
decode();
|
||||
document.addEventListener('astro:page-load', decode);
|
||||
import '~/scripts/decode-obf';
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue