PageSourceSearch

https://www.yomiuri.co.jp/yomidr/wp-content/themes/yomidr/resources/js/switch-device.js?ver=1.0.0

js yomiuri.co.jp collected 2026-09-24 07:59:49 UTC 759 bytes, 28 lines download raw bytes

1'use strict';
2
3(function($){
4  $(document).ready( function($){
5    var $pc = $('.pc');
6    if ($pc.length) {
7      var $link = $pc.find('a');
8      if ($link.length) {
9        var url = location.href;
10		url = url.replace( /(\?|&)site-view=(.*)(&?).*$/, '' );
11        url += (url.indexOf('?') == -1) ? '?' : '&';
12        url += 'site-view=pc';
13        $link.attr('href', url);
14      }
15    }
16	var $sp = $( '.return-to-sp' );
17	if( $sp.length ) {
18      	var $link = $sp.find( 'a' );
19      	if ( $link.length ) {
20      	  var url = location.href;
21		  url = url.replace( /(\?|&)site-view=(.*)(&?).*$/, '' );
22      	  url += ( url.indexOf('?') == -1 ) ? '?' : '&';
23      	  url += 'site-view=smart';
24      	  $link.attr( 'href', url );
25      	}
26	}
27  });
28}(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.