Greasy Fork

Greasy Fork is available in English.

自由帳カスタムデザイン(Feederチャット)

Feederチャットの自由帳のデザインをカスタムできるスクリプトです。

当前为 2020-06-14 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         自由帳カスタムデザイン(Feederチャット)
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Feederチャットの自由帳のデザインをカスタムできるスクリプトです。
// @author       You
// @match        *.x-feeder.info/*/
// @exclude      *.x-feeder.info/*/sp/
// @exclude      *.x-feeder.info/*/settings/**
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    /*------------------------- カスタマイズ領域 -------------------------*/
    const textColor = "lightgreen"; // 文字色
    const luminousColor = "lime"; // 光色
    const backgroundColor = "#2F3136"; // 背景色
    const headlineColor = "black"; // 自由帳の見出しの色
    const buttonColor = "gray"; // ボタンの背景色
    const inputAreaColor = "black"; // 入力欄の背景色
    /*--------------------------------------------------------------------*/
    const setCSS = () => {
        const elm = $("#sub_note_frame");
        elm.css({
            "color": textColor,
            "text-shadow": `0 0 10px ${luminousColor},0 0 15px ${luminousColor}`,
            "background": backgroundColor,
        });
        elm.find("h2").css("background", headlineColor);
        elm.find("button").css({
            "font-weight": "bold",
            "color": textColor,
            "text-shadow": `0 0 10px ${luminousColor},0 0 15px ${luminousColor}`,
            "background": buttonColor,
            "border-style": "none",
            "border-radius": "5px",
        });
        const css = {
            "color": textColor,
            "text-shadow": `0 0 10px ${luminousColor},0 0 15px ${luminousColor}`,
            "background": inputAreaColor,
        };
        elm.find("input").css(css);
        elm.find("textarea").css(css);
    }
    const clickEvent = () => {
        const elm = $("#sub_note_frame");
        elm.children().click(() => {
            setTimeout(() => {
                setCSS();
                clickEvent();
            }, 500);
        });
    }
    $("#sub_note_icn").click(() => {
        setTimeout(() => {
            clickEvent();
            setCSS();
        }, 500);
    });
    if ($("#sub_note_frame").length !== 0) {
        clickEvent();
        setCSS();
    }
})();