"Create New Topic" button on mobile version for MAL

Since MAL doesn't have one, i added one.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         "Create New Topic" button on mobile version for MAL
// @namespace    https://myanimelist.net/profile/kyoyatempest
// @version      1.0
// @description  Since MAL doesn't have one, i added one.
// @author       kyoyacchi
// @match        https://myanimelist.net/forum/*
// @grant        none
// @run-at      document-end
// @icon        https://www.google.com/s2/favicons?domain=myanimelist.net&sz=64
// @license     none
// ==/UserScript==

(function() {
    'use strict';
try {
  let url = window.location.href;
  if (!url.includes("?board=")) {
    return//to prevent button appearing on some other forum posts.
  }
  let board_id = url.split("?board=")[1]

    let buton = document.createElement("a");
buton.id = "create-post";
buton.href = `https://myanimelist.net/forum/?action=post&boardid=${board_id}`
buton.style.color = "#FFFFFF";
buton.style.backgroundColor = "#0000CC";
buton.textContent = "Create New Topic";
buton.style.position = "absolute";
buton.style.left = "12px";
buton.style.border = "1px white";
buton.style.bottom = `${board_id == 4 ? "3293px" : "3330px"}`;//\⁠(⁠°⁠o⁠°⁠)⁠/
buton.style.fontSize = "12px";
buton.style.fontWeight = "bold";
let mb12 = document.querySelectorAll(".mb12");
if (!mb12 || !mb12.length) return;
mb12[2].appendChild(buton)

} catch(er) {

}
})();