您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Shows the dimensions of the original image together with the prompt to show it.
当前为
// ==UserScript== // @name Gelbooru Show Original Resolution on Resized Notice // @namespace http://tampermonkey.net/ // @version 1.0.0 // @description Shows the dimensions of the original image together with the prompt to show it. // @author Xerodusk // @homepage https://greasyfork.org/en/users/460331-xerodusk // @include https://gelbooru.com/index.php*page=post&s=view* // @grant none // @icon https://gelbooru.com/favicon.png // ==/UserScript== /* jshint esversion: 6 */ (function() { 'use strict'; // Get the resized status alert if exists, otherwise nothing to do const resizedNotice = document.getElementById('resized_notice'); if (!resizedNotice || resizedNotice.classList.contains('alert-info-deleted')) { return; } // Get functionally-buttons-but-presented-as-links let buttons = resizedNotice.getElementsByTagName('a'); if (buttons.length != 3) { return; } buttons = Array.from(buttons).map(button => button.cloneNode(true)); // Clear current notice while (resizedNotice.firstChild) { resizedNotice.removeChild(resizedNotice.firstChild); } // Construct new notice with extra text inserted into the middle resizedNotice.appendChild(document.createTextNode('This image has been resized. Click ')); resizedNotice.appendChild(buttons[0]); resizedNotice.appendChild(document.createTextNode(' to view the original ' + window.image.width + 'x' + window.image.height + ' image. ')); resizedNotice.appendChild(buttons[1]); resizedNotice.appendChild(document.createTextNode(' | ')); resizedNotice.appendChild(buttons[2]); resizedNotice.appendChild(document.createTextNode('.')); })();