PageSourceSearch

https://yamashita-eyeclinic.net/wp-content/themes/theme/js/add52.js?ver=c76d57ff48819de0aeee588248c1088f

js yamashita-eyeclinic.net collected 2026-10-05 11:15:45 UTC 7,511 bytes, 243 lines download raw bytes

1$(function(){
2  //h1文字サイズ調整
3  $(".h1_text").each(function() {
4    var h1_len = $(this).html();
5    if(h1_len.length > 12){
6      $(this).addClass("small");
7    }
8  });
9
10  //ヘッダー地図へのリンク
11  $('.header_address').each(function() {
12    var txt = $(this).html();
13    $(this).html(txt.replace(/\[/g, '').replace(/\]/g, ''));
14  });
15
16  //ヘッダー診療時間のリンク
17  $('.header_week').each(function(){
18    var txt = $(this).html();
19    $(this).html(txt.replace(/診療時間はこちら/g,'診療時間'));
20  });
21
22  //ヘッダーTEL並び替え
23  $(".header_tel").insertAfter(".header_week");
24
25  //サイト内検索
26  $("#searchform").insertAfter("#nav");
27  $('#searchsubmit').attr('src','https://wevery.jp/wp-content/uploads/2019/05/icon_find.png');
28
29  //メインスライド並び替え
30  $('#images').insertBefore('#contents');
31
32  //gNavの固定
33  var _window = $(window),
34    _header = $('#gNav'),
35    headerBottom;
36
37  _window.on('scroll',function(){
38    headerBottom = $('#header').height();
39    if(_window.scrollTop() > headerBottom &&  _header.hasClass('is-fixed') == false){
40      _header.css({"top": '-100px'});
41      _header.addClass('is-fixed');
42      _header.animate({"top": 0},600);
43    }
44    else if(_window.scrollTop() < headerBottom &&  _header.hasClass('is-fixed') == true){
45      _header.removeClass('is-fixed');
46    }
47  });
48
49  _window.trigger('scroll');
50
51  //お知らせの日時変更
52  $('.info_date').each(function(){
53    var txt = $(this).html();
54    $(this).html(txt.replace(/\[/g,'').replace(/]/g,'').replace(/更新/g,'').replace(/ /g,''));
55  });
56
57  $('.info_date').each(function(){
58    var txt = $(this).html();
59    $(this).html(txt.replace(/ /g,''));
60    var change = $(this).html(txt.replace(/ /g,''));
61    var chart = change.html().split(".");
62    change.html(chart[0] + '年' + chart[1] + '月' + chart[2] + '日');
63  });
64
65  //トップに戻るボタン
66  $('.pagetop').each(function(){
67    var txt = $(this).html();
68    $(this).html(txt.replace(/\▲ ページのトップに戻る/g,'<i class="material-icons">expand_less</i>'));
69  });
70
71  var topBtn = $('.pagetop');
72  topBtn.hide();
73
74  //スクロールが100に達したらボタン表示
75  $(window).scroll(function () {
76    if ($(this).scrollTop() > 100) {
77      topBtn.fadeIn();
78    } else {
79      topBtn.fadeOut();
80    }
81  });
82
83  //スクロールしてトップ
84  topBtn.on('click', function () {
85    $('body,html').animate({
86      scrollTop: 0
87    }, 500);
88    return false;
89  });
90
91  //地図ボタンにアイコン搭載
92  $('.mapSec_tomappage').each(function(){
93    var txt = $(this).html();
94    $(this).html(
95      txt.replace(/大きい地図はこちら/g,'<i class="material-icons">location_on</i> 大きい地図はこちら'));
96  });
97
98  //スマホのメニューアイコン
99  $('#mobile a').each(function(){
100    var txt = $(this).html();
101    $(this).html(
102      txt.replace(/<img .*?src="(.*?)".*?>/g,'<i class="material-icons">menu</i>'));
103  });
104
105  //テーブルスクロール
106  $('table').wrap('<div class="scroll-table" />');
107
108  //ブログサイドメニュー
109  $('#side_blog').insertBefore('#sideMenu');
110});
111
112//以下まとめてfunction
113$(function(){
114  var headerWeek = $('.header_week p');
115  if (headerWeek.length != 0) {
116    headerWeek.html(headerWeek.html().replace(/\<br\>/gi,''));
117    headerWeek.find('i').appendTo(headerWeek.find('a'));
118  }
119
120  for(var i = 0; i < $('.flexslider .slides .ms-image').length; i++){
121    $('.flexslider .slides .ms-image').append($('.caption-wrap').eq(i).val());
122  }
123
124  $('#menu-main_menu').before('<div class="menu-side_top"></div>');
125
126  $('#footer').append($('#footer .address'));
127
128  // safariだと上手くハンバーガメニューが動作しないため、クリックイベントの指定方法を変更
129  $(document).on('click', '#mobile', function() {
130    if ($(this).hasClass('side-open')) {
131      $(this).delay(300).queue(function() {
132        $(this).removeClass('side-open').dequeue();
133        $('#header .header_tel').removeClass('side-open').dequeue();
134      });
135    } else {
136      $(this).addClass('side-open');
137      $('#header .header_tel').addClass('side-open');
138      $('body').css({'overflow':'hidden','height':'100vh','position':''});
139    }
140  });
141
142  $('#sidr .close').on('click', function() {
143    if ($('#mobile').hasClass('side-open')) {
144      $('#mobile').delay(300).queue(function() {
145        $('#mobile').removeClass('side-open').dequeue();
146        $('#header .header_tel').removeClass('side-open').dequeue();
147        $('body').css({'overflow':'','height':''});
148      });
149    }
150  });
151
152  $('#sidr .menu_box h2').on('click', function() {
153    $(this).toggleClass('active').next().slideToggle(400);
154  });
155
156  $('#sidr ul#menu-main_menu > li').each(function(index, element){
157    if ($(this).find('.sub-menu').length > 0) {
158      $(this).children('a').after('<div class="accordion-elm"><i class="material-icons">add</i></div>');
159    }
160  });
161
162  $('#sidr ul#menu-main_menu > li .accordion-elm').on('click', function() {
163    $(this).toggleClass('active').next().slideToggle(400);
164  });
165});
166//まとめてfunctionここまで
167
168//detailsをIEに対応させる
169window.onload = function(){
170  void (function (root, factory) {
171    if (typeof define === 'function' && define.amd) define(factory)
172    else if (typeof exports === 'object') module.exports = factory()
173    else factory()
174  }(this, function () {
175    var DETAILS = 'details'
176    var SUMMARY = 'summary'
177
178    var supported = checkSupport()
179    if (supported) return
180
181    // Add a classname
182    document.documentElement.className += ' no-details'
183
184    window.addEventListener('click', clickHandler)
185
186    injectStyle('details-polyfill-style',
187      'html.no-details ' + DETAILS + ':not([open]) > :not(' + SUMMARY + ') { display: none; }\n' +
188      'html.no-details ' + DETAILS + ' > ' + SUMMARY + ':before { content: "\u25b6"; display: inline-block; font-size: .8em; width: 1.5em; }\n' +
189      'html.no-details ' + DETAILS + '[open] > ' + SUMMARY + ':before { content: "\u25bc"; }')
190
191    /*
192    * Click handler for `<summary>` tags
193    */
194
195    function clickHandler (e) {
196      if (e.target.nodeName.toLowerCase() === 'summary') {
197        var details = e.target.parentNode
vendor: 1,079 bytes, lines 198-243
198        if (!details) return
199
200        if (details.getAttribute('open')) {
201          details.open = false
202          details.removeAttribute('open')
203        } else {
204          details.open = true
205          details.setAttribute('open', 'open')
206        }
207      }
208    }
209
210    /*
211    * Checks for support for `<details>`
212    */
213
214    function checkSupport () {
215      var el = document.createElement(DETAILS)
216      if (!('open' in el)) return false
217
218      el.innerHTML = '<' + SUMMARY + '>a</' + SUMMARY + '>b'
219      document.body.appendChild(el)
220
221      var diff = el.offsetHeight
222      el.open = true
223      var result = (diff != el.offsetHeight)
224
225      document.body.removeChild(el)
226      return result
227    }
228
229    /*
230    * Injects styles (idempotent)
231    */
232
233    function injectStyle (id, style) {
234      if (document.getElementById(id)) return
235
236      var el = document.createElement('style')
237      el.id = id
238      el.innerHTML = style
239
240      document.getElementsByTagName('head')[0].appendChild(el)
241    }
242  }))
243}; // eslint-disable-line semi

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.