summaryrefslogtreecommitdiff
path: root/static/userscripts/unvip.user.js
blob: e5017cbd544e66f8a5aff4c079dbc9038913e403 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// ==UserScript==
// @name        UnVIP
// @author      Anon
// @namespace   http://textboard.org
// @description View the thread list in update order regardless of VIPs
// @version     1
// @match       *://textboard.org/*
// @grant       none
// ==/UserScript==
(function() {
  'use strict';
  const tbody = document.getElementsByTagName ("tbody") [0]
  const rows = Array.from (tbody.children)
  const upd = e => e.children [3].children [0].textContent
  rows.sort ((a, b) => {var u = upd (a); var v = upd (b); return u < v ? 1 : u > v ? -1 : 0; })
  tbody.innerHTML = ""
  rows.forEach (e => tbody.appendChild (e))
})();