Miniflux add more previous and next links

Adds another Next button to Miniflux UI that doesn't jump all over the place

// ==UserScript==
// @name         Miniflux add more previous and next links
// @namespace    https://reader.miniflux.app/
// @version      16
// @description  Adds another Next button to Miniflux UI that doesn't jump all over the place
// @author       Tehhund
// @match        *://*.miniflux.app/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=miniflux.app
// @run-at       document-start
// ==/UserScript==

const addLinks = () => {
  const nextLink = document.querySelector('[rel="next"]');
  if (nextLink) {
    const newNextLink = nextLink.cloneNode(true);
    newNextLink.style.position = 'fixed';
    newNextLink.style.right = '0';
    newNextLink.style.border = '1px solid #000000';
    const newNextLinks = [];
    for (let i = 0; i < 3; i++) {
      newNextLinks[i] = newNextLink.cloneNode(true);
      newNextLinks[i].style.top = ((i + 1) * 11) + 'rem';
    }
    for (let elem of newNextLinks) {
      document.body.appendChild(elem);
    }
  }

  const prevLink = document.querySelector('[rel="prev"]');
  if (prevLink) {
    const newPrevLink = prevLink.cloneNode(true);
    newPrevLink.style.position = 'fixed';
    newPrevLink.style.left = '0';
    newPrevLink.style.border = '1px solid #000000';
    const newPrevLinks = [];
    for (let i = 0; i < 3; i++) {
      newPrevLinks[i] = newPrevLink.cloneNode(true);
      newPrevLinks[i].style.top = ((i + 1) * 11) + 'rem';
    }
    for (let elem of newPrevLinks) {
      document.body.appendChild(elem);
    }
  }
};

try { addLinks(); } catch (e) { }// If the script runs after DOMContentLoaded this will add the links. If it runs before DOMContentLoaded, this will error and the listener below will run it instead.
window.addEventListener("DOMContentLoaded", addLinks);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址