您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Makes the External Link unclickable if the bsky post was deleted because opening a deleted post is a waste of time.
当前为
// ==UserScript== // @name Miniflux detect deleted Bluesky posts // @namespace https://reader.miniflux.app/ // @version 1 // @description Makes the External Link unclickable if the bsky post was deleted because opening a deleted post is a waste of time. // @author Tehhund // @match *://*.miniflux.app/* // @icon https://www.google.com/s2/favicons?sz=64&domain=miniflux.app // @run-at document-start // @grant GM.xmlHttpRequest // @license MIT // ==/UserScript== const detect = async () => { const links = [...document.getElementsByTagName(`a`)]; for (const link of links) { if (link.href.includes(`bsky.app`)) { const repo = link.href.split(`/`)[4]; const collection = `app.bsky.richtextpost`; const rkey = link.href.split(`/`)[6]; const url = `https://bsky.social/xrpc/com.atproto.repo.getRecord?repo=${repo}&collection=app.bsky.richtextpost&rkey=${rkey}`; GM.xmlHttpRequest({ method: "GET", url: url, headers: { "User-Agent": "Mozilla/5.0", // If not specified, navigator.userAgent will be used. "Accept": "text/xml" // If not specified, browser defaults will be used. }, onload: function (response) { if (response.responseText.includes`RecordNotFound`) { const newSpan = document.createElement(`span`); newSpan.textContent = `No ${link.textContent}`; link.insertAdjacentElement(`beforebegin`, newSpan); link.remove(); } } }); } } } window.addEventListener("DOMContentLoaded", detect);