Skip to content

Instantly share code, notes, and snippets.

@malisipi
Last active November 21, 2023 18:51
Show Gist options
  • Select an option

  • Save malisipi/86dace546f409e1df043d26ca89aa3c3 to your computer and use it in GitHub Desktop.

Select an option

Save malisipi/86dace546f409e1df043d26ca89aa3c3 to your computer and use it in GitHub Desktop.
Force to My Styles (UserScript)
// ==UserScript==
// @name Force to Use My Styles
// @namespace http://malisipi.github.io/
// @version 0.3.4
// @description Forcing to use Noto Sans
// @author malisipi
// @match http://*/*
// @match https://*/*
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
let style_tag = document.createElement("style");
style_tag.innerHTML = `
@import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&family=Noto+Sans&family=Noto+Sans+Mono&display=swap');
* {
font-family: 'Ubuntu', 'Noto Color Emoji', sans-serif !important;
}
pre, *:is([style*="white-space"][style*="pre"]), *:is([data-testid="code-cell"]), form[action*="gist.github.com"][method="post"], .js-diff-progressive-container, .js-blob-code-container, .w3-code {
font-family: 'Ubuntu Mono', 'Noto Color Emoji', sans-serif !important;
& * {
font-family: 'Ubuntu Mono', 'Noto Color Emoji', sans-serif !important;
}
}
`;
document.head.append(style_tag);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment