FB RALEWAY

Change facebook default font to Raleway family

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         FB RALEWAY
// @namespace    https://greasyfork.org/en/users/346130-nightmyst
// @version      1.5
// @description  Change facebook default font to Raleway family
/* The user can sustitute any font desired. Google has many fonts
 * that can be used. Simply find the font you want and substitute.
 */
// @author       NightMyst
// @match        https://www.facebook.com/*
// @include      https://www.facebook.com/*
// @include      http://www.facebook.com/*
// @include      https://www.facebook.com/groups/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function addStyle(css) {
        var head, style;
        head = document.getElementsByTagName('head')[0];
        if (!head) { return; }
        style = document.createElement('style');
        style.type = 'text/css';
        style.innerHTML = css;
        head.appendChild(style);
    }

    addStyle('@import url(https://fonts.googleapis.com/css?family=Raleway&display=swap);'); // Set Font Family from Google Fonts
//    addStyle('._5wj- { font-family: "Raleway", sans-serif !important; font-size: 18px !important;}');
    addStyle('._2s25 { font-family: "Raleway", sans-serif !important; font-size: 16px !important;}'); // Top Navigation Text 'user' 'home' 'find friends' 'create'
    addStyle('._16ve { font-family: "Raleway", sans-serif !important; font-size: 11px !important;}'); // Icons 'photo/video' 'tag friends' 'feeling/activity'
    addStyle('._72vr { font-family: "Raleway", sans-serif !important; font-size: 14px !important;}'); // Comments +
    addStyle('._4w79 { font-family: "Raleway", sans-serif !important; font-size: 14px !important;}'); // Comment Input Text
    addStyle('._55lr { font-family: "Raleway", sans-serif !important; font-size: 10px !important;}'); // Right panel
    addStyle('._5afe { font-family: "Raleway", sans-serif !important; font-size: 12px !important;}'); // Left panel
//    addStyle('._5pbx userContent { font-family: "Raleway", sans-serif !important; font-size: 13px !important;}'); // User Content
    addStyle('.fwb { font-family: "Raleway", sans-serif !important; font-size: 14px !important;}'); // Poster's Name
    addStyle('._wpv { font-family: "Raleway", sans-serif !important; font-size: 12px !important;}'); // Poster's Group
    addStyle('._5v3q ._5pbx p { font-family: "Raleway", sans-serif !important; font-size: 16px !important;}'); // Poster's Text
    addStyle('.fbPhotosPhotoCaption { font-family: "Raleway", sans-serif !important; font-size: 12px !important;}'); // Photo Captions
//    addStyle('._4ik6 { font-family: "Raleway", sans-serif !important; font-size: 10px !important;}');
    addStyle('.nameText _3gz_ { font-family: "Raleway", sans-serif !important; font-size: 18px !important;}');
    addStyle('body { font-family: "Raleway", sans-serif !important; font-size: 12px !important;}');
    addStyle('p { font-family: "Raleway", sans-serif !important; font-size: 12px !important;}'); // Basic 'body' text
    addStyle('._5rpb { font-family: "Raleway", sans-serif !important; font-size: 18px !important;}');
})();