logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git
commit: 80e631f6fd2738b00fff9f0e834778a3f658b26f
parent d92d16b076257b6ceca6bdf722d8a482fd7d8440
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  2 Mar 2023 18:44:47 +0100

javascript/sorttable.js: XHTML compatibility

Diffstat:

Mjavascript/sorttable.js6+++---
Mnotes/index.xhtml2+-
Mnotes_index.pm2+-
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/javascript/sorttable.js b/javascript/sorttable.js @@ -1,11 +1,11 @@ /* * Copyright 2007 Stuart Langridge http://www.kryogenix.org/code/browser/sorttable/ - * Copyright 2018 Haelwenn (lanodan) Monnier <contact@hacktivis.me> + * Copyright 2018, 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me> * SPDX-License-Identifier: X11 */ /* Usage: - * Add <script src="sorttable.js"></script> to your HTML pages + * Add <script src="sorttable.js"></script> to your (x)HTML pages * Add class="sortable" to any table you'd like to make sortable * See sorttable.css for an example of styling */ @@ -20,7 +20,7 @@ sorttable = { var sortableElements = document.getElementsByClassName("sortable"); Array.prototype.filter.call(sortableElements, function(sortableElement) { - if (sortableElement.nodeName == "TABLE") { sorttable.makeSortable(sortableElement); } + if (sortableElement.nodeName == "TABLE" || sortableElement.nodeName == "table") { sorttable.makeSortable(sortableElement); } }); }, diff --git a/notes/index.xhtml b/notes/index.xhtml @@ -4,7 +4,7 @@ <!--#include file="/templates/head.shtml" --> <title>Index of /notes/</title> <link rel="stylesheet" href="/css/sorttable.css?serial=2020091801"/> - <script defer="" src="/javascript/sorttable.js?serial=2020091801"></script> + <script defer="" src="/javascript/sorttable.js?serial=2023030201"></script> </head> <body> <!--#include file="/templates/en/nav.shtml" --> diff --git a/notes_index.pm b/notes_index.pm @@ -31,7 +31,7 @@ print '<!DOCTYPE html> <!--#include file="/templates/head.shtml" --> <title>Index of /notes/</title> <link rel="stylesheet" href="/css/sorttable.css?serial=2020091801"/> - <script defer="" src="/javascript/sorttable.js?serial=2020091801"></script> + <script defer="" src="/javascript/sorttable.js?serial=2023030201"></script> </head> <body> <!--#include file="/templates/en/nav.shtml" -->