Created
April 26, 2025 06:15
-
-
Save korrio/569b8f27f3bb714f9526b8a8ddcfc1a1 to your computer and use it in GitHub Desktop.
Revisions
-
korrio created this gist
Apr 26, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ // นำเข้า Google Font Kanit let fontLink = document.createElement('link'); fontLink.href = 'https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;700&display=swap'; fontLink.rel = 'stylesheet'; document.head.appendChild(fontLink); // สร้าง style element ใหม่ let styleElement = document.createElement('style'); styleElement.textContent = ` * { font-family: 'Kanit', sans-serif !important; } `; document.head.appendChild(styleElement); console.log('เปลี่ยนฟอนต์เป็น Kanit เรียบร้อยแล้ว');