您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
insert or delete line breaks
当前为
// ==UserScript== // @name ao3 adjust line breaks // @namespace https://greasyfork.org/en/users/36620 // @version 1.0 // @description insert or delete line breaks // @author scriptfairy // @include /https?://archiveofourown\.org/works/\d+/ // @grant none // ==/UserScript== (function($) { function doubleBreak() { var Break = $('#chapters').html().replace(/<br>/g,'<br><br>'); $('#chapters').html(Break); } function deSpace() { $('<style>').text('#chapters br+br {display:none;}').appendTo($('head')); var nbsp = $('#chapters').html().replace(/ /g, ' '); $('#chapters').html(nbsp); } $('<style>').text('.text-spacing {float: right; font-size: small; padding: 10px;}').appendTo($('head')); $('#chapters').before('<div class="text-spacing"><a class="double-break">insert line breaks</a> | <a class="de-space">remove line breaks</a></div>'); $('.text-spacing .double-break').click(function() { doubleBreak(); }); $('.text-spacing .de-space').click(function() { deSpace(); }); })(window.jQuery);