AMQ Readable Watching Status

Narrow the width of the answered anime titles to make the watching status indicator readable.

目前为 2023-03-09 提交的版本。查看 最新版本

// ==UserScript==
// @name            AMQ Readable Watching Status
// @namespace       https://github.com/SlashNephy
// @version         0.2.0
// @author          SlashNephy
// @description     Narrow the width of the answered anime titles to make the watching status indicator readable.
// @description:ja  解答欄の幅を狭め、視聴状況のインジケーターを読みやすくします。
// @homepage        https://scrapbox.io/slashnephy/AMQ_%E3%81%A7%E9%82%AA%E9%AD%94%E3%81%AA%E3%83%A1%E3%83%83%E3%82%BB%E3%83%BC%E3%82%B8%E3%83%80%E3%82%A4%E3%82%A2%E3%83%AD%E3%82%B0%E3%82%92%E9%9D%9E%E8%A1%A8%E7%A4%BA%E3%81%AB%E3%81%99%E3%82%8B_UserScript
// @homepageURL     https://scrapbox.io/slashnephy/AMQ_%E3%81%A7%E9%82%AA%E9%AD%94%E3%81%AA%E3%83%A1%E3%83%83%E3%82%BB%E3%83%BC%E3%82%B8%E3%83%80%E3%82%A4%E3%82%A2%E3%83%AD%E3%82%B0%E3%82%92%E9%9D%9E%E8%A1%A8%E7%A4%BA%E3%81%AB%E3%81%99%E3%82%8B_UserScript
// @icon            https://animemusicquiz.com/favicon-32x32.png
// @supportURL      https://github.com/SlashNephy/.github/issues
// @match           https://animemusicquiz.com/*
// @require         https://cdn.jsdelivr.net/gh/TheJoseph98/AMQ-Scripts@b97377730c4e8553d2dcdda7fba00f6e83d5a18a/common/amqScriptInfo.js
// @grant           unsafeWindow
// @license         MIT license
// ==/UserScript==

const awaitFor = async (predicate, timeout) => new Promise((resolve, reject) => {
    let timer;
    const interval = window.setInterval(() => {
        if (predicate()) {
            clearInterval(interval);
            clearTimeout(timer);
            resolve();
        }
    }, 500);
    if (timeout !== undefined) {
        timer = setTimeout(() => {
            clearInterval(interval);
            clearTimeout(timer);
            reject(new Error('timeout'));
        }, timeout);
    }
});

const onReady = (callback) => {
    if (document.getElementById('startPage')) {
        return;
    }
    awaitFor(() => document.getElementById('loadingScreen')?.classList.contains('hidden') === true)
        .then(callback)
        .catch(console.error);
};

onReady(() => {
    AMQ_addStyle(`
    .qpAvatarAnswerText {
      width: calc(100% - 1em);
    }

    .qpAvatarStatusInnerContainer {
      opacity: 1;
    }
  `);
    AMQ_addScriptData({
        name: 'Readable Watching Status',
        author: 'SlashNephy',
        description: 'Narrow the width of the answered anime titles to make the watching status indicator readable.',
    });
});

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址