您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Enable comment folding for guests in lobsters' comment threads.
// ==UserScript== // @name Lobsters guest comment folding // @namespace https://www.github.com/aborgna/userscripts // @author aborgna // @description Enable comment folding for guests in lobsters' comment threads. // @version 1.1 // @icon https://lobste.rs/favicon.ico // @include https://lobste.rs/s/* // @match https://lobste.rs/s/* // @grant none // @require https://code.jquery.com/jquery-1.11.3.min.js // @run-at document-end // ==/UserScript== /* * Most of this code is just copied from lobsters' application.js.erb * https://github.com/jcs/lobsters */ $(".comment > .details > .byline").prepend('<a class="comment_folder"></a>'); $(document).on("click", "a.comment_folder", function() { $(this).addClass("comment_unfolder").removeClass("comment_folder"); var comment = $(this).closest(".comment"); comment.addClass("collapsed"); comment.nextAll(".comments").each(function() { $(this).addClass("collapsed"); }); }); $(document).on("click", "a.comment_unfolder", function() { $(this).addClass("comment_folder").removeClass("comment_unfolder"); var comment = $(this).closest(".comment"); comment.removeClass("collapsed"); comment.nextAll(".comments").each(function() { $(this).removeClass("collapsed"); }); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址