PageSourceSearch

https://www.winschool.jp/assets/js/timer.js

js winschool.jp collected 2026-10-04 05:26:36 UTC 680 bytes, 25 lines download raw bytes

1//期間指定表示用
2//HTMLの書き方は以下参照
3//<span class="view_timer" data-start-date="2021/5/19 10:00" data-end-date="2021/5/19 18:00"></span>
4$(document).ready(function() {
5  $(".view_timer").each(function(index, target) {
6    var startDate = $(this).attr("data-start-date");
7    var endDate = $(this).attr("data-end-date");
8    var nowDate = new Date();
9
10    if (startDate) {
11      startDate = new Date(startDate);
12    } else {
13      startDate = nowDate;
14    }
15    if (endDate) {
16      endDate = new Date(endDate);
17    }
18
19    if (startDate <= nowDate && (!endDate || nowDate <= endDate)) {
20      $(this).show();
21    } else {
22      $(this).hide();
23    }
24  });
25});

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.