Diff
checker
텍스트
텍스트
이미지
문서
Excel
폴더
Legal
Enterprise
데스크톱
요금제
로그인
데스크톱 앱 다운로드
텍스트 비교
두 텍스트 파일의 차이점을 찾아보세요
도구
기록
실시간 편집
공백 변경 숨기기
변경 없는 행 숨기기
줄바꿈 비활성화
레이아웃
나란히 보기
합쳐 보기
비교 단위
스마트
단어
글자
텍스트 스타일
모양 변경
구문 강조
언어 선택
제외
텍스트 변환
첫 변경으로
수정
Diffchecker Desktop
가장 안전하게 Diffchecker를 사용하는 방법. 데스크톱 앱을 사용하면 비교 데이터가 외부로 전송되지 않습니다!
데스크톱 앱 받기
Untitled diff
생성일
10년 전
비교 결과 만료 없음
초기화
내보내기
공유
설명
42 삭제
행
총
삭제
글자
총
삭제
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
150 행
복사
215 추가
행
총
추가
글자
총
추가
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
327 행
복사
(function()
(function()
{
{
var touch = window.ontouchstart
var touch = window.ontouchstart
|| navigator.MaxTouchPoints > 0
|| navigator.MaxTouchPoints > 0
|| navigator.msMaxTouchPoints > 0;
|| navigator.msMaxTouchPoints > 0;
is_touch_device();
is_touch_device();
if (touch == true) { // remove all :hover stylesheets
if (touch == true) { // remove all :hover stylesheets
try { // prevent crash on browsers not supporting DOM styleSheets properly
try { // prevent crash on browsers not supporting DOM styleSheets properly
for (var si in document.styleSheets) {
for (var si in document.styleSheets) {
var styleSheet = document.styleSheets[si];
var styleSheet = document.styleSheets[si];
if (!styleSheet.rules) continue;
if (!styleSheet.rules) continue;
for (var ri = styleSheet.rules.length - 1; ri >= 0; ri--) {
for (var ri = styleSheet.rules.length - 1; ri >= 0; ri--) {
if (!styleSheet.rules[ri].selectorText) continue;
if (!styleSheet.rules[ri].selectorText) continue;
if (styleSheet.rules[ri].selectorText.match(':hover')) {
if (styleSheet.rules[ri].selectorText.match(':hover')) {
stylesheet.deleteRule(ri);
stylesheet.deleteRule(ri);
}
}
}
}
}
}
} catch (ex) {}
} catch (ex) {}
}
}
복사
복사됨
복사
복사됨
$(window).on('scroll', checkAnchors);
$('.main-nav, .mobile-nav').on('click','div',navClick);
$('body').on('click', '.rsvp', function ()
{
//
});
$('.schedule-info').on('click', function ()
{
if ($('div', this).hasClass('active'))
{
$('div', this).removeClass('active');
}
else
{
$('div', this).addClass('active');
}
});
$('.answer-open').on('click', function ()
{
if ($(this).hasClass('active'))
{
$(this).removeClass('active');
var answerParent = $(this).parent();
$('.faq-answer', answerParent).removeClass('active');
}
else
{
$(this).addClass('active');
var answerParent = $(this).parent();
$('.faq-answer', answerParent).addClass('active');
}
});
$('.mobile-menu-link').on('click', function (e)
{
e.preventDefault();
if ($('.mobile-nav').hasClass('active')) {
$('.mobile-nav').removeClass('active');
$('.mobile-nav-cover').removeClass('active');
}
else
{
$('.mobile-nav').addClass('active');
$('.mobile-nav-cover').addClass('active');
}
});
$('.rewards-link').on('click', function (e)
$('.rewards-link').on('click', function (e)
{
{
e.preventDefault();
e.preventDefault();
$('.rewards-pop-up').addClass('active');
$('.rewards-pop-up').addClass('active');
$('.cover').addClass('active');
$('.cover').addClass('active');
});
});
$('.rewards-pop-up-close-btn').on('click', function ()
$('.rewards-pop-up-close-btn').on('click', function ()
{
{
$('.rewards-pop-up').removeClass('active');
$('.rewards-pop-up').removeClass('active');
$('.cover').removeClass('active');
$('.cover').removeClass('active');
});
});
복사
복사됨
복사
복사됨
$('.
videoStill
').magnificPopup({
$('.
trailer-house
').magnificPopup({
delegate: '
img
', // child items selector, by clicking on it popup will open
delegate: '
i
', // child items selector, by clicking on it popup will open
type: 'iframe',
type: 'iframe',
gallery:
gallery:
{
{
enabled:true
enabled:true
}
}
// other options
// other options
});
});
복사
복사됨
복사
복사됨
$('.travel-info-image').magnificPopup({
delegate: 'img', // child items selector, by clicking on it popup will open
type: 'image',
gallery:
{
enabled:false
}
// other options
});
//if (touch == false) {
//if (touch == false) {
// $('.digital-link').on('mouseenter', function (e)
// $('.digital-link').on('mouseenter', function (e)
// {
// {
// var currentSource = $('img', this).attr('src');
// var currentSource = $('img', this).attr('src');
// var newSource = currentSource.replace('.png', '_hover.png');
// var newSource = currentSource.replace('.png', '_hover.png');
// $('img', this).attr('src', newSource);
// $('img', this).attr('src', newSource);
// });
// });
// $('.digital-link').on('mouseleave', function (e)
// $('.digital-link').on('mouseleave', function (e)
// {
// {
// var currentSource = $('img', this).attr('src');
// var currentSource = $('img', this).attr('src');
// var newSource = currentSource.replace('_hover.png', '.png');
// var newSource = currentSource.replace('_hover.png', '.png');
// $('img', this).attr('src', newSource);
// $('img', this).attr('src', newSource);
// });
// });
//}
//}
$('.digital-link').on('click', function (e)
$('.digital-link').on('click', function (e)
{
{
e.preventDefault();
e.preventDefault();
if ($(this).attr('href').search('playstation.com') != -1) {
if ($(this).attr('href').search('playstation.com') != -1) {
var storeLink = 'PlayStation Store';
var storeLink = 'PlayStation Store';
}
}
else if ($(this).attr('href').search('xbox.com') != -1) {
else if ($(this).attr('href').search('xbox.com') != -1) {
var storeLink = 'Xbox Store';
var storeLink = 'Xbox Store';
}
}
else if ($(this).attr('href').search('steampowered.com') != -1) {
else if ($(this).attr('href').search('steampowered.com') != -1) {
var storeLink = 'Steam Store';
var storeLink = 'Steam Store';
}
}
else if ($(this).attr('href').search('square') != -1) {
else if ($(this).attr('href').search('square') != -1) {
var storeLink = 'Square Enix Store';
var storeLink = 'Square Enix Store';
}
}
if ($(this).hasClass('windows-10')) {
if ($(this).hasClass('windows-10')) {
복사
복사됨
복사
복사됨
var storeLink = 'Windows 10';
//
if ($(this).attr('href') == '#') {
//
}
else
{
var url = window.location;
var urlExtension = parseUrl(url).search;
if (typeof urlExtension[1] != 'undefined') {
var splitUrlExtension = urlExtension.split('?');
var paramsArray = splitUrlExtension[1].split('&');
var paramsSplit = {};
$(paramsArray).each(function (idx)
{
var splitString = this.split('=');
paramsSplit[splitString[0]] = splitString[1];
});
var fullWindowsEtension = '';
if ('utm_campaign' in paramsSplit) {
fullWindowsEtension += '_'+paramsSplit['utm_campaign'];
}
if ('utm_source' in paramsSplit) {
fullWindowsEtension += '_'+paramsSplit['utm_source'];
}
if ('utm_content' in paramsSplit) {
fullWindowsEtension += '_'+paramsSplit['utm_content'];
}
}
ga('send', 'event', 'Store Link Click', storeLink);
window.open('https://www.microsoft.com/en-us/store/games/rise-of-the-tomb-raider/9nblggh6crsz?cid=SEA_ROTTR_W10'+fullWindowsEtension, '_blank');
}
}
}
else
else
{
{
ga('send', 'event', 'Store Link Click', storeLink);
ga('send', 'event', 'Store Link Click', storeLink);
var url = window.location;
var url = window.location;
var urlExtension = parseUrl(url).search;
var urlExtension = parseUrl(url).search;
window.open($(this).attr('href')+urlExtension);
window.open($(this).attr('href')+urlExtension);
}
}
});
});
복사
복사됨
복사
복사됨
var language = $('body').attr('
lang');
var language = $('body').attr('
data-attr-
lang');
var currentFlag
= $('#'+language+'-flag').detach();
$("#timer").countdown({
date: "february 5, 2016 16:00",
yearsAndMonths: false,
template: '<span class="time-text">%td</span> %d <span class="time-text">%th</span> <span class="time-text-2">%h</span> <span class="time-text">%ti</span> <span class="time-text-2">%i</span> <span class="time-text">%ts</span> <span class="time-text-2">%s</span>',
});
$("#timer").countdown("changeLocale", language);
var currentFlag
;
$('.flag-inner a').each(function ()
{
if ($(this).attr('data-country-code') == language)
{
currentFlag = $(this).detach();
}
});
$('.flag-container .flag-inner').prepend(currentFlag);
$('.flag-container .flag-inner').prepend(currentFlag);
$('.flag-container .flag-inner').on('click', 'div.flag', function ()
$('.flag-container .flag-inner').on('click', 'div.flag', function ()
{
{
var newLocale = ($(this).attr('id')).replace('-flag', '');
var newLocale = ($(this).attr('id')).replace('-flag', '');
var newUrl = (window.location.href).split('/');
var newUrl = (window.location.href).split('/');
newUrl = newUrl[0] + '//' + newUrl[2] + '/';
newUrl = newUrl[0] + '//' + newUrl[2] + '/';
window.location.href = newUrl+newLocale;
window.location.href = newUrl+newLocale;
});
});
복사
복사됨
복사
복사됨
if (typeof xboxRetailersArray !== 'undefined') {
var parsedXbox = $.parseJSON(xboxRetailersArray);
$.each(parsedXbox, function ()
{
$('.linksHouse.retailers.xbox').append('<a href="'+this.link[0]+'" class="retailer-link" />');
$('.linksHouse.retailers.xbox a:last').append('<img src="'+this.logo+'" class="retailer-logo" />');
});
}
if (typeof ps4RetailersArray !== 'undefined')
{
var parsedPS4 = $.parseJSON(ps4RetailersArray);
$.each(parsedPS4, function ()
{
$('.linksHouse.retailers.ps4').append('<a href="'+this.link[0]+'" class="retailer-link" />');
$('.linksHouse.retailers.ps4 a:last').append('<img src="'+this.logo+'" class="retailer-logo" />');
});
}
if (typeof pcRetailersArray !== 'undefined')
if (typeof pcRetailersArray !== 'undefined')
{
{
var parsedPC = $.parseJSON(pcRetailersArray);
var parsedPC = $.parseJSON(pcRetailersArray);
$.each(parsedPC, function ()
$.each(parsedPC, function ()
{
{
복사
복사됨
복사
복사됨
$('.linksHouse.retailers.pc').append('<a href="'+this.link
+'" class="retailer-link" />');
$('.linksHouse.retailers.pc').append('<a href="'+this.link
[0]
+'" class="retailer-link" />');
$('.linksHouse.retailers.pc a:last').append('<img src="'+this.logo+'" class="retailer-logo" />');
$('.linksHouse.retailers.pc a:last').append('<img src="'+this.logo+'" class="retailer-logo" />');
});
});
}
}
}) ();
}) ();
복사
복사됨
복사
복사됨
function is_touch_device() {
function is_touch_device() {
return 'ontouchstart' in window // works on most browsers
return 'ontouchstart' in window // works on most browsers
|| 'onmsgesturechange' in window; // works on ie10
|| 'onmsgesturechange' in window; // works on ie10
}
}
복사
복사됨
복사
복사됨
function parseUrl( url ) {
function parseUrl( url ) {
var a = document.createElement('a');
var a = document.createElement('a');
a.href = url;
a.href = url;
return a;
return a;
}
function navClick (e) {
e.preventDefault();
$(window).off('scroll', checkAnchors);
$('.mobile-nav').removeClass('active');
$('.mobile-nav-cover').removeClass('active');
if ($(this).hasClass('active'))
{
//
}
else
{
$('.nav-item, .mobile-nav-item').each(function ()
{
$(this).removeClass('active');
});
$(this).addClass('active');
if ($(this).attr('id') == 'forums') {
window.location = 'http://forum.finalfantasyxv.com';
}
else
{
//calculate destination place
var dest = 0;
if ($(window).width() <= 1024) {
console.log('little screen');
if ($('a[href=#'+$(this).attr('id')+']').offset().top - $(window).height() * -.15 > $(document).height() - $(window).height()) {
dest = $(document).height() - $(window).height();
} else {
dest = $('a[href=#'+$(this).attr('id')+']').offset().top - $(window).height() * -.15;
}
}
else
{
if ($('a[href=#'+$(this).attr('id')+']').offset().top - $(window).height() * .25 > $(document).height() - $(window).height()) {
dest = $(document).height() - $(window).height();
} else {
dest = $('a[href=#'+$(this).attr('id')+']').offset().top - $(window).height() * .25;
}
}
}
복사
복사됨
복사
복사됨
//go to destination
$('html,body').animate({
scrollTop: dest
}, 500, 'swing', function ()
{
$(window).on('scroll', checkAnchors);
});
}
}
}
function checkAnchors ()
{
//var homeLoc = ($('a[href=#home]').offset().top) - ($(window).height() * .3);
//var whatLoc = $('a[href=#what]').offset().top - ($(window).height() * .3);
//var trailerLoc = $('a[href=#trailer]').offset().top - ($(window).height() * .3);
//var livestreamLoc = $('a[href=#livestream]').offset().top - ($(window).height() * .3);
//var scheduleLoc = $('a[href=#schedule]').offset().top - ($(window).height() * .3);
//var travelLoc = $('a[href=#travel]').offset().top - ($(window).height() * .3);
//var faqLoc = $('a[href=#faq]').offset().top - ($(window).height() * .3);
//
//if ( $(window).scrollTop() > homeLoc && $(window).scrollTop() < whatLoc)
//{
// $('.nav-item, .mobile-nav-item').each(function ()
// {
// $(this).removeClass('active');
// });
// $('.main-nav div[id=home], .mobile-nav div[id=home]').addClass('active');
//}
//if ( $(window).scrollTop() > whatLoc && $(window).scrollTop() < trailerLoc)
//{
// $('.nav-item, .mobile-nav-item').each(function ()
// {
// $(this).removeClass('active');
// });
// $('.main-nav div[id=what], .mobile-nav div[id=what]').addClass('active');
//}
//if ( $(window).scrollTop() > trailerLoc && $(window).scrollTop() < livestreamLoc)
//{
// $('.nav-item, .mobile-nav-item').each(function ()
// {
// $(this).removeClass('active');
// });
// $('.main-nav div[id=trailer], .mobile-nav div[id=trailer]').addClass('active');
//}
//if ( $(window).scrollTop() > livestreamLoc && $(window).scrollTop() < scheduleLoc)
//{
// $('.nav-item, .mobile-nav-item').each(function ()
// {
// $(this).removeClass('active');
// });
// $('.main-nav div[id=livestream], .mobile-nav div[id=livestream]').addClass('active');
//}
//if ( $(window).scrollTop() > scheduleLoc && $(window).scrollTop() < travelLoc)
//{
// $('.nav-item, .mobile-nav-item').each(function ()
// {
// $(this).removeClass('active');
// });
// $('.main-nav div[id=schedule], .mobile-nav div[id=schedule]').addClass('active');
//}
//if ( $(window).scrollTop() > travelLoc && $(window).scrollTop() < faqLoc)
//{
// $('.nav-item, .mobile-nav-item').each(function ()
// {
// $(this).removeClass('active');
// });
// $('.main-nav div[id=travel], .mobile-nav div[id=travel]').addClass('active');
//}
//if ( $(window).scrollTop() > faqLoc)
//{
// $('.nav-item, .mobile-nav-item').each(function ()
// {
// $(this).removeClass('active');
// });
// $('.main-nav div[id=faq], .mobile-nav div[id=faq]').addClass('active');
//}
}
저장된 비교 결과
원본
파일 열기
(function() { var touch = window.ontouchstart || navigator.MaxTouchPoints > 0 || navigator.msMaxTouchPoints > 0; is_touch_device(); if (touch == true) { // remove all :hover stylesheets try { // prevent crash on browsers not supporting DOM styleSheets properly for (var si in document.styleSheets) { var styleSheet = document.styleSheets[si]; if (!styleSheet.rules) continue; for (var ri = styleSheet.rules.length - 1; ri >= 0; ri--) { if (!styleSheet.rules[ri].selectorText) continue; if (styleSheet.rules[ri].selectorText.match(':hover')) { stylesheet.deleteRule(ri); } } } } catch (ex) {} } $('.rewards-link').on('click', function (e) { e.preventDefault(); $('.rewards-pop-up').addClass('active'); $('.cover').addClass('active'); }); $('.rewards-pop-up-close-btn').on('click', function () { $('.rewards-pop-up').removeClass('active'); $('.cover').removeClass('active'); }); $('.videoStill').magnificPopup({ delegate: 'img', // child items selector, by clicking on it popup will open type: 'iframe', gallery: { enabled:true } // other options }); //if (touch == false) { // $('.digital-link').on('mouseenter', function (e) // { // var currentSource = $('img', this).attr('src'); // var newSource = currentSource.replace('.png', '_hover.png'); // $('img', this).attr('src', newSource); // }); // $('.digital-link').on('mouseleave', function (e) // { // var currentSource = $('img', this).attr('src'); // var newSource = currentSource.replace('_hover.png', '.png'); // $('img', this).attr('src', newSource); // }); //} $('.digital-link').on('click', function (e) { e.preventDefault(); if ($(this).attr('href').search('playstation.com') != -1) { var storeLink = 'PlayStation Store'; } else if ($(this).attr('href').search('xbox.com') != -1) { var storeLink = 'Xbox Store'; } else if ($(this).attr('href').search('steampowered.com') != -1) { var storeLink = 'Steam Store'; } else if ($(this).attr('href').search('square') != -1) { var storeLink = 'Square Enix Store'; } if ($(this).hasClass('windows-10')) { var storeLink = 'Windows 10'; if ($(this).attr('href') == '#') { // } else { var url = window.location; var urlExtension = parseUrl(url).search; if (typeof urlExtension[1] != 'undefined') { var splitUrlExtension = urlExtension.split('?'); var paramsArray = splitUrlExtension[1].split('&'); var paramsSplit = {}; $(paramsArray).each(function (idx) { var splitString = this.split('='); paramsSplit[splitString[0]] = splitString[1]; }); var fullWindowsEtension = ''; if ('utm_campaign' in paramsSplit) { fullWindowsEtension += '_'+paramsSplit['utm_campaign']; } if ('utm_source' in paramsSplit) { fullWindowsEtension += '_'+paramsSplit['utm_source']; } if ('utm_content' in paramsSplit) { fullWindowsEtension += '_'+paramsSplit['utm_content']; } } ga('send', 'event', 'Store Link Click', storeLink); window.open('https://www.microsoft.com/en-us/store/games/rise-of-the-tomb-raider/9nblggh6crsz?cid=SEA_ROTTR_W10'+fullWindowsEtension, '_blank'); } } else { ga('send', 'event', 'Store Link Click', storeLink); var url = window.location; var urlExtension = parseUrl(url).search; window.open($(this).attr('href')+urlExtension); } }); var language = $('body').attr('lang'); var currentFlag = $('#'+language+'-flag').detach(); $('.flag-container .flag-inner').prepend(currentFlag); $('.flag-container .flag-inner').on('click', 'div.flag', function () { var newLocale = ($(this).attr('id')).replace('-flag', ''); var newUrl = (window.location.href).split('/'); newUrl = newUrl[0] + '//' + newUrl[2] + '/'; window.location.href = newUrl+newLocale; }); if (typeof pcRetailersArray !== 'undefined') { var parsedPC = $.parseJSON(pcRetailersArray); $.each(parsedPC, function () { $('.linksHouse.retailers.pc').append('<a href="'+this.link+'" class="retailer-link" />'); $('.linksHouse.retailers.pc a:last').append('<img src="'+this.logo+'" class="retailer-logo" />'); }); } }) (); function is_touch_device() { return 'ontouchstart' in window // works on most browsers || 'onmsgesturechange' in window; // works on ie10 } function parseUrl( url ) { var a = document.createElement('a'); a.href = url; return a; }
수정본
파일 열기
(function() { var touch = window.ontouchstart || navigator.MaxTouchPoints > 0 || navigator.msMaxTouchPoints > 0; is_touch_device(); if (touch == true) { // remove all :hover stylesheets try { // prevent crash on browsers not supporting DOM styleSheets properly for (var si in document.styleSheets) { var styleSheet = document.styleSheets[si]; if (!styleSheet.rules) continue; for (var ri = styleSheet.rules.length - 1; ri >= 0; ri--) { if (!styleSheet.rules[ri].selectorText) continue; if (styleSheet.rules[ri].selectorText.match(':hover')) { stylesheet.deleteRule(ri); } } } } catch (ex) {} } $(window).on('scroll', checkAnchors); $('.main-nav, .mobile-nav').on('click','div',navClick); $('body').on('click', '.rsvp', function () { // }); $('.schedule-info').on('click', function () { if ($('div', this).hasClass('active')) { $('div', this).removeClass('active'); } else { $('div', this).addClass('active'); } }); $('.answer-open').on('click', function () { if ($(this).hasClass('active')) { $(this).removeClass('active'); var answerParent = $(this).parent(); $('.faq-answer', answerParent).removeClass('active'); } else { $(this).addClass('active'); var answerParent = $(this).parent(); $('.faq-answer', answerParent).addClass('active'); } }); $('.mobile-menu-link').on('click', function (e) { e.preventDefault(); if ($('.mobile-nav').hasClass('active')) { $('.mobile-nav').removeClass('active'); $('.mobile-nav-cover').removeClass('active'); } else { $('.mobile-nav').addClass('active'); $('.mobile-nav-cover').addClass('active'); } }); $('.rewards-link').on('click', function (e) { e.preventDefault(); $('.rewards-pop-up').addClass('active'); $('.cover').addClass('active'); }); $('.rewards-pop-up-close-btn').on('click', function () { $('.rewards-pop-up').removeClass('active'); $('.cover').removeClass('active'); }); $('.trailer-house').magnificPopup({ delegate: 'i', // child items selector, by clicking on it popup will open type: 'iframe', gallery: { enabled:true } // other options }); $('.travel-info-image').magnificPopup({ delegate: 'img', // child items selector, by clicking on it popup will open type: 'image', gallery: { enabled:false } // other options }); //if (touch == false) { // $('.digital-link').on('mouseenter', function (e) // { // var currentSource = $('img', this).attr('src'); // var newSource = currentSource.replace('.png', '_hover.png'); // $('img', this).attr('src', newSource); // }); // $('.digital-link').on('mouseleave', function (e) // { // var currentSource = $('img', this).attr('src'); // var newSource = currentSource.replace('_hover.png', '.png'); // $('img', this).attr('src', newSource); // }); //} $('.digital-link').on('click', function (e) { e.preventDefault(); if ($(this).attr('href').search('playstation.com') != -1) { var storeLink = 'PlayStation Store'; } else if ($(this).attr('href').search('xbox.com') != -1) { var storeLink = 'Xbox Store'; } else if ($(this).attr('href').search('steampowered.com') != -1) { var storeLink = 'Steam Store'; } else if ($(this).attr('href').search('square') != -1) { var storeLink = 'Square Enix Store'; } if ($(this).hasClass('windows-10')) { // } else { ga('send', 'event', 'Store Link Click', storeLink); var url = window.location; var urlExtension = parseUrl(url).search; window.open($(this).attr('href')+urlExtension); } }); var language = $('body').attr('data-attr-lang'); $("#timer").countdown({ date: "february 5, 2016 16:00", yearsAndMonths: false, template: '<span class="time-text">%td</span> %d <span class="time-text">%th</span> <span class="time-text-2">%h</span> <span class="time-text">%ti</span> <span class="time-text-2">%i</span> <span class="time-text">%ts</span> <span class="time-text-2">%s</span>', }); $("#timer").countdown("changeLocale", language); var currentFlag; $('.flag-inner a').each(function () { if ($(this).attr('data-country-code') == language) { currentFlag = $(this).detach(); } }); $('.flag-container .flag-inner').prepend(currentFlag); $('.flag-container .flag-inner').on('click', 'div.flag', function () { var newLocale = ($(this).attr('id')).replace('-flag', ''); var newUrl = (window.location.href).split('/'); newUrl = newUrl[0] + '//' + newUrl[2] + '/'; window.location.href = newUrl+newLocale; }); if (typeof xboxRetailersArray !== 'undefined') { var parsedXbox = $.parseJSON(xboxRetailersArray); $.each(parsedXbox, function () { $('.linksHouse.retailers.xbox').append('<a href="'+this.link[0]+'" class="retailer-link" />'); $('.linksHouse.retailers.xbox a:last').append('<img src="'+this.logo+'" class="retailer-logo" />'); }); } if (typeof ps4RetailersArray !== 'undefined') { var parsedPS4 = $.parseJSON(ps4RetailersArray); $.each(parsedPS4, function () { $('.linksHouse.retailers.ps4').append('<a href="'+this.link[0]+'" class="retailer-link" />'); $('.linksHouse.retailers.ps4 a:last').append('<img src="'+this.logo+'" class="retailer-logo" />'); }); } if (typeof pcRetailersArray !== 'undefined') { var parsedPC = $.parseJSON(pcRetailersArray); $.each(parsedPC, function () { $('.linksHouse.retailers.pc').append('<a href="'+this.link[0]+'" class="retailer-link" />'); $('.linksHouse.retailers.pc a:last').append('<img src="'+this.logo+'" class="retailer-logo" />'); }); } }) (); function is_touch_device() { return 'ontouchstart' in window // works on most browsers || 'onmsgesturechange' in window; // works on ie10 } function parseUrl( url ) { var a = document.createElement('a'); a.href = url; return a; } function navClick (e) { e.preventDefault(); $(window).off('scroll', checkAnchors); $('.mobile-nav').removeClass('active'); $('.mobile-nav-cover').removeClass('active'); if ($(this).hasClass('active')) { // } else { $('.nav-item, .mobile-nav-item').each(function () { $(this).removeClass('active'); }); $(this).addClass('active'); if ($(this).attr('id') == 'forums') { window.location = 'http://forum.finalfantasyxv.com'; } else { //calculate destination place var dest = 0; if ($(window).width() <= 1024) { console.log('little screen'); if ($('a[href=#'+$(this).attr('id')+']').offset().top - $(window).height() * -.15 > $(document).height() - $(window).height()) { dest = $(document).height() - $(window).height(); } else { dest = $('a[href=#'+$(this).attr('id')+']').offset().top - $(window).height() * -.15; } } else { if ($('a[href=#'+$(this).attr('id')+']').offset().top - $(window).height() * .25 > $(document).height() - $(window).height()) { dest = $(document).height() - $(window).height(); } else { dest = $('a[href=#'+$(this).attr('id')+']').offset().top - $(window).height() * .25; } } //go to destination $('html,body').animate({ scrollTop: dest }, 500, 'swing', function () { $(window).on('scroll', checkAnchors); }); } } } function checkAnchors () { //var homeLoc = ($('a[href=#home]').offset().top) - ($(window).height() * .3); //var whatLoc = $('a[href=#what]').offset().top - ($(window).height() * .3); //var trailerLoc = $('a[href=#trailer]').offset().top - ($(window).height() * .3); //var livestreamLoc = $('a[href=#livestream]').offset().top - ($(window).height() * .3); //var scheduleLoc = $('a[href=#schedule]').offset().top - ($(window).height() * .3); //var travelLoc = $('a[href=#travel]').offset().top - ($(window).height() * .3); //var faqLoc = $('a[href=#faq]').offset().top - ($(window).height() * .3); // //if ( $(window).scrollTop() > homeLoc && $(window).scrollTop() < whatLoc) //{ // $('.nav-item, .mobile-nav-item').each(function () // { // $(this).removeClass('active'); // }); // $('.main-nav div[id=home], .mobile-nav div[id=home]').addClass('active'); //} //if ( $(window).scrollTop() > whatLoc && $(window).scrollTop() < trailerLoc) //{ // $('.nav-item, .mobile-nav-item').each(function () // { // $(this).removeClass('active'); // }); // $('.main-nav div[id=what], .mobile-nav div[id=what]').addClass('active'); //} //if ( $(window).scrollTop() > trailerLoc && $(window).scrollTop() < livestreamLoc) //{ // $('.nav-item, .mobile-nav-item').each(function () // { // $(this).removeClass('active'); // }); // $('.main-nav div[id=trailer], .mobile-nav div[id=trailer]').addClass('active'); //} //if ( $(window).scrollTop() > livestreamLoc && $(window).scrollTop() < scheduleLoc) //{ // $('.nav-item, .mobile-nav-item').each(function () // { // $(this).removeClass('active'); // }); // $('.main-nav div[id=livestream], .mobile-nav div[id=livestream]').addClass('active'); //} //if ( $(window).scrollTop() > scheduleLoc && $(window).scrollTop() < travelLoc) //{ // $('.nav-item, .mobile-nav-item').each(function () // { // $(this).removeClass('active'); // }); // $('.main-nav div[id=schedule], .mobile-nav div[id=schedule]').addClass('active'); //} //if ( $(window).scrollTop() > travelLoc && $(window).scrollTop() < faqLoc) //{ // $('.nav-item, .mobile-nav-item').each(function () // { // $(this).removeClass('active'); // }); // $('.main-nav div[id=travel], .mobile-nav div[id=travel]').addClass('active'); //} //if ( $(window).scrollTop() > faqLoc) //{ // $('.nav-item, .mobile-nav-item').each(function () // { // $(this).removeClass('active'); // }); // $('.main-nav div[id=faq], .mobile-nav div[id=faq]').addClass('active'); //} }
비교하기