您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Check Praised Comments Using Button
// ==UserScript== // @name Check Praised Comments // @description Check Praised Comments Using Button // @namespace http://poems-and-quotes.com // @include http://www.poems-and-quotes.com/author.html?id=* // @version 1 // ==/UserScript== var zNode = document.createElement ('div'); zNode.innerHTML = '<button id="myButton" type="button">' + 'See Praised Comments</button>' ; zNode.setAttribute ('id', 'myContainer'); document.body.appendChild (zNode); //--- Activate the newly added button. document.getElementById ("myButton").addEventListener ( "click", ButtonClickAction, false ); function ButtonClickAction (zEvent) { /*--- For our dummy action, we'll just add a line of text to the top of the screen. */ var currentLocation = window.location.href; newLocation = currentLocation.replace("http://www.poems-and-quotes.com/author.html?id=", "http://www.poems-and-quotes.com/author_comments_praised.html?id="); window.location = newLocation; } //--- Style our newly added elements using CSS. GM_addStyle ( multilineStr ( function () {/*! #myContainer { position: absolute; top: 0; left: 0; font-size: 20px; margin: 5px; opacity: 0.9; z-index: 222; padding: 5px 20px; } #myButton { cursor: pointer; } #myContainer p { color: red; background: white; } */} ) ); function multilineStr (dummyFunc) { var str = dummyFunc.toString (); str = str.replace (/^[^\/]+\/\*!?/, '') // Strip function () { /*! .replace (/\s*\*\/\s*\}\s*$/, '') // Strip */ } .replace (/\/\/.+$/gm, '') // Double-slash comments wreck CSS. Strip them. ; return str; }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址