쿠키 삭제 스크립트 추가, 인트로 사운드, 아케이드게임 캐러셀
This commit is contained in:
@@ -1156,18 +1156,25 @@ function getCookie(name) {
|
||||
function deleteCookie(name) {
|
||||
document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
|
||||
$(".close-today input").prop("checked", false);
|
||||
|
||||
$(".close-today").html(
|
||||
`<span onclick="hideTodayIntroPopup('${name}')" style="cursor:pointer"><input type="checkbox"> 오늘 하루 재생하지 않기</span>`
|
||||
);
|
||||
}
|
||||
|
||||
// 팝업을 숨기는 함수
|
||||
function hideTodayIntroPopup(target) {
|
||||
function hideTodayIntroPopup(name) {
|
||||
const videoElements = document.querySelectorAll(".video_wrap video");
|
||||
videoElements[0].pause();
|
||||
videoElements[0].currentTime = 0;
|
||||
$(".video_wrap").hide();
|
||||
$(".editorWarp").removeClass("playing");
|
||||
if (target) {
|
||||
setCookie(target, "true", 1);
|
||||
// videoElements[0].pause();
|
||||
// videoElements[0].currentTime = 0;
|
||||
// $(".video_wrap").hide();
|
||||
// $(".editorWarp").removeClass("playing");
|
||||
if (name) {
|
||||
setCookie(name, "true", 1);
|
||||
} else {
|
||||
setCookie("hideIntroPopup", "true", 1);
|
||||
}
|
||||
$(".close-today").html(
|
||||
`<span onclick="deleteCookie('${name}')" style="cursor:pointer"><input type="checkbox" checked> 오늘 하루 재생하지 않기</span>`
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user