您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
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 4 // @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 // @grant none // ==/UserScript== const addLinks = () => { // Add Previous and Next above header /*const pagination = document.getElementsByClassName('pagination')[0]; document.getElementsByClassName('entry')[0].innerHTML = pagination.outerHTML + document.getElementsByClassName('entry')[0].innerHTML;*/ // Add Previous and Next fixed to bottom sides of page /*let bottomPagination = document.createElement('div'); bottomPagination.innerHTML = pagination.outerHTML; bottomPagination.innerHTML = bottomPagination.firstChild.innerHTML; bottomPagination.className += 'pagination'; bottomPagination.style.position = 'fixed'; bottomPagination.style.bottom = '0%'; bottomPagination.style.left = '.5%'; bottomPagination.style.width = '99%'; document.body.appendChild(bottomPagination);*/ // Check if Previous and Next are at the top of the main entry, and if not add them there. Unsure why Miniflux sometimes hides them. /*const entryHeader = document.getElementsByClassName('entry-header')[0]; if (entryHeader.nextElementSibling.className !== 'pagination-entry-top') { entryHeader.after(pagination); }*/ // Add Links fixed to page sides. const nextLink = document.querySelector('[rel="next"]'); if (nextLink) { const newNextLinkTop = nextLink.cloneNode(true); const newNextLinkBottom = nextLink.cloneNode(true); newNextLinkTop.style = 'position: fixed;top: 5rem;right: 0;border: 1px solid #000000;font-size: 1rem;' newNextLinkBottom.style = 'position: fixed;bottom: 5rem;right: 0;border: 1px solid #000000;font-size: 1rem;' document.body.appendChild(newNextLinkTop); document.body.appendChild(newNextLinkBottom); } const prevLink = document.querySelector('[rel="prev"]'); if (prevLink) { const newNextLinkTop = nextLink.cloneNode(true); const newNextLinkBottom = nextLink.cloneNode(true); newNextLinkTop.style = 'position: fixed;top: 5rem;right: 0;border: 1px solid #000000;font-size: 1rem;' newNextLinkBottom.style = 'position: fixed;bottom: 5rem;right: 0;border: 1px solid #000000;font-size: 1rem;' document.body.appendChild(newNextLinkTop); document.body.appendChild(newNextLinkBottom); } } window.addEventListener("DOMContentLoaded", (event) => { addLinks(); });