aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2026-06-25 23:20:06 -0400
committerPinapelz <yukais@pinapelz.com>2026-07-06 21:32:18 -0700
commit0782f54f9ebd30ef6b89e9e9604e915fdd6be4f3 (patch)
tree1a96f7ba9c957694148da0b309df8baed76de073
parent2ab2b8717bd3390a265641d62bef1bae408875c1 (diff)
serverping inlineJS fix (ty ethan)
-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