PageSourceSearch

http://www.nobeer-nolife.com/shared/js/shared.js

js nobeer-nolife.com collected 2026-10-05 18:08:29 UTC 6,825 bytes, 278 lines download raw bytes

1/*!
2 * ScriptName: shared.js
3 *
4 * FoodConnection
5 * http://foodconnection.jp/
6 * http://foodconnection.vn/
7 *
8 */
9let vh = window.innerHeight * 0.01;
10document.documentElement.style.setProperty('--vh', vh+'px');
11
12$(document).ready(function () {
13  $('.slick-auto').on('touchstart', function (e) {
14    $(this).slick('slickPlay');
15  });
16	
17
18});
19
20//var UA = navigator.userAgent;
21//		if(navigator.userAgent.match(/Trident\/7\./)) {
22//		  $('body').on("mousewheel", function () {
23//			  event.preventDefault();
24//			  var wd = event.wheelDelta;
25//			  var csp = window.pageYOffset;
26//			  window.scrollTo(0, csp - wd);
27//		  });
28//		}
29
30
31$(document).ready(function () {
32  'use strict';
33  $('.scroll_box').slideUp(0);
34  $('.btn-acc').click(function () {
35    if ($(this).hasClass('close')) {
36      $(this).next().slideDown(1000);
37      $(this).removeClass('close').addClass('open');
38    } else {
39      $(this).next().slideUp(500);
40      $(this).removeClass('open').addClass('close');
41    }
42
43  });
44
45	
46});
47
48
49$(function () {
50  'use strict';
51
52
53});
54
55
56
57
58
59
60$(function () {
61  $('body').removeClass('navOpen');
62  $(".hamburger,.brand_ham").click(function () {
63    if ($('body').hasClass('navOpen')) {
64      $('body').addClass('navClose');
65      $('body').removeClass('navOpen');
66     // $('body').css('position', 'static');
67      //$(window).scrollTop(offsetZ);
68      $(".hamburger,.brand_ham").removeClass('is-active');
69		
70    } else {
71      $('body').addClass('navOpen');
72      $('body').removeClass('navClose');
73    /* offsetZ = window.pageYOffset;
74	 
75      $('body').css({
76        position: 'fixed',
77        width: '100%',
78        'top': -offsetZ + 'px'
79      });
80	  */
81      $(".hamburger,.brand_ham").addClass('is-active');
82      return false;
83    }
84  });
85
86
87    
88
89   $("#navigation  a, #navigation .close ,#navigation  .tel a,#navigation .soc a").click(function () {
90    $('body').removeClass('navOpen');
91    $('body').addClass('navClose');
92    $(".hamburger,.brand_ham").removeClass('is-active');
93   // $('body').css('position', 'static');
94  });
95   $(".tel-click").click(function () {
96    $('body').removeClass('hs-telpop');
97    $('body').addClass('hs-telpop');
98    
99   
100  });
101  
102  $(".hd-nav .popup").click(function () {
103    $('body').removeClass('hs-corona');
104    $('body').addClass('hs-corona');
105    
106   
107  });
108  
109		
110	
111$(".btn-copy").click(function () {
112    
113	$(".btn-copy").addClass('hs-copie')
114  });
115	
116
117	
118});
119$(window).load(function(e) {
120	var hash1 = location.hash;
121	var $root = $('html, body');
122	if( hash1 != "" && $(hash1).length > 0){
123		$(hash1).click();
124	}
125
126});
127
128
129
130$(window).load(function(e) {
131  var hash1 = location.hash;
132  var $root = $('html, body');
133    var navH = $(".nav-fixed").outerHeight();
134  if( hash1 != ""){  
135   var top01 = $(hash1).offset();  
136   //alert(hash1);
137   $('html,body').animate({ scrollTop:top01.top- navH}, 500);  
138  }
139});
140
141
142
143$(document).ready(function () {
144
145  
146  
147  $(window).scroll(function () {
148  
149var TargetPos = $("section").offset().top;
150    var ScrollPos = $(window).scrollTop();
151
152    if (ScrollPos > TargetPos) {
153
154
155      $("body").addClass('has-nav');
156
157    } else {
158
159
160      $("body").removeClass('has-nav');
161
162    }
163
164 
165      
166  });
167
168
169});
170
171function objectFitPolyfill() {
172  // Internet Explorer 6-11
173  var isIE = /*@cc_on!@*/ false || !!document.documentMode;
174  // Edge 20+
175  var isEdge = !isIE && !!window.StyleMedia;
176  if (isIE === true || isEdge === true) {
177    $('.object-fit-cover').each(function (index, element) {
178      let src = $(element).attr('data-src');
179      if (src === undefined) {
180        src = $(element).attr('src')
181      }
182      $(element).css('display', 'none');
183      $(element).parent().css({
184        'background-image': "url('" + src + "')",
185        'background-repear': 'no-repeat',
186        'background-size': 'cover',
187        'background-position': 'center center'
188      });
189    });
190  }
191}
192$(document).ready(function () {
193  objectFitPolyfill()
194})
195
196
197
198
199
200
201$(document).ready(function () {
202  if ($('.nav-fixedd[scroll-active]').length && $('.nav-fixedd').attr('scroll-active') === "true")
203    $(document).on('scroll', onScroll)
204  $('.nav-fixedd a[href*="#"]').on('click', function () {
205    var e = $(this).attr('href')
206    var h = $('.nav-fixed').outerHeight()
207    var b = $(e).length ? $(e).offset().top : 0
208    $('html, body').animate({
209      scrollTop: (b + 3 - h)
210    }, 500)
211  })
212});
213
214
215
216
217
218function onScroll() {
219  var scroll = $(window).scrollTop()
220  var header = $('.nav-fixed').outerHeight()
221  $('.nav-fixedd a[href^="#"]').each(function () {
222    var el = $(this).attr('href')
223    var offset = $(el).length ? $(el).offset().top : 0
224    /*if($(this).find('img').length){
225			var _src_ = $(this).find('img').attr("src");
226			_src_ = _src_.replace(/^(.*?)_on\.(.*)$/, "$1.$2");
227			$(this).find('img').attr("src", _src_)
228		}
229    */
230    if ((scroll + header + 3) >= offset && ($(el).outerHeight() + offset) > (scroll + header)) {
231      $('.nav-fixedd a[href^="#"]').removeClass('active')
232      $(this).addClass('active')
233      /*if($(this).find('img').length){
234				$('.nav-fixedd a[href^="#"] img').addClass('btn')
235				$(this).find('img').removeClass('btn')
236				$('.nav-fixedd a[href^="#"] img').each(function(){
237					var src = $(this).attr('src')
238					var newSrc = src.replace('_on', '')
239					$(this).attr('src', newSrc)
240				})
241
242				$(this).find('img').attr("src").match(/^(.*)(\.{1}.*)/g);
243				var newSrc = RegExp.$1 + "_on" + RegExp.$2;
244
245				$(this).find('img').attr("src", newSrc); // update src
246			}
247      */
248      // $(this).find('img').trigger('mouseout').trigger('mouseover')
249    }
250  })
251}
252var lastScrollTop = 0;
253
254
255
256
257
258//fix scroll ios
259var overflowIsHidden = function(node) {
260    var style = getComputedStyle(node);
261    return style.overflow === "hidden" || style.overflowX === "hidden" || style.overflowY === "hidden";
262}
263var isItScrollableWithoutVisibleScrollbars = function(el) {
264    if (el === null) return false;
265    var isScrollable = false,
266        hasScrollbars = false;
267    isScrollable = el.scrollHeight > el.offsetHeight ? true : false; // first, lets find out if it has scrollable content
268    // isScrollable = el.scrollHeight + 1 > el.clientHeight ? true : false; // first, lets find out if it has scrollable content
269    if (isScrollable) hasScrollbars = (el.offsetWidth > el.scrollWidth) ? true : false; // if it's scrollable, let's see if it likely has scrollbars
270    // if (isScrollable) hasScrollbars = (el.offsetWidth > el.scrollWidth - 1) ? true : false; // if it's scrollable, let's see if it likely has scrollbars
271    if (isScrollable && !hasScrollbars && !overflowIsHidden(el)) return true;
272    else return false;
273};
274document.addEventListener("touchmove", function(e) {
275    if (document.body.classList.contains("navOpen") && !isItScrollableWithoutVisibleScrollbars(document.getElementById("navigation"))) e.preventDefault();
276}, {
277    passive: false
278});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.