Country_Emojis.user.js
· 947 B · JavaScript
Raw
// ==UserScript==
// @name Country Emojis
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match */*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
let style=`
@font-face {
font-family: NotoColorEmojiLimited;
unicode-range: U+1F1E6-1F1FF;
src: url(https://raw.githubusercontent.com/googlefonts/noto-emoji/main/fonts/NotoColorEmoji.ttf);
font-display: swap;
}
.emoji {
font-family: 'NotoColorEmojiLimited';
}
`
let s;
document.head.append(s=document.createElement('style'))
s.innerHTML=style
for(let sheet of document.styleSheets){
try{
for(let rule of sheet.cssRules){
try {
if(rule.style.fontFamily.length>0){
rule.style.fontFamily='NotoColorEmojiLimited,'+rule.style.fontFamily
}
} catch (error) {
}
}
}catch(error){}
}
1 | // ==UserScript== |
2 | // @name Country Emojis |
3 | // @namespace http://tampermonkey.net/ |
4 | // @version 0.1 |
5 | // @description try to take over the world! |
6 | // @author You |
7 | // @match */* |
8 | // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== |
9 | // @grant none |
10 | // ==/UserScript== |
11 | |
12 | let style=` |
13 | @font-face { |
14 | font-family: NotoColorEmojiLimited; |
15 | unicode-range: U+1F1E6-1F1FF; |
16 | src: url(https://raw.githubusercontent.com/googlefonts/noto-emoji/main/fonts/NotoColorEmoji.ttf); |
17 | font-display: swap; |
18 | } |
19 | .emoji { |
20 | font-family: 'NotoColorEmojiLimited'; |
21 | } |
22 | ` |
23 | let s; |
24 | document.head.append(s=document.createElement('style')) |
25 | s.innerHTML=style |
26 | for(let sheet of document.styleSheets){ |
27 | try{ |
28 | for(let rule of sheet.cssRules){ |
29 | try { |
30 | if(rule.style.fontFamily.length>0){ |
31 | rule.style.fontFamily='NotoColorEmojiLimited,'+rule.style.fontFamily |
32 | } |
33 | } catch (error) { |
34 | |
35 | } |
36 | } |
37 | }catch(error){} |
38 | } |
39 |