summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-09-24 23:34:58 +0200
committerRicardo Wurmus <rekado@elephly.net>2023-09-24 23:34:58 +0200
commit70b83bcb1848aa8de5533f409a36ec5ceab72dae (patch)
treee7029c313b0e1b6aa60c06360f9593a520ca5253 /static
parentd0668e9bf1e8e1d0238cf1b01e83ff24df47e2cb (diff)
js: Don't use jquery.
Diffstat (limited to 'static')
-rw-r--r--static/js/deobfuscate.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/static/js/deobfuscate.js b/static/js/deobfuscate.js
index ef8d60b..498dade 100644
--- a/static/js/deobfuscate.js
+++ b/static/js/deobfuscate.js
@@ -1,9 +1,10 @@
var deobfuscate = function(s) {
return s.split('').map(function(n){return String.fromCharCode(n.charCodeAt(0)-1);}).join('');
};
-$(document).ready(function() {
- $('.obfuscated').each(function() {
- var fixed = deobfuscate( $(this).text() );
- $(this).text(fixed);
- });
+document.addEventListener('DOMContentLoaded', function() {
+ const obfuscated = document.querySelectorAll('.obfuscated');
+ obfuscated.forEach((el) => {
+ var fixed = deobfuscate(el.innerHTML);
+ el.innerHTML = fixed;
+ });
});