PageSourceSearch

https://sakura-kids.com/wp-content/themes/theme/js/add0.js?ver=73e41c5e604780e82c8a50b54d84761b

js sakura-kids.com collected 2026-10-06 08:09:48 UTC 7,808 bytes, 237 lines download raw bytes

1$(function(){
2
3//診療時間にアイコン搭載
4    $('.header_week').each(function(){
5        var txt = $(this).html();
6        $(this).html(
7            txt.replace(/診療時間はこちら/g,'<i class="material-icons">chevron_right</i>  診療時間'));
8    });
9});
10//TELにアイコン搭載
11//2019.06.03 change start
12// $(function(){
13//     $('.header_tel').each(function(){
14//         var txt = $(this).html();
15//         $(this).html(
16//             txt.replace(/TEL/g,'<i class="material-icons">local_phone</i>'));
17//     });
18// });
19$(function(){
20    $('.header_tel').each(function(){
21        var txt = $(this).html();
22        var url = location.href;
23        var rep_atag = "";
24        if ( url.includes('?') ) {
25          params = url.split('?');
26          sparams = params[1].split("&");
27          var paramArray = [];
28          for ( i = 0; i < sparams.length; i++ ) {
29              sval = sparams[i].split("=");
30              paramArray.push(sval[0]);
31              paramArray[sval[0]] = sval[1];
32          }
33          if ( paramArray["mb_preview"] == "true") {
34              var rep_atag = "<a href=\"tel: #clinictel\" onclick=\"ga('send', 'event', 'click’, 'tel');ga('newTracker.send', 'event', 'click', 'tel');\">";
35          }
36        }
37
38        $(this).html(
39          txt.replace(/TEL/g,'<i class="material-icons">local_phone</i>' + rep_atag)
40        );
41    });
42});
43//2019.06.03 change end
44
45
46//
47$(function () {
48  $('#images').insertBefore('#contents');
49});
50//地図にアイコン搭載
51$(function(){
52    $('.mapSec_tomappage').each(function(){
53        var txt = $(this).html();
54        $(this).html(
55            txt.replace(/大きい地図はこちら/g,'<i class="material-icons">location_on</i> 大きい地図はこちら'));
56    });
57});
58//スマホにメニューのアイコンを記載
59  $(function(){
60    $('#mobile a').each(function(){
61        var txt = $(this).html();
62        $(this).html(
63            txt.replace(/<img .*?src="(.*?)".*?>/g,'<i class="material-icons">menu</i>'));
64    });
65});
66
67//$(function(){
68//$('#footer').wrapAll('<div class="footercontents" />');
69//});
70
71$(function(){
72$('table').wrap('<div class="scroll-table" />');
73});
74
75$(function(){
76//以下まとめてfunction
77
78  var headerWeek = $('.header_week p');
79  if (headerWeek.length != 0) {
80    headerWeek.html(headerWeek.html().replace(/\<br\>/gi,''));
81    headerWeek.find('i').appendTo(headerWeek.find('a'));
82  }
83  //var infoData = $('.infoSec .info_date');
84  //if (infoData.length != 0) {
85  //  infoData.html(infoData.html().replace(/\[|\]|\s/gi,''));
86  //}
87  $('#searchsubmit').attr('src','https://wevery.jp/wp-content/uploads/2019/05/icon_find.png');
88  //$('.flexslider .slides').append($('.caption-wrap'));
89  for(var i = 0; i < $('.flexslider .slides .ms-image').length; i++){
90    //alert($('.caption-wrap').eq(i).html());
91    $('.flexslider .slides .ms-image').append($('.caption-wrap').eq(i).val());
92  }
93  $('#footer').append($('#footer .address'));
94
95
96
97  $('#header .header_tel .tel a').text('TEL');
98  //$('.banner.smart_phonebottom').before($('.banner.smart_phonetop'));
99  $('#menu-main_menu').before('<div class="menu-side_top"></div>');
100
101  //$('.menu-side_top #page_search').attr('id','page_search2');
102  //$('.menu-side_top #s').attr('id','s2');
103  //$('.menu-side_top #searchsubmit').attr('id','searchsubmit2');
104   $('#mobile').on('click', function() {
105    if ($(this).hasClass('side-open')) {
106      $(this).delay(300).queue(function() {
107        $(this).removeClass('side-open').dequeue();
108        $('#header .header_tel').removeClass('side-open').dequeue();
109      });
110    } else {
111      $(this).addClass('side-open');
112      $('#header .header_tel').addClass('side-open');
113    }
114  });
115  $('#sidr .close').on('click', function() {
116    if ($('#mobile').hasClass('side-open')) {
117      $('#mobile').delay(300).queue(function() {
118        $('#mobile').removeClass('side-open').dequeue();
119        $('#header .header_tel').removeClass('side-open').dequeue();
120      });
121    }
122  });
123
124  $('#sidr .menu_box h2').on('click', function() {
125    $(this).toggleClass('active').next().slideToggle(400);
126  });
127  $('#sidr ul#menu-main_menu > li').each(function(index, element){
128    if ($(this).find('.sub-menu').length > 0) {
129      $(this).children('a').after('<div class="accordion-elm">▼</div>');
130    }
131  });
132  $('#sidr ul#menu-main_menu > li .accordion-elm').on('click', function() {
133    $(this).toggleClass('active').next().slideToggle(400);
134  });
135
136//まとめてfunctionここまで
137});
138
139//2019.09.03 add start
140//--------------------------------------------
141// main article内に「<p><a href="hogehoge.com"></p>」の形式があったら
142// <a>に自動的に class="css_btn_class" を追加
143//--------------------------------------------
144$(function(){
145  //正規表現を指定
146  //2021.03.01 change 1~2文字でもclassを指定できるように変更
147  //var match_str = new RegExp('^<a (.*)href=(.*)>([^<].+[^>])</a>$', 'gm');
148  var match_str = new RegExp('^<a (.*)href=(.*)>([^<]*[^>])</a>$', 'gm');
149  var match_str_except = new RegExp('</a>[^.*]<a(.*)', 'gm');
150  //pタグの中から、正規表現で一致する対象を検索
151  $('#main article p').each(function(index, element){
152    if($(element).html().match(match_str)){
153      //<a>が連続している場合に、間に他の文章がなければボタンにする
154      if(!$(element).html().match(match_str_except)){
155        //「class=css_btn_class」を付与
156        $(element).children('a').addClass('css_btn_class');
157      }
158    }
159  });
160});
161//2019.09.03 add end
162
163//detailsをIEに対応させる
164window.onload = function(){ 
165void (function (root, factory) {
166  if (typeof define === 'function' && define.amd) define(factory)
167  else if (typeof exports === 'object') module.exports = factory()
168  else factory()
169}(this, function () {
170  var DETAILS = 'details'
171  var SUMMARY = 'summary'
172
173  var supported = checkSupport()
174  if (supported) return
175
176  // Add a classname
177  document.documentElement.className += ' no-details'
178
179  window.addEventListener('click', clickHandler)
180
181  injectStyle('details-polyfill-style',
182    'html.no-details ' + DETAILS + ':not([open]) > :not(' + SUMMARY + ') { display: none; }\n' +
183    'html.no-details ' + DETAILS + ' > ' + SUMMARY + ':before { content: "\u25b6"; display: inline-block; font-size: .8em; width: 1.5em; }\n' +
184    'html.no-details ' + DETAILS + '[open] > ' + SUMMARY + ':before { content: "\u25bc"; }')
185
186  /*
187   * Click handler for `<summary>` tags
188   */
189
190  function clickHandler (e) {
191    if (e.target.nodeName.toLowerCase() === 'summary') {
192      var details = e.target.parentNode
193      if (!details) return
194
195      if (details.getAttribute('open')) {
196        details.open = false
197        details.removeAttribute('open')
198      } else {
199        details.open = true
200        details.setAttribute('open', 'open')
201      }
202    }
203  }
204
205  /*
206   * Checks for support for `<details>`
207   */
208
209  function checkSupport () {
210    var el = document.createElement(DETAILS)
211    if (!('open' in el)) return false
212
213    el.innerHTML = '<' + SUMMARY + '>a</' + SUMMARY + '>b'
214    document.body.appendChild(el)
215
216    var diff = el.offsetHeight
217    el.open = true
218    var result = (diff != el.offsetHeight)
219
220    document.body.removeChild(el)
221    return result
222  }
223
224  /*
225   * Injects styles (idempotent)
226   */
227
228  function injectStyle (id, style) {
229    if (document.getElementById(id)) return
230
231    var el = document.createElement('style')
232    el.id = id
233    el.innerHTML = style
234
235    document.getElementsByTagName('head')[0].appendChild(el)
236  }
237}))}; // 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.