PageSourceSearch

https://www.mxtv.co.jp/company/js/common.js?20240930

js mxtv.co.jp collected 2026-10-02 05:44:44 UTC 5,557 bytes, 194 lines download raw bytes

1// header
2fetch("header.html?20260930")
3  .then(response => {
4    return response.text()
5  })
6  .then(data => {
7    document.querySelector("header").innerHTML = data;
8    if (document.URL.match('company.html')) {
9      $('.changeCompany').html('<li><a href="#company">会社情報</a></li><li><a href="#yakuin">役員一覧</a></li><li><a href="#sosiki">組織図</a></li><li><a href="#history">会社沿革</a></li><li><a href="#access">アクセス</a></li><li><a href="#kanren">関連会社</a></li><li><a href="#hogo">国民保護業務計画</a></li><li><a href="#koudou">次世代法に基づく行動計画</a></li><li><a href="#women">女性活躍推進法に基づく行動計画</a></li><li><a href="company.html#brochure">会社案内(PDF)</a></li><li><a href="english.html">Corporate Overview</a></li>');
10    } else if (document.URL.match('progress.html')) {
11      $('.changeProgress').html('<li><a href="#standard">放送基準</a></li><li><a href="#type">放送番組の種別等について</a></li><li><a href="#youth">青少年に見てもらいたい番組</a></li><li><a href="#eew">緊急地震速報とは</a></li><li><a href="#council">放送番組審議会</a></li>')
12    }
13  });
14
15// footer
16fetch("footer.html?20260925")
17  .then(response => {
18    return response.text()
19  })
20  .then(data => {
21    document.querySelector("footer").innerHTML = data;
22  });
23
24// menu
25$('body').on({
26  mouseenter: function () {
27    var i = window.innerWidth;
28    if (i > 1100) {
29      $(this).addClass('on');
30    }
31  },
32  mouseleave: function () {
33    var i = window.innerWidth;
34    if (i > 1100) {
35      $(this).removeClass('on');
36    }
37  },
38  click: function () {
39    var i = window.innerWidth;
40    if (i < 1100) {
41      $(this).toggleClass('active');
42    }
43  }
44}, '.pulldown');
45
46// menu
47$('body').on({
48  mouseenter: function () {
49    var i = window.innerWidth;
50    if (i > 1100) {
51      $(this).parent().addClass('on');
52    }
53  },
54  mouseleave: function () {
55    var i = window.innerWidth;
56    if (i > 1100) {
57      $(this).parent().removeClass('on');
58    }
59  },
60  click: function () {
61    var i = window.innerWidth;
62    if (i < 1100) {
63      $(this).parent().toggleClass('active');
64    }
65  }
66}, '.pulldown ul');
67
68// menu-sp button
69$('body').on({
70  click: function () {
71    $('header').toggleClass('navopen');
72    $('.header-menu__nav').fadeToggle(100);
73    $('.hmb_search form').fadeOut(100);
74    $('.hmb_search .search-close').fadeOut(100);
75    position = window.pageYOffset;
76    scrollFlag = false;
77    window.onscroll = () => {
78      scroll_position = window.pageYOffset;
79      if(position != scroll_position){
80        if(!scrollFlag){
81          scrollFlag = true;
82          $('header').removeClass('navopen');
83          $('.header-menu__nav').fadeOut(100);
84          var i = window.innerWidth;
85          if (i < 1100) {
86            $('.pulldown').removeClass('active');
87          }
88        }
89      }
90    };
91  }
92}, '.header-menu__button');
93
94// menu-sp a
95$('body').on({
96  click: function () {
97    var i = window.innerWidth;
98    if (i < 1100) {
99      $('header').removeClass('navopen');
100      $('.header-menu__nav').fadeOut(100);
101      $('.hmb_search form').fadeOut(100);
102      $('.hmb_search .search-close').fadeOut(100);
103    }
104  }
105}, '.pulldown > ul li a');
106
107// サイト内検索
108$('body').on({
109  click: function () {
110    $('header').toggleClass('searchopen');
111    $('.hmb_search form').fadeToggle(100);
112    $('.hmb_search .search-close').fadeToggle(100);
113    $('header').removeClass('navopen');
114    $('.header-menu__nav').fadeOut(100);
115  }
116}, '.search-icon');
117$('body').on({
118  click: function () {
119    $('header').removeClass('searchopen');
120    $('.hmb_search form').fadeOut(100);
121    $('.hmb_search .search-close').fadeOut(100);
122    $('header').removeClass('navopen');
123    $('.header-menu__nav').fadeOut(100);
124  }
125}, '.search-close');
126
127// contents 
128$('.cpulldown').click(function () {
129  $(this).toggleClass('active');
130  if ($(this).hasClass('active')) {
131    $(this).children('span').html("&#9650;");
132  } else {
133    $(this).children('span').html("&#9660;");
134  }
135});
136
137$('.forspulldown').click(function () {
138  $(this).toggleClass('active');
139});
140
141$('.progpulldown').click(function () {
142  $(this).toggleClass('programs-active');
143});
144
145// ページトップへ戻るボタン
146$(function () {
147  var pagetop = $('#page_top');
148  pagetop.hide();
149  $(window).scroll(function () {
150    if ($(this).scrollTop() > 200) {
151      pagetop.fadeIn();
152    } else {
153      pagetop.fadeOut();
154    }
155  });
156  pagetop.click(function () {
157    $('body, html').animate({
158      scrollTop: 0
159    }, 300);
160    return false;
161  });
162});
163
164// スムーズスクロール 別・同ページ
165$(function () {
166  var urlHash = location.hash;
167  var adjust = 200;
168  var speed = 300;
169  if (urlHash) {
170    $('body,html').stop().scrollTop(0);
171    setTimeout(function () {
172      var target = $(urlHash);
173      var position = target.offset().top - adjust;
174      $('body,html').stop().animate({
175        scrollTop: position
176      }, speed);
177    }, 100);
178  }
179});
180$('body').on({
181  click: function () {
182    var adjust = 200;
183    var speed = 300;
184    var href = $(this).attr("href");
185    var target = $(href == "#" || href == "" ? 'html' : href);
186    var position = target.offset().top - adjust;
187    $('body,html').animate({
188      scrollTop: position
189    }, speed);
190    return false;
191  }
192}, 'a[href^="#"]');
193
194

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.