hinatazaka46-sleek

Change the look and feel for the Hinatazaka46 website.

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

// ==UserScript==
// @name            hinatazaka46-sleek
// @namespace       https://greasyfork.org/ja/users/1328592-naoqv
// @description     Change the look and feel for the Hinatazaka46 website.
// @description:ja  日向坂46のウェブサイトのルック&フィールを変更するためのユーザースクリプト
// @version         0.09
// @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/1573652/hinatazaka46-lookandfeel.js
// @require         https://update.greasyfork.org/scripts/532854/1573309/hinatazaka46-process.js
// @require         https://update.greasyfork.org/scripts/531797/1573302/hinatazaka46-cookieutils.js
// @require         https://update.greasyfork.org/scripts/531764/1573301/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
      doProcessMember();
			break;
		case "artist": // Member Detail
      doProcessMemberDetail();
			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;
		case "page":
			break;
		default:
			throw new Error(PAGE_TYPE_ERROR_MSG);
	}
}, SCRIPT_NAME);