-
-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathwhatFont.js
More file actions
30 lines (28 loc) · 817 Bytes
/
whatFont.js
File metadata and controls
30 lines (28 loc) · 817 Bytes
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
30
import { UfsGlobal } from "./content-scripts/ufs_global.js";
export default {
icon: `https://www.typewolf.com/favicon.ico`,
name: {
en: "What font",
vi: "Kiểm tra font chữ",
},
description: {
en: "Check font used in webpage",
vi: "Kiểm tra xem từng phần tử trong web dùng font chữ gì",
},
pageScript: {
onClick: async function () {
// https://www.typewolf.com/type-sample
UfsGlobal.DOM.injectScriptSrc(
"https://www.typesample.com/assets/typesample.js?r=" +
Math.random() * 99999999,
(success, fail) => {
if (success) {
alert("Script loaded, now use can use WhatFont.");
} else {
alert("Inject failed, Cannot run script in this website");
}
}
);
},
},
};