您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a button to random jump to a story page. You need to refresh the number of stories manually.
当前为
// ==UserScript== // @name FIMFiction - Random Story // @namespace Selbi // @include http*://*fimfiction.net/* // @version 1.1 // @require http://code.jquery.com/jquery-1.11.0.min.js // @grant GM_setValue // @grant GM_getValue // @description Adds a button to random jump to a story page. You need to refresh the number of stories manually. // ==/UserScript== //GM_deleteValue("storycount"); var numberofstories = GM_getValue("storycount"); var randomstory = 0; if (numberofstories == undefined) numberofstories = "Click!"; randomstory = Math.floor(numberofstories * Math.random()); $(".inner:first a:last").after('<div class="user_drop_down_menu"><a href="/story/' + randomstory + '" id="randomstoryButton" class="button"><i class="fa fa-book"></i><span>Random Story</span></a><div class="menu_list"><a href="javascript:void()" class="button" id="refbtn"><i class="fa fa-refresh"></i><span>Refresh (' + numberofstories + ')</span></a></div></div>'); $("#refbtn").click(function() { $("#refbtn").html('<i class="fa fa-refresh"></i><span>Refreshing...</span>'); $.get("//www.fimfiction.net/stories/latest", function(source) { var newstories = $(".views:first", source).attr("data-story"); if (newstories > numberofstories || newstories.length > numberofstories.length) { numberofstories = newstories; GM_setValue("storycount", numberofstories); } randomstory = Math.floor(numberofstories * Math.random()); $("#randomstoryButton").attr("href", '/story/' + randomstory); $("#refbtn").html('<i class="fa fa-refresh"></i><span>Refresh (' + numberofstories + ')</span>'); }); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址