PageSourceSearch

https://onosha.com/blog2/wp-content/themes/gold-blog/js/sort-tab-changer.js?ver=1.0.7

js onosha.com collected 2026-09-29 05:55:47 UTC 1,009 bytes, 39 lines download raw bytes

1// ------------------------------------------
2// アーカイブページの並べ替えタブ切り替え
3// ------------------------------------------
4
5( function ( $ ) {
6	function changeOrder( sort ) {
7		$.post( fit_sort_tab_changer_vars.ajax_url, {
8			action: 'fit-common-post-change-sort',
9			sort: sort,
10			nonce: fit_sort_tab_changer_vars.ajax_nonce,
11		} ).done( function ( response ) {
12			if ( response.success ) {
13				if ( 1 < Number( fit_sort_tab_changer_vars.current ) ) {
14					location.href = fit_sort_tab_changer_vars.base_link;
15				} else {
16					location.reload();
17				}
18			} else {
19				onError();
20			}
21		} ).fail( function () {
22			onError();
23		} );
24	}
25
26	function onError() {
27		alert( 'データの取得に失敗しました。' );
28		console.log( 'データの取得に失敗しました。' );
29	}
30
31	$( function() {
32		$( '#sort_new' ).on( 'click', function () {
33			changeOrder( 'new' );
34		} );
35		$( '#sort_rank' ).on( 'click', function () {
36			changeOrder( 'rank' );
37		} );
38	});
39} )( jQuery );

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.