您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Looks for RSS links on the page when there isn't a subscribe button set in the header
// ==UserScript== // @name RSS Feed Finder // @namespace DoomTay // @description Looks for RSS links on the page when there isn't a subscribe button set in the header // @version 1.0.1 // @include * // @grant none // ==/UserScript== var links = document.links; var foundLinks = []; if(!document.querySelector("link[type='application/rss+xml']") && !document.querySelector("link[type='application/atom+xml']")) { for(var i = 0; i < links.length; i++) { if(foundLinks.includes(links[i].href)) continue; if(links[i].href.includes("/feed") && links[i].href.includes("atom")) makeFeedLink(links[i],"application/atom+xml"); else if(links[i].href.includes("/rss") || links[i].href.includes(".rss") || links[i].href.includes("/feed") || links[i].href.includes(".xml")) makeFeedLink(links[i],"application/rss+xml"); } } function makeFeedLink(link,type) { var newRSSButton = document.createElement("link"); newRSSButton.rel = "alternate"; newRSSButton.type = type; newRSSButton.href = link.href; newRSSButton.title = link.textContent.trim() != "" ? link.textContent.trim() : "RSS Feed"; document.head.appendChild(newRSSButton); foundLinks.push(link.href); }