PageSourceSearch

https://www.kyoto-link.com/data/js/nophoto.js

js kyoto-link.com collected 2026-10-08 05:20:17 UTC 1,815 bytes, 66 lines download raw bytes

1/*----------------------------------------------------------------------------
2 * FileName      : nophoto.js
3 * LastUpdate    : 2010/12/21
4 * Copyright     : マクリー株式会社
5 * Email         : [email protected]
6 *
7 * NoPhoto画像出力用Javascript
8 *
9 *
10 *
11 *
12----------------------------------------------------------------------------*/
13
14$(".load_photo,.normal_photo").ready(function(){
15	$(".load_photo,.normal_photo").each(function(){
16		var img  = new Image();
17		var $img = $(img);
18
19		img.target_img = this;
20
21		$img.load(function(){
22			var $this   = $(this);
23			var target  = this.target_img;
24			var $target = $(target);
25
26			if ( $this.attr("src") != image_nophoto ) {
27				var width    = this.width; // $thisでは取得できない
28				var height   = this.height;
29				var target_w = $target.width ();
30				var target_h = $target.height();
31				var coe_w    = target_w / width;
32				var coe_h    = target_h / height;
33				if ( target_w != 0 || target_w != 0 ) {
34					if ( coe_h < coe_w ) {
35						$target.width ( width * coe_h );
36						$target.height( target_h );
37					} else {
38						$target.width ( target_w );
39						$target.height( height * coe_w );
40					}
41				}
42				$target.parent(":first").css("text-align","center");
43			}
44		}); // load
45
46		$img.error(function() {
47			var $this = $(this);
48			var $target = $(this.target_img);
49			var target_w = $target.width();
50			var target_h = $target.height();
51
52			this.target_img.src    = image_nophoto;
53			this.target_img.width  = target_w;
54			this.target_img.height = target_h;
55		}); // img.onerror
56
57		// 20130617 lazyload対応
58		var original = $(this).attr('original')
59		if ( typeof original == 'undefined' ) {
60			img.src = this.src;
61		} else {
62			img.src = original;
63		}
64	}); // each
65}); // ready
66

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.