Add: license company subject data
This commit is contained in:
@@ -53,6 +53,9 @@
|
||||
<script src="../../game/lib/screen_bottom_ui.js"></script>
|
||||
|
||||
|
||||
<!-- license company and subject list : data files -->
|
||||
<script src="../../game/license_timer/license_data/company_subject.js"></script>
|
||||
|
||||
<!-- game : source files -->
|
||||
<script src="../../game/license_timer/loading.js"></script>
|
||||
<script src="../../game/license_timer/login.js"></script>
|
||||
@@ -85,35 +88,36 @@
|
||||
if("Notification" in window) {
|
||||
if(Notification) { // prepared browser for using Notification
|
||||
if(Notification.permission === "granted") {
|
||||
console.log("Notification - grated");
|
||||
// console.log("Notification - grated");
|
||||
AddNotifyEventByNotification(timeLeft);
|
||||
return;
|
||||
}
|
||||
|
||||
Notification.requestPermission(function (result) {
|
||||
console.log("result : " + result);
|
||||
// console.log("result : " + result);
|
||||
Notification.permission = result;
|
||||
|
||||
if(result === "granted") {
|
||||
// console.log("Notification - grated : " + result);
|
||||
AddNotifyEventByNotification(timeLeft);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log("Notification - not grated : " + result);
|
||||
// console.log("Notification - not grated : " + result);
|
||||
AddNotifyEventByAlert(timeLeft);
|
||||
});
|
||||
} else { // not prepared browser for using Notification
|
||||
console.log("no notification - !Notification");
|
||||
// console.log("no notification - !Notification");
|
||||
AddNotifyEventByAlert(timeLeft);
|
||||
}
|
||||
} else { // not prepared browser for using Notification - IE
|
||||
console.log("no notification - Notification in window");
|
||||
// console.log("no notification - Notification in window");
|
||||
AddNotifyEventByAlert(timeLeft);
|
||||
}
|
||||
}
|
||||
|
||||
function AddNotifyEventByNotification(timeLeft) {
|
||||
console.log("AddNotifyEventByNotification : " + timeLeft);
|
||||
// console.log("AddNotifyEventByNotification : " + timeLeft);
|
||||
timeOutEventID = setTimeout(function() {
|
||||
var options = {
|
||||
icon: "../../../resources/image/icon/banner_chocomae_128x128.png",
|
||||
@@ -130,7 +134,7 @@
|
||||
}
|
||||
|
||||
function AddNotifyEventByAlert(timeLeft) {
|
||||
console.log("AddNotifyEventByAlert : " + timeLeft);
|
||||
// console.log("AddNotifyEventByAlert : " + timeLeft);
|
||||
timeOutEventID = setTimeout(function() {
|
||||
alert("!!! 시험 시간 종료 !!!\n작업을 중단하고 선생님을 불러주세요.");
|
||||
}, timeLeft);
|
||||
@@ -138,17 +142,17 @@
|
||||
|
||||
|
||||
function CancelNotifyTimeOver() {
|
||||
console.log("CancelNotifyTimeOver");
|
||||
// console.log("CancelNotifyTimeOver");
|
||||
clearTimeout(timeOutEventID);
|
||||
}
|
||||
|
||||
function RemoveNotifyEventyByNotification() {
|
||||
console.log("RemoveNotifyEventyByNotification");
|
||||
// console.log("RemoveNotifyEventyByNotification");
|
||||
clearTimeout(timeOutEventID);
|
||||
}
|
||||
|
||||
function RemoveNotifyEventyByAlert() {
|
||||
console.log("RemoveNotifyEventyByAlert");
|
||||
// console.log("RemoveNotifyEventyByAlert");
|
||||
clearTimeout(timeOutEventID);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user