(a, b)
| 268 | |
| 269 | // swap the position of two nodes in the DOM |
| 270 | function swapNodes(a, b) { |
| 271 | const aparent = a.parentNode; |
| 272 | const asibling = a.nextSibling === b ? a : a.nextSibling; |
| 273 | b.parentNode.insertBefore(a, b); |
| 274 | aparent.insertBefore(b, asibling); |
| 275 | } |
| 276 | |
| 277 | // reorder the help <pre>'s of all links that go left |
| 278 | function reorder(lefteslinks) { |