Bing Chat Font Optimize

Fixes the font in the Bing Chat

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Bing Chat Font Optimize
// @namespace    me.relicx
// @version      0.0.2
// @author       Eva1ent
// @description  Fixes the font in the Bing Chat
// @icon         https://www.bing.com/favicon.ico
// @source       https://github.com/Nicify/bing-chat-font-optimize
// @supportURL   https://github.com/Nicify/bing-chat-font-optimize/issues
// @match        https://www.bing.com/*
// @run-at       document-body
// ==/UserScript==

(function () {
  'use strict';

  function waitDOMContentLoaded() {
    return new Promise((resolve) => {
      switch (document.readyState) {
        case "interactive":
        case "complete": {
          resolve();
          break;
        }
        default: {
          window.addEventListener("DOMContentLoaded", () => resolve());
          break;
        }
      }
    });
  }
  const fontFamily = `'SF Pro Text', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`;
  const style = document.createElement("style");
  style.id = "bing-chat-font-optimize";
  style.innerHTML = `
    body {
        font-family: ${fontFamily} !important;
    }
    .cib-serp-main, .cib-serp-main *, .cib-serp-main *:before, .cib-serp-main *:after {
        --cib-font-text: ${fontFamily} !important;
    }
`;
  waitDOMContentLoaded().then(() => {
    document.head.append(style);
  });

})();