Created
June 29, 2025 13:02
-
-
Save Cj-Malone/ebb575544c5eae856a4d0f947cfe2524 to your computer and use it in GitHub Desktop.
osm.mathmos.net Violentmonkey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name New script - mathmos.net | |
| // @namespace Violentmonkey Scripts | |
| // @match https://osm.mathmos.net/chains/ | |
| // @match https://osm.mathmos.net/chains/* | |
| // @grant none | |
| // @version 1.0 | |
| // @author - | |
| // @description 12/6/2023, 7:34:54 PM | |
| // @require https://www.kryogenix.org/code/browser/sorttable/sorttable.js | |
| // ==/UserScript== | |
| if (document.URL == "https://osm.mathmos.net/chains/") { | |
| table = document.getElementsByTagName("table")[0]; | |
| totalsRow = document.evaluate('tbody/tr[not(@class)][2]', table).iterateNext(); | |
| table.appendChild(document.createElement("tfoot")); | |
| table.getElementsByTagName("tfoot")[0].appendChild(totalsRow); | |
| } | |
| for (td of document.getElementsByClassName("num")) { | |
| if (td.textContent) { | |
| td.setAttribute("sorttable_customkey", td.textContent.replace("m", "")); | |
| } | |
| } | |
| for (table of document.getElementsByClassName("default")) { | |
| sorttable.makeSortable(table); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment