aboutsummaryrefslogtreecommitdiff
path: root/qute/dot-config/qutebrowser/greasemonkey/whatsapp.js
blob: a7c9a42593bba9ee69e2c29edaea407c5505be00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ==UserScript==
// @name         Whatsapp quircks
// @version      1.0.0
// @description  Some Whatsapp quircks that I have to set
// @author       moreka
// @match        *://*.whatsapp.com/*
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    document.addEventListener('load', () => {
        if (document.getElementById("farsi-style") === null) {
            var style = document.createElement('style');
            style.id = "farsi-style";
            style.innerHTML = `span[data-testid="selectable-text"][dir="rtl"] span {
                font-family: "Vazirmatn RD UI" !important;
            }
            span[dir="rtl"] {
                font-family: "Vazirmatn RD UI" !important;
            }
            footer p[dir="rtl"] span {
                font-family: "Vazirmatn RD UI" !important;
            }`;
            document.head.appendChild(style);
        }
    }, true);
})();