HinatazakaStyleSetting

日向坂46サイト向けスタイル設定

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/510022/1509450/HinatazakaStyleSetting.js

  1. // ==UserScript==
  2. // @name HinatazakaStyleSetting
  3. // @name:ja 日向坂サイト向けスタイル設定
  4. // @namespace naoqv.hinatazaka
  5. // @description 日向坂46サイト向けスタイル設定
  6. // @version 1.7
  7. // @match https://www.hinatazaka46.com/s/official/news/*
  8. // @match https://www.hinatazaka46.com/s/official/media/*
  9. // @icon https://cdn.hinatazaka46.com/files/14/hinata/img/favicons/favicon-32x32.png
  10. // @compatible chrome
  11. // @compatible firefox
  12. // @grant none
  13. // @license MIT
  14. // ==/UserScript==
  15.  
  16. const isMobile = () => {
  17. const userAgent = navigator.userAgent || navigator.vendor || window.opera;
  18. const mobileRegex = /Android|iPhone|iPad|iPod|BlackBerry|Windows Phone|Opera Mini|IEMobile/i;
  19. return mobileRegex.test(userAgent) || window.matchMedia("only screen and (max-width: 768px)").matches;
  20. }
  21.  
  22. const menuBarSetting = () => {
  23. const styleElem = document.createElement("style");
  24. styleElem.setAttribute("rel", "stylesheet");
  25. const styleText = `.l-header {
  26. height: 60px;
  27. }
  28. .p-header-wrap.is-fixed .p-header {
  29. height: 30px;
  30. }
  31. .c-header__logo {
  32. top: 0;
  33. }`;
  34. styleElem.textContent = styleText;
  35. document.head.appendChild(styleElem);
  36. };
  37.  
  38. const DEFAULT_CL = "#eeeeee";
  39. const DEFAULT_BG_CL = "#202040";
  40. const MENU_BG_CL ="#404070";
  41. const DFAULT_BG_CL = "#202050";
  42. const LIST_BG_BG_CL = "#202030";
  43.  
  44. const darkMode = () => {
  45. const styleElem = document.createElement("style");
  46. styleElem.setAttribute("rel", "stylesheet");
  47. const styleText = `.pages, .module-modal.js-member-filter .mordal-box {
  48. background-color: ${DEFAULT_BG_CL};
  49. }
  50. .l-header, .p-header-wrap, .p-header-wrap.is-fixed {
  51. background-color: ${MENU_BG_CL};
  52. }
  53. .c-page-breadcrumb__item a {
  54. opacity: 0.8;
  55. }
  56. .c-member__name, .c-member__name--info, .c-member__info-td__text, .c-blog-member__name, .c-blog-member__info-td__text {
  57. color: ${DEFAULT_CL};
  58. }
  59. .c-member__info-td__text a svg path {
  60. fill: ${DEFAULT_CL};
  61. }`;
  62. styleElem.textContent = styleText;
  63. document.head.appendChild(styleElem);
  64. };

QingJ © 2025

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