您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Find and display RSS feed links on webpages.
当前为
// ==UserScript== // @name RSS Feed Finder // @namespace http://tampermonkey.net/ // @author iamnobody // @version 1.3 // @description Find and display RSS feed links on webpages. // @match *://*/* // @license MIT // @grant GM_setClipboard // ==/UserScript== (function() { 'use strict'; // Create and style the floating button const rssButton = document.createElement('button'); rssButton.innerHTML = '<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Feed-icon.svg/20px-Feed-icon.svg.png">'; rssButton.style.position = 'fixed'; rssButton.style.top = '20px'; rssButton.style.right = '20px'; rssButton.style.backgroundColor = 'transparent'; rssButton.style.border = 'none'; rssButton.style.cursor = 'pointer'; rssButton.style.zIndex = '9999'; document.body.appendChild(rssButton); // Function to find and display RSS feed links function findAndDisplayRSSFeeds() { const feedLinks = document.querySelectorAll('link[type="application/rss+xml"], link[type="application/atom+xml"], a[href$=".xml"]'); if (feedLinks.length > 0) { const feedList = document.createElement('ul'); feedList.style.listStyleType = 'none'; feedList.style.backgroundColor = '#ffffff'; feedList.style.padding = '10px'; feedList.style.border = '1px solid #007bff'; feedList.style.borderRadius = '5px'; feedList.style.position = 'fixed'; feedList.style.top = '50px'; feedList.style.right = '20px'; feedList.style.zIndex = '9999'; feedLinks.forEach(link => { const listItem = document.createElement('li'); listItem.textContent = link.href; feedList.appendChild(listItem); }); document.body.appendChild(feedList); } else { alert('No RSS feeds found on this page.'); } } // Add click event listener to the RSS button rssButton.addEventListener('click', function() { findAndDisplayRSSFeeds(); GM_setClipboard(window.location.href); alert('Link copied!'); }); })();