PageSourceSearch

https://onoya.jp/js/news.js

js onoya.jp collected 2026-10-08 23:49:15 UTC 623 bytes, 22 lines download raw bytes

1//お知らせ一覧用
2$(function () {
3    'use strict';
4
5    const url = new URL(window.location.href);
6    if (url.href.match(/category/)) {
7        const arr = url.href.split('/');
8        $('li.' + arr[5]).addClass('active');
9    } else {
10        $('li.all').addClass('active');
11    }
12
13    $('li.news_cat').on('click', function () {
14        const className = $(this).attr('class').replace(/ active/, '').replace(/ news_cat/, '');
15
16        if (className.match(/all/)) {
17            window.location.href = '/news/';
18        } else {
19            window.location.href = '/news/category/'+ className;
20        }
21    });
22});

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.