W3C-Noto

W3C site, using Noto Sans

目前为 2017-03-17 提交的版本。查看 最新版本

// ==UserScript==
// @name        W3C-Noto
// @description W3C site, using Noto Sans
// @namespace   https://tripu.info/
// @version     0.2.0
// @include     http://w3.org/*
// @include     http://*.w3.org/*
// @include     https://w3.org/*
// @include     https://*.w3.org/*
// @license     MIT
// @supportURL  https://tripu.info/
// @author      tripu
// ==/UserScript==

console.debug('W3C-Noto [start]');

(() => {
    'use strict';
    if (document && document.getElementsByTagName && document.createElement) {
        var head = document.getElementsByTagName('head');
        if (head && 1 === head.length) {
            const link = document.createElement('link'),
                  style = document.createElement('style');
            head = head[0];
            link.setAttribute('href', '//www.w3.org/People/Antonio/noto/noto-tmp.css');
            link.setAttribute('rel', 'stylesheet');
            style.innerText = `* { font-family: 'Noto Sans', sans-serif !important; line-height: 1.5 !important; }`;
            head.appendChild(link);
            head.appendChild(style);
            console.debug('W3C-Noto [success]');
        } else
            console.debug('W3C-Noto [no head]');
    } else
        console.debug('W3C-Noto [no document]');
})();

console.debug('W3C-Noto [end]');