추천 ‹ 스크랩 게시판 ‹ 야돌이닷컴
");
//imageWin.document.title = imgObj.src;
imageWin.document.title = "추천";
}
$('body').on('click', 'img.zoomable', function(){
var img = $(this);
var src = img.attr('src');
var naturalWidth = img[0].naturalWidth;
var naturalHeight = img[0].naturalHeight;
image_popup(src, naturalWidth, naturalHeight);
});
$(document).ready(function(){
//$("#bo_v_img img:not(:first-of-type):not(.emo-img),.board-view-con img:not(:first-of-type):not(.emo-img),.cover-img img,.media-body div:not(.media-heading) img:not(.emo-img)").each(function() {
$("#bo_v_img img:not(.emo-img),.board-view-con img:not(.emo-img),.cover-img img,.media-body div:not(.media-heading) img:not(.emo-img)").each(function() {
$(this).attr("loading","lazy");
$(this).addClass("lazyload");
$(this).attr("data-src",$(this).attr("src"));
$(this).attr("data-sizes","auto");
//$(this).attr("data-bg","/eyoom/theme/community/image/lazy_loader_cube.gif");
//$(this).removeAttr("width").removeAttr("height")
//$(this).removeAttr("src");
//$(this).attr('src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAQAAAAe/WZNAAAADklEQVR42mNkgAJGDAYAAFEABCaLYqoAAAAASUVORK5CYII='); //4:3
$(this).attr('src', "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 3'%3E%3C/svg%3E"); //URL-encoded SVG
});
});
//특정 CSS 선택자를 가진 모든 요소를 배열로 가져온다
var videos = document.querySelectorAll('.board-view video');
for(var i=0; i 0 && !videos[i].paused){
// Then pause it now
// videos[i].pause();
//}
}
}
// 비디오 제어, 유튜브 제어
var iframes = document.querySelectorAll('.board-view .ytplayer');
//아이프레임 클릭 시 스크롤 플레이 기능 끄기
var scrollPlay = true;
focus();
const listener = window.addEventListener('blur', () => {
//if (document.activeElement === document.querySelector('iframe')) {
if (document.activeElement.tagName == "IFRAME") {
scrollPlay = false;
}
window.removeEventListener('blur', listener);
});
$(window).scroll(function() {
$('video:not(.gp-video-element):not(.paused):not(.noloop)').each(function() {
if(videos.length > 0) {
var fracs = $(this).fracs();
if(!$(this).closest(".plyr").length && !$(this).closest(".jwplayer").length) {
if($(this).prop('muted')) {
$(this).prop('muted', true);
} else {
$(this).prop('muted', false);
}
//if(fracs.possible > 0.61) {
if(videos.length > 1) {
//window.scrollBy(0, 1);
//window.scrollBy(0, -1);
if(fracs.possible > 0.6) {
$(this)[0].play();
//pauseAll(this);
} else {
$(this)[0].pause();
}
} else {
if(fracs.possible > 0.2) {
$(this)[0].play();
} else {
$(this)[0].pause();
}
}
}
}
})
});
$(document).ready(function(){
$("video").each(function() {
// Show loading animation.
var playPromise = $(this)[0].play();
if (playPromise !== undefined) {
playPromise.then(_ => {
// Automatic playback started!
// Show playing UI.
})
.catch(error => {
// Auto-play was prevented
// Show paused UI.
//$(this)[0].muted = true;
//$(this)[0].play();
});
}
if(videos.length > 0) {
var fracs = $(this).fracs();
if(videos.length > 1) {
if(fracs.possible > 0.6) {
$(this)[0].play();
} else {
$(this)[0].pause();
}
} else {
if(fracs.possible > 0.2) {
$(this)[0].play();
} else {
$(this)[0].pause();
}
}
if(!$(this).closest(".plyr").length && !$(this).closest(".jwplayer").length && !$(this).closest(".afterglow").length) {
$(this).prop('controls', true);
var v = $(this)[0];
v.addEventListener('loadedmetadata', function() {
var video_duration = v.duration;
if(video_duration < 11) {
$(this).prop('controls', false);
$(this).css({'video::-webkit-media-controls-volume-slider-container':'display:none!important','video::-webkit-media-controls-volume-slider':'display:none!important','video::-webkit-media-controls-mute-button':'display:none!important'});
}
});
$(this).attr('disablepictureinpicture', '');
//$(this).prop('controlsList', 'nofullscreen nodownload noremoteplayback noplaybackrate');
$(this).prop('controlsList', 'nodownload noremoteplayback noplaybackrate');
if(!$(this).hasClass('hideout')) {
$(this).prop('muted', true);
} else {
$(this).removeAttr('autoplay');
}
if(!$(this).hasClass('noloop'))
$(this).prop('loop', true);
$(this).click( function (){
//this.paused ? this.play() : this.pause();
if(this.paused) {
$(this).toggleClass('paused');
} else {
$(this).toggleClass('paused');
}
});
} else {
if(!$(this).hasClass('hideout')) {
$(this).prop('muted', true);
} else {
$(this).removeAttr('autoplay');
}
if(!($(".jw-playlist-dock-btn").length)) {
$(this).prop('loop', true);
}
$(this).click( function (){
//this.paused ? this.play() : this.pause();
if(this.paused) {
$(this).toggleClass('paused');
} else {
$(this).toggleClass('paused');
}
});
}
}
window.addEventListener('load', function() {
$(this).focus();
});
});
});
var j = 1;
$("video.has_audio").each(function() {
if(!$("video[class^='exist-sound-']")) {
$(this).removeClass('has_audio');
$(this).addClass('has_audio-'+j);
}
j++;
});
for (var k = 1; k <= videos.length; k++) {
(function(k) {
//단축키, m키로 소리 on off
$(window).keydown(function(e){
if(e.keyCode == 77) {
if($('.has_audio-'+k).prop('muted')) {
$('.has_audio-'+k).prop('muted', false);
} else {
$('.has_audio-'+k).prop('muted', true);
}
}
});
})(k);
}
$(document).ready(function() {
$("#toggleObjclose").click(function() {
//$('#myframe')[0].contentWindow.postMessage('{"event":"command","func":"' + 'pauseVideo' + '","args":""}', '*');
jQuery("iframe").each(function() {
jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*')
});
});
});
addtogglebutton();
function addtogglebutton()
{
var toggle = document.querySelectorAll('.board-view-con *[id^="toggle"]');
for (var i = 0; i < toggle.length; i++) {
toggle.item(i).classList.add('toggle-button');
}
}
var toggle_button = document.querySelectorAll('.toggle-button');
for (var x = 0; x <= toggle_button.length/2; x++) {
(function(x) {
$('#toggleObj'+x).click(function(){
$('#toggleObj'+x).css('display','none');
$('#showObj'+x).fadeToggle(500);
if ($('#showObj'+x).is(':visible')) {
$('html, body').animate({scrollTop: $('#showObj'+x).offset().top - 135}, 100);
}
});
$('#toggleObjclose'+x).click(function(){
$('#toggleObj'+x).css('display','');
$('#showObj'+x).fadeToggle(1);
if ($('#showObj'+x).is(':visible')) {
$('html, body').animate({scrollTop: $('#toggleObj'+x).offset().top - 215}, 1);
}
});
})(x);
}
$('#toggleObj').click(function(){
$('#toggleObj').css('display','none');
$('#showObj').fadeToggle(500);
if ($('#showObj').is(':visible')) {
$('html, body').animate({scrollTop: $('#showObj').offset().top - 135}, 100);
}
});
$('#toggleObjclose').click(function(){
$('#toggleObj').css('display','');
$('#showObj').fadeToggle(1);
if ($('#showObj').is(':visible')) {
$('html, body').animate({scrollTop: $('#toggleObj').offset().top - 215}, 1);
}
});
| 랭킹 |
포토 |
글내용 |
조회 |
|
1
|
|
닥쳐•응징
하늘구장
2018-12-29 22:45
|
7,779
|
|
2
|
|
인사
shadow2fox
2018-02-14 23:56
|
7,311
|
|
3
|
|
싫음
내사랑
2017-12-10 23:19
|
7,047
|
|
4
|
|
므흣•집중
내사랑
2017-06-23 15:08
|
6,024
|
|
5
|
|
한심
내사랑
2017-04-06 03:57
|
5,762
|
|
6
|
|
닥쳐•응징
내사랑
2019-12-11 23:51
|
5,510
|
|
7
|
|
닥쳐•응징
내사랑
2018-09-08 11:52
|
5,222
|
|
8
|
|
좋음•신남•통쾌
shadow2fox
2017-08-10 22:46
|
4,979
|
|
9
|
|
자연•풍경
shadow2fox
2018-11-04 15:35
|
4,551
|
|
10
|
|
추천
내사랑
2019-06-19 19:28
|
4,264
|