您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Converts image links on a Niconico News article page to inline images.
- // ==UserScript==
- // @name Inline images on a Niconico News article page
- // @namespace https://akinori.org
- // @description Converts image links on a Niconico News article page to inline images.
- // @author Akinori MUSHA
- // @license 2-clause BSDL
- // @include http://news.nicovideo.jp/watch/*
- // @version 1.0.0
- // @grant none
- // ==/UserScript==
- (function () {
- let links = document.querySelectorAll('#MainBody p a[href$=".jpg"]');
- for (let i = 0; i < links.length; i++) {
- let link = links[i];
- if (link.href == link.textContent) {
- link.textContent = '';
- let img = document.createElement('img');
- img.setAttribute('src', link.href);
- link.appendChild(img);
- }
- }
- })();