Skip to content

Instantly share code, notes, and snippets.

@Tro95
Last active August 18, 2025 21:00
Show Gist options
  • Select an option

  • Save Tro95/0308b9b51a1966ec4d2dfe7fb423f3e8 to your computer and use it in GitHub Desktop.

Select an option

Save Tro95/0308b9b51a1966ec4d2dfe7fb423f3e8 to your computer and use it in GitHub Desktop.
Wardenreading swap next and previous chapter buttons
// ==UserScript==
// @name Wardenreading swap next and previous chapter buttons
// @namespace http://wardenreading.com/
// @version 2025-08-18
// @description Swaps the next and previous chapter buttons on wardenreading.com
// @author You
// @match https://wardenreading.com/main/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=wardenreading.com
// @grant none
// ==/UserScript==
const previous = document.getElementsByClassName('blog-item-pagination-link--prev')[0];
const previousLabel = previous.getElementsByClassName('pagination-title-wrapper')[0];
const next = document.getElementsByClassName('blog-item-pagination-link--next')[0];
const nextLabel = next.getElementsByClassName('pagination-title-wrapper')[0];
let tmp = previousLabel.innerHTML;
previousLabel.innerHTML = nextLabel.innerHTML;
nextLabel.innerHTML = tmp;
tmp = previous.getAttribute('href');
previous.setAttribute('href', next.getAttribute('href'));
next.setAttribute('href', tmp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment