aboutsummaryrefslogtreecommitdiffstats
path: root/static
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2026-06-25 23:20:06 -0400
committerlolcat <will@lolcat.ca>2026-06-25 23:20:06 -0400
commitf037ad1d7fb70811b9d67d221fc879ef8bfd136a (patch)
treebe6a85074e303ea4d0b2e881e82faeb623f6ed63 /static
parent347300cc26390917cbd3a0c1a1c8954e2e305ae6 (diff)
serverping inlineJS fix (ty ethan)
Diffstat (limited to 'static')
-rw-r--r--static/serverping.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/static/serverping.js b/static/serverping.js
index 6b680d5..992e025 100644
--- a/static/serverping.js
+++ b/static/serverping.js
@@ -80,6 +80,15 @@ document.body.insertBefore(table, quote.nextSibling);
// handle sorting clicks
var tbody = table.getElementsByTagName("tbody")[0];
+
+// server popup without inline javascript
+tbody.addEventListener('click', function(event){
+ var row = event.target.closest('.show_server');
+ if(!row) return;
+
+ show_server(row.id);
+})
+
var th = table.getElementsByTagName("th");
for(var i=0; i<th.length; i++){
@@ -343,7 +352,7 @@ function render_list(){
for(var k=0; k<sorted_list.length; k++){
- html += '<tr onclick="show_server(' + sorted_list[k].index + ');">';
+ html += '<tr class="show_server" id="' + sorted_list[k].index + '">';
for(var i=0; i<7; i++){
@@ -406,6 +415,7 @@ function render_list(){
console.log(html);
tbody.innerHTML = html;
+
}
var popup_bg = document.getElementById("popup-bg");
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage