PageSourceSearch

https://account.chessbase.com/Scripts/util/fileUploadFake.js

js chessbase.com collected 2026-10-01 10:23:59 UTC 1,055 bytes, 56 lines download raw bytes

1jQuery.prototype.fileUploadFake = function ()
2{
3	var $this = $( this );
4
5	var $input = $( "input[type='file']", $this );
6
7	var $btn = $( "button", $this ).click( function ( _evt )
8	{
9		$input.click();
10		_evt.preventDefault();
11		return false;
12	} );
13
14
15	var $name = $( "span.filename", $this );
16	var $img = $( "img.preview", $this );
17
18
19	$input.change( function ( _evt )
20	{
21		var path = this.value;
22		var name = path.split( /(\\|\/)/g ).pop();
23
24		$name.text( name );
25
26		$img.attr("src", "");
27		if ( this.files && this.files.length )
28		{
29			var fileUp = this.files[0];
30
31			if ( fileUp )
32			{
33				if ( fileUp.getAsDataURL )
34				{
35					var url = fileUp.getAsDataURL();
36					$img.attr( "src", url );
37				}
38				else if ( window.FileReader )
39				{
40					var rdr = new FileReader();
41					rdr.onloadend = function ()
42					{
43						var url = rdr.result;
44						$img.attr( "src", url );
45					};
46					rdr.readAsDataURL( fileUp );
47				}
48			}
49		}
50	} );
51};
52
53$( function ()
54{
55	$( ".fake-upload" ).fileUploadFake();
56} );

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.