PageSourceSearch

https://shop.zundamochi.com/js/change_status.js?1790909464115

js zundamochi.com collected 2026-10-07 01:07:58 UTC 925 bytes, 28 lines download raw bytes

1((q,on)=>{
2	on('click','a',()=>{
3		const nextPageEl = q('#next_page');
4		if (!nextPageEl) return
5
6		// add history (カテゴリーも考慮。検索はpage対応してない)
7		var href = window.location.href;
8		var url = q('#base_url').value;
9		if (url.substring(url.length - 1) != '/') {
10			url = url + '/';
11		}
12		var categoryStr = href.match(/categories\/.+/);
13		if (categoryStr != null) {
14			// page対策
15			var re = /([0-9]+\/)([0-9]+)$/;
16			categoryStr = categoryStr[0].replace(re, "$1");
17			if (categoryStr.substring(categoryStr.length - 1) != '/') {
18				categoryStr = categoryStr + '/';
19			}
20		} else {
21			categoryStr = "";
22		}
23		var next_page = nextPageEl.textContent - 1;
24		if (next_page > 1 && href.match(/\/search\?q/) == null) {
25			window.history.pushState(null, null, url + categoryStr + next_page);
26		}
27	});
28})(s=>document.querySelector(s),(t,s,l)=>document.addEventListener(t,e=>e.target.closest(s)&&l()));

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.