hinatazaka46-sleek

Change the look and feel for the Hinatazaka46 website.

As of 2025-04-17. See the latest version.

// ==UserScript==
// @name           hinatazaka46-sleek
// @namespace      naoqv.hinatazaka
// @description    Change the look and feel for the Hinatazaka46 website.
// @description:ja 日向坂46のウェブサイトのルック&フィールを変更するためのユーザースクリプト
// @version        0.05
// @match          https://www.hinatazaka46.com/s/official/media/*
// @match          https://www.hinatazaka46.com/s/official/news/*
// @match          https://www.hinatazaka46.com/s/official/search/*
// @match          https://www.hinatazaka46.com/s/official/artist/*
// @match          https://www.hinatazaka46.com/s/official/diary/*
// @match          https://www.hinatazaka46.com/s/official/discography/*
// @match          https://www.hinatazaka46.com/s/official/page/*
// @match          https://www.hinatazaka46.com/s/official/contents/*
// @match          https://www.hinatazaka46.com/s/official/contents_list*

// @require        https://update.greasyfork.org/scripts/532855/1572395/hinatazaka46-lookandfeel.js
// @require        https://update.greasyfork.org/scripts/532854/1572394/hinatazaka46-process.js
// @require        https://update.greasyfork.org/scripts/531797/1571875/hinatazaka46-cookieutils.js
// @require        https://update.greasyfork.org/scripts/531764/1571423/hinatazaka46-exceotionhandler.js

// @icon           https://cdn.hinatazaka46.com/files/14/hinata/img/favicons/favicon-32x32.png
// @compatible     chrome
// @compatible     firefox
// @license        MIT
// ==/UserScript==

const SCRIPT_NAME = "日向坂46";

doProcess(()=> {

  const PAGE_TYPE_ERROR_MSG = "Processing of out-of-scope pages. Check the settings @match.";

	const pageType = getPageType();

  if (isMobile()) {

    if (pageType == "formation") {

        document.appendStyle(`
          .formation_image li:hover {
            height: 60px;
            margin: -10px 0 0 0px;
            width: 60px;
    			}
          .formation_image li:hover i {
          	margin: -6px 0 0 -30px;
            font-size: larger;
    			}`
				);
    }

    return;
  }

  slimDownMenuBar();

  setHoveredFontColor('.p-menu__item a', '#5bbee5');

  let styleText;

  switch (pageType) {

    case "news":
    case "media":
      doProcessList();
      break;

    case "detail": //news/schedule
      break;
    case "search": // Member
      break;
    case "artist": // Member Detail
      break;
    case "artist/00" : // Discography

			doProcessDiscography();
      break;

    case "contents":
      break;

    case "formation":
			doProcessFormation();
      break;

    case "diary/member":
      doProcessBlog('blog_top');
      break;

    case "diary/member/list":
      doProcessBlog('blog_list');
      break;

    case "diary/detail":
      doProcessBlog('blog_detail');
      break;

    case "discography": // Discography
    case "video":
    case "aimashou":
      break;
    case "event":
      doProcessEvent();
      break;
 
    case "biography":
      break;

    case "about_fanclub":
      doProcessFc();
      break;
 
    default:
      throw new Error(PAGE_TYPE_ERROR_MSG);
  }
}, SCRIPT_NAME);