งานอื่น ๆ
งานอื่น ๆ
อักษรวิ่ง
w3docs
<!DOCTYPE html>
<html>
<head>
<title>Scrolling Text</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;800&display=swap');
.scrolling-text {
font-size: 16px; /* ขนาดตัวอักษร */
font-weight: normal; /* ตัวอักษรธรรมดา */
color: #622A0F; /* สีตัวอักษร */
font-family: Arial, sans-serif; /* ฟอนต์ทั่วไป */
white-space: nowrap; /* ไม่ให้ตัดคำ */
overflow: hidden;
display: block;
width: 100%; /* ความกว้างของพื้นที่เลื่อน */
}
.scrolling-text span {
display: inline-block;
//background-color: #f1f7ed; /* สีพื้นหลัง */
height: 50px; /* กำหนดความสูงของพื้นหลัง */
padding-left: 10%; /* เพิ่มระยะห่างก่อนเริ่มเลื่อน */
animation: scroll-left 30s linear infinite; /* ปรับความเร็ว (5s คือ 5 วินาที) */
}
@keyframes scroll-left {
0% {
transform: translateX(100%); /* เริ่มเลื่อนจากด้านขวา */
}
100% {
transform: translateX(-100%); /* เลื่อนออกจากด้านซ้าย */
}
}
</style>
</head>
<body>
<div class="scrolling-text">
<span>ส่วนงานนี้ ผู้สร้างได้ Upload เอกสารไว้ หากพบ ไฟล์ หรือ ลิงค์ใด มีปัญหา ไฟล์/ไม่สมบูรณ์ สามารถแจ้งเพิ่มหรือให้แก้ไขได้ ทาง Line ID : mrtrd</span>
</div>
</body>
</html>
ตั้งชื่อเว็บในแท็บเบราว์เซอร์
ตั้งชื่อเว็บในแท็บเบราว์เซอร์
function doGet() {
return HtmlService.createHtmlOutputFromFile('LoginPage')
.setTitle('หน้า Login เฉพาะเจ้าหน้าที่กองทุนฟื้นฟูสมรรถภาพที่จำเป็นต่อสุขภาพจังหวัดระยอง') // ตั้งชื่อเว็บในแท็บเบราว์เซอร์
.addMetaTag('viewport', 'width=device-width, initial-scale=1') // เพิ่ม meta tag สำหรับการรองรับมือถือ
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL); // อนุญาตให้แสดงใน iframe
}
setFaviconUrl เป็นภาพอื่น
function doGet() {
var template = HtmlService.createTemplateFromFile('Index'); // หรือ 'Index' ตามชื่อไฟล์จริง
var html = template.evaluate()
.setTitle('ระบบจัดการแฟ้ม') // หรือ 'ข้อมูลรับโอน by ธศร'
.setFaviconUrl('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihuwTZQnc7jZiMCDgoEyYi8w6N5sLlB5kw0qrDW1vVQr7wVkgLr6uLOjuuLTCRVMlxeItVgqi-_8zDgwV_twaZN3VDjc-QSGXOquXYzh4gTPOEVYeOEkLtr5iWqtoERsm5d7E9hyfp5e8tnRwK7_QsBrJ-vdRdG_goIlpdMic5zxxqqSumlH-kOkA84Wo/s2048/%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B8%A1%E0%B8%B5%E0%B8%8A%E0%B8%B7%E0%B9%88%E0%B8%AD%20114_20241117134825.png') // ตรวจสอบว่าเป็นภาพที่เข้าถึงได้
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL); // ถ้าคุณต้องการให้ iframe ทำงาน
return html;
}
ป้องกันการคลิกขวา + แสดง Swal แจ้งเตือน เกมส์
// ป้องกันการคลิกขวา + แสดง Swal แจ้งเตือน
document.addEventListener('contextmenu', function(e) {
e.preventDefault(); // ป้องกันเมนูคลิกขวา
Swal.fire({
icon: 'warning',
title: 'ห้ามคลิกขวา!',
text: 'คุณไม่สามารถคลิกขวาในหน้านี้ได้',
customClass: {
popup: 'swal-center-popup',
backdrop: 'swal-center-backdrop'
},
backdrop: true,
showConfirmButton: true
});
});
// ==========================
// ป้องกัน DevTools & คลิกขวา
// ==========================
function showNoDevToolsAlert(message) {
Swal.fire({
icon: 'warning',
title: 'ห้ามทำ!',
text: message,
customClass: {
popup: 'swal-center-popup',
backdrop: 'swal-center-backdrop'
},
backdrop: true,
showConfirmButton: true
});
}
// ป้องกันคลิกขวา
document.addEventListener('contextmenu', function(e) {
e.preventDefault();
showNoDevToolsAlert(
'คุณไม่สามารถคลิกขวาในหน้านี้ได้\nติดต่อสอบถาม หรือขอโค้ดเกมส์ได้ที่ ว่าที่ร้อยตรีธีระดา ศิริงาม\nLine ID : mrtrd'
);
});
// ป้องกันปุ่ม DevTools
document.addEventListener('keydown', function(e) {
if (e.key === 'F12' ||
(e.ctrlKey && e.shiftKey && ['i','j','c'].includes(e.key.toLowerCase())) ||
(e.ctrlKey && e.key.toLowerCase() === 'u')
) {
e.preventDefault();
let msg = '';
if (e.key === 'F12') if (e.key === 'F12')
msg = 'เกมส์นี้ ห้ามกด F12 นะครับ\nติดต่อสอบถาม หรือขอโค้ดเกมส์ได้ที่ ว่าที่ร้อยตรีธีระดา ศิริงาม\nLine ID : mrtrd';
else if (e.ctrlKey && e.shiftKey && e.key.toLowerCase() === 'i') msg = 'เกมส์นี้ ห้ามเปิด DevTools นะครับ (Ctrl+Shift+I)';
else if (e.ctrlKey && e.shiftKey && e.key.toLowerCase() === 'j') msg = 'เกมส์นี้ ห้ามเปิด Console นะครับ (Ctrl+Shift+J)';
else if (e.ctrlKey && e.shiftKey && e.key.toLowerCase() === 'c') msg = 'เกมส์นี้ ห้าม Inspect Element นะครับ (Ctrl+Shift+C)';
else if (e.ctrlKey && e.key.toLowerCase() === 'u') msg = 'เกมส์นี้ ห้ามดู Source Code นะครับ (Ctrl+U)';
showNoDevToolsAlert(msg);
}
});
<br>
<!-- ปุ่มลิงก์ -->
<div style="display:flex; justify-content:center; gap:10px; flex-wrap:wrap;">
<a href="https://sites.google.com/view/prof-local" target="_blank"
style="background : #c2ffee; font-size:1rem; padding:15px 10px; border:1px solid #3c8c6b; border-radius:5px; color:#3c8c6b; text-decoration:none;">🏠 หน้าหลัก</a>
<a href="https://script.google.com/macros/s/AKfycbzrzNHHAW7UKkPEmHZXU9mVqcmR4afnrxaC1NqhpdLx3wzA_24muEmWmZPK--dkATKZ/exec" target="_blank"
style="background : #c2ffee; font-size:1rem; padding:15px 10px; border:1px solid #4f241b; border-radius:5px; color:#4f241b; text-decoration:none;">🗂️ ระบบติดตามแฟ้ม</a>
<a href="https://script.google.com/macros/s/AKfycbyZMWP-pg2pX-WTYOnvKSd18VbNikpMwgBZfL3rGEJjNhptKx9K_-upVNToYNd78NoFQw/exec" target="_blank"
style="background : #c2ffee; font-size:1rem; padding:15px 10px; border:1px solid #4f241b; border-radius:5px; color:#4f241b; text-decoration:none;">🪪 ระบบข้อมูลใบประกอบวิชาชีพ</a>
<a href="https://script.google.com/macros/s/AKfycbzXJw016WTX0ZVGeuwXGpmkgjWG7-KTSX8gPX4sgs6Ywl02ZzMVrdJMv9EjrsUt42xmMw/exec" target="_blank"
style="background : #c2ffee; font-size:1rem; padding:15px 10px; border:1px solid #4f241b; border-radius:5px; color:#4f241b; text-decoration:none;">📞 ระบบสำรวจเบอร์โทรบุคลากร</a>
<a href="https://script.google.com/macros/s/AKfycbyJNVlpN972tJ2wikf03rfTiPUe77fyXtal2fovrfsBDfR-HCBl3zUuXU3_TVBpb7tFKA/exec" target="_blank"
style="background : #c2ffee; font-size:1rem; padding:15px 10px; border:1px solid #4f241b; border-radius:5px; color:#4f241b; text-decoration:none;">🛑 คำนวณนับวันลา</a>
</div>
ป้องกัน F12, Ctrl+Shift+I, Ctrl+U, Ctrl+C, Ctrl+S (อังกฤษ+ไทย)
// --- ป้องกัน F12, Ctrl+Shift+I, Ctrl+U, Ctrl+C, Ctrl+S (อังกฤษ+ไทย) ---
document.addEventListener('keydown', function (e) {
const key = e.key.toLowerCase();
// แผนที่ปุ่มภาษาไทยที่ตรงกับ C,U,S
const thaiMap = {
'c': ['ี'], // C
'u': ['แ'], // U
's': ['ว'] // S
};
const ctrlShiftI = e.ctrlKey && e.shiftKey && key === 'i';
const ctrlKeyPressed = e.ctrlKey && (
key === 'c' || key === 'u' || key === 's' ||
(thaiMap['c'] && thaiMap['c'].includes(key)) ||
(thaiMap['u'] && thaiMap['u'].includes(key)) ||
(thaiMap['s'] && thaiMap['s'].includes(key))
);
if (e.key === 'F12' || ctrlShiftI || ctrlKeyPressed) {
e.preventDefault();
Swal.fire({
icon: 'warning',
title: 'ไม่อนุญาต',
text: 'ฟังก์ชันนี้ถูกปิดใช้งานเพื่อความปลอดภัยด้านข้อมูลส่วนบุคคล',
width: 400,
confirmButtonText: 'ปิด'
});
}
});
// --- ป้องกันคลิกขวา ---
document.addEventListener('contextmenu', function (e) {
e.preventDefault();
Swal.fire({
icon: 'warning',
title: 'ไม่อนุญาต',
text: 'คลิกขวาถูกปิดใช้งาน เพื่อความปลอดภัยด้านข้อมูลส่วนบุคคล',
width: 400,
confirmButtonText: 'ปิด'
});
});