您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Shows favicon for every link in hackernews
// ==UserScript== // @name HackerNews FavIcons // @namespace PoKeRGT // @version 1.00 // @icon https://www.google.com/s2/favicons?sz=64&domain=news.ycombinator.com // @description Shows favicon for every link in hackernews // @author PoKeRGT // @match https://news.ycombinator.com/* // @grant GM_addElement // @run-at document-end // @homepageURL https://github.com/PoKeRGT/userscripts // @license MIT // ==/UserScript== (function () { 'use strict'; for (let item of document.querySelectorAll('.titleline')) { item.style.display = "flex"; item.style.alignItems = "center"; const link = item.querySelector('a'); const domain = new URL(link.href).hostname; const imageUrl = `https://www.google.com/s2/favicons?sz=16&domain_url=${domain}`; const container = document.createElement('span'); container.style.paddingRight = '0.25em'; container.style.paddingLeft = '0.25em'; item.prepend(container); const newTabLink = document.createElement('a') newTabLink.href = link.href newTabLink.target = '_blank' container.appendChild(newTabLink) GM_addElement(newTabLink, 'img', { src: imageUrl, width: 16, height: 16 }); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址