您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This script will add the MAL BBCODE Editor where it is currently not enabled.
当前为
// ==UserScript== // @name MyAnimeList(MAL) - Preview BBCODE // @version 1.0.2 // @description This script will add the MAL BBCODE Editor where it is currently not enabled. // @author Cpt_mathix // @match https://myanimelist.net/* // @grant none // @run-at document-body // @namespace https://gf.qytechs.cn/users/16080 // ==/UserScript== init(); function init() { var fancyboxInitObserver = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { var fancybox = document.getElementById("fancybox-wrap"); var fancyboxInner = document.getElementById("fancybox-inner"); if (fancybox) { fancyboxInitObserver.disconnect(); var fancyboxObserver = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (fancybox.style.width !== "1000px") { fancybox.style.width = "1000px"; fancyboxInner.style.width = "980px"; } window.dispatchEvent(new Event('resize')); }); }); fancyboxObserver.observe(fancybox, { attributes: true }); } }); }); fancyboxInitObserver.observe(document.body, { childList: true }); if (document.location.href.includes("myanimelist.net/clubs")) { initClubCommentsPreview(); return; } if (document.location.href.includes("myanimelist.net/blog.php")) { initBlogCommentsPreview(); return; } if (document.location.href.includes("myanimelist.net/myblog.php")) { initBlogEntryPreview(); return; } if (document.location.href.includes("myanimelist.net/editprofile.php")) { initProfileAboutMePreview(); return; } if (document.location.href.includes("myanimelist.net/ownlist/manga")) { initEditMangaPreview(); return; } if (document.location.href.includes("myanimelist.net/ownlist/anime")) { initEditAnimePreview(); return; } } function initClubCommentsPreview() { var textarea = document.querySelector("form.form-club-user-comment textarea"); if (textarea) { textarea.classList.add("bbcode-message-editor"); textarea.rows = 15; } } function initBlogCommentsPreview() { var textarea = document.querySelector(".blog_detail_comment_wrapper form textarea"); if (textarea) { textarea.classList.add("bbcode-message-editor"); textarea.rows = 15; } } function initEditMangaPreview() { resizeDialog(); var textarea = document.getElementById("add_manga_comments"); if (textarea) { textarea.classList.add("bbcode-message-editor"); textarea.rows = 15; } } function initEditAnimePreview() { resizeDialog(); var textarea = document.getElementById("add_anime_comments"); if (textarea) { textarea.classList.add("bbcode-message-editor"); textarea.rows = 15; } } function initBlogEntryPreview() { resizeDialog(); var textarea = document.querySelector("#blogForm textarea[name=\"entry_text\""); if (textarea) { textarea.classList.add("bbcode-message-editor"); } } function initProfileAboutMePreview() { var textarea = document.querySelector("#content form textarea[name=\"profile_aboutme\""); if (textarea) { textarea.classList.add("bbcode-message-editor"); textarea.insertAdjacentHTML("afterend", "<small><b>You can also preview bbcode with: <a href='https://cptmathix.github.io/MyAnimeList-BBCODE2HTML/'>https://cptmathix.github.io/MyAnimeList-BBCODE2HTML/</a><b></small>"); } } function resizeDialog() { var dialog = document.getElementById("dialog"); if (dialog) { if (document.location.href.includes("hideLayout=1")){ var clientWidth = document.body.clientWidth; dialog.style.width = clientWidth + "px"; } else { dialog.style.width = "804px"; } } }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址