font-family noto android test

test only

Mint 2023.02.24.. Lásd a legutóbbi verzió

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         font-family noto android test
// @description  test only
// @namespace    font_android_test
// @author       Covenant
// @version      1.0.3.3
// @license      MIT
// @homepage
// @match        *://*/*
// @exclude      https://fonts.google.com/*
// @icon         data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxNnYxNkgweiIvPjxwYXRoIGZpbGw9IiNGMjk5MDAiIGQ9Ik0xMy41IDJIOEwxIDEzaDUuNXoiLz48cGF0aCBmaWxsPSIjMUE3M0U4IiBkPSJNOCAyaDV2MTFIOHoiLz48Y2lyY2xlIGZpbGw9IiNFQTQzMzUiIGN4PSIzLjI1IiBjeT0iNC4yNSIgcj0iMi4yNSIvPjxwYXRoIGZpbGw9IiMwRDY1MkQiIGQ9Ik0xMy4zMyAxMEwxMyAxM2MtMS42NiAwLTMtMS4zNC0zLTNzMS4zNC0zIDMtM2wuMzMgM3oiLz48cGF0aCBmaWxsPSIjMTc0RUE2IiBkPSJNMTAuNSA0LjVBMi41IDIuNSAwIDAxMTMgMmwuNDUgMi41TDEzIDdhMi41IDIuNSAwIDAxLTIuNS0yLjV6Ii8+PHBhdGggZmlsbD0iIzFBNzNFOCIgZD0iTTEzIDJhMi41IDIuNSAwIDAxMCA1Ii8+PHBhdGggZmlsbD0iIzM0QTg1MyIgZD0iTTEzIDdjMS42NiAwIDMgMS4zNCAzIDNzLTEuMzQgMy0zIDMiLz48L3N2Zz4K
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_registerMenuCommand
// @connect
// @run-at       document-end
// @noframes
// ==/UserScript==
var style;
var ary_noto_test=[["Noto Sans N","'Noto_Sans','Noto Color Emoji','Noto Sans Symbols 2','NotDef'"],
                   ["Noto Sans Mono N","'Noto_Sans_Mono','color_emoji','Noto Sans Symbols 2','NotDef'"],
                   ["Noto Sans","'Noto_Sans','Noto Color Emoji','Noto Sans Symbols 2'"],
                   ["Noto Sans Mono","'Noto_Sans_Mono','Noto Color Emoji','Noto Sans Symbols 2'"],
                   ["Noto Serif N","'Noto_Serif','Noto Emoji','Noto Sans Symbols 2','NotDef'"],
                   ["JP N","'Noto Sans','Noto Color Emoji','Noto Sans JP','NotDef'"],
                   ["JP TC N","'Noto Sans','Noto Color Emoji','Noto Sans JP','Noto Sans TC','NotDef'"],
                   ["JP SC N","'Noto Sans','Noto Color Emoji','Noto Sans JP','Noto Sans SC','NotDef'"],
                   /*["VT323 N","'VT323','Noto Color Emoji','Noto Sans Symbols 2','NotDef'"],
                   ["Yomogi N","'Yomogi','Noto Color Emoji','Noto Sans Symbols 2','NotDef'"]*/];
function create_style(innerText,class_name){
    var style=document.createElement("style");
    if(typeof class_name==='string'){style.classList.add(class_name);}
    else{
        for(let i=0; i<class_name.length; i++){style.classList.add(class_name[i]);}
    }
    style.textContent=innerText;
    document.body.appendChild(style);
    return style;
}
function css_update(fontFamily){
    console.log(style);
    style.textContent='.user_font_test{font-family: '+fontFamily+';font-weight: 100;}';
}
function font(apply_all){
    var node=document.body.querySelectorAll('*');
    for(let n = 0; n < node.length; n++){
        if(!node[n].classList.contains('user-panel-font')&&node[n].tagName!='style'){
            if(apply_all||node[n].style.fontFamily==''){
                node[n].classList.add("user_font_test");
            }
        }
    }
    console.log("font "+apply_all);
}
function main_01(){
}
(function() {
    'use strict';
    for(let i = 0; i < ary_noto_test.length; i++){
        GM_registerMenuCommand('▶'+ary_noto_test[i][0], () => {
            css_update(ary_noto_test[i][1]);
            font(false);
            window.setTimeout(( () => alert(ary_noto_test[i][0]) ), 3000);
        });
    }
    style=create_style(".user_font_test{font-family: ;font-weight: 100;}",'user_css_font_noto_test');
    var style_font_face=create_style("@font-face{font-family: 'NotDef';src: url('https://raw.githubusercontent.com/adobe-fonts/adobe-notdef/master/AND-Regular.otf');}\n",'user_css_font_face');
    style_font_face.textContent+="@font-face{font-family: 'Noto_Sans';font-weight: 100;src: local('Noto Sans Thin');}\n";
    style_font_face.textContent+="@font-face{font-family: 'Noto_Sans_Mono';font-weight: 100;src: local('Noto Sans Mono Thin');}\n";
    style_font_face.textContent+="@font-face{font-family: 'Noto_Sans_Mono';font-weight: 400;src: local('Noto Sans Mono Regular');}\n";
    style_font_face.textContent+="@font-face{font-family: 'Noto_Sans_Mono';font-weight: 900;src: local('Noto Sans Mono Black');}\n";
    style_font_face.textContent+="@font-face{font-family: 'Noto_Serif';font-weight: 100;src: local(NotoSerif-Thin);}\n";
    style_font_face.textContent+="@font-face{font-family: 'color_emoji';src: local('Apple Color Emoji'),local('Segoe UI Emoji'), local('Noto Color Emoji');}\n";
    //window.setTimeout(( () => main_01() ), 1000);
})();