Update classic.html

pull/72/head
qkqpttgf 2020-05-20 17:21:10 +08:00 committed by GitHub
parent 45205ff347
commit bd568a5630
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 30 additions and 4 deletions

View File

@ -21,8 +21,8 @@
<meta name=viewport content="width=device-width,initial-scale=1"> <meta name=viewport content="width=device-width,initial-scale=1">
<meta name="keywords" content="<!--Keywords-->"> <meta name="keywords" content="<!--Keywords-->">
<meta name="description" content="<!--Description-->"> <meta name="description" content="<!--Description-->">
<link rel="icon" href="<!--base_path-->favicon.ico" type="image/x-icon" /> <link rel="icon" href="<!--base_path-->favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="<!--base_path-->favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<!--base_path-->favicon.ico" type="image/x-icon">
<style type="text/css"> <style type="text/css">
body{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:1em;color:#000;background-color:#f7f7f9;<!--BackgroundStart-->background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-image:url("<!--BackgroundUrl-->");<!--BackgroundEnd-->} body{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:1em;color:#000;background-color:#f7f7f9;<!--BackgroundStart-->background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-image:url("<!--BackgroundUrl-->");<!--BackgroundEnd-->}
a{color:#24292e;cursor:pointer;text-decoration:none} a{color:#24292e;cursor:pointer;text-decoration:none}
@ -222,6 +222,7 @@
<a onclick="sortby('a');"><!--constStr@File--></a> <a onclick="sortby('a');"><!--constStr@File--></a>
<!--ShowThumbnailsStart--> <!--ShowThumbnailsStart-->
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
<!--<label><input type="checkbox" id="originalpic"><!--constStr@OriginalPic--></label>-->
<button onclick="showthumbnails(this);"><!--constStr@ShowThumbnails--></button> <button onclick="showthumbnails(this);"><!--constStr@ShowThumbnails--></button>
<!--ShowThumbnailsEnd--> <!--ShowThumbnailsEnd-->
&nbsp; &nbsp;
@ -640,11 +641,22 @@
strarry=str.split('.'); strarry=str.split('.');
ext=strarry[strarry.length-1].toLowerCase(); ext=strarry[strarry.length-1].toLowerCase();
images = [<!--ImgExts-->]; images = [<!--ImgExts-->];
if (images.indexOf(ext)>-1) get_thumbnails_url(str, files[$i]); if (images.indexOf(ext)>-1) {
if (document.getElementById('originalpic').checked==true) {
var url=files[$i].href;
url=url.substr(0,url.length-8);
get_thumbnails_url(url, str, files[$i], 0);
} else {
var nurl=window.location.href;
if (nurl.substr(-1)!="/") nurl+="/";
var url=nurl+str+'?thumbnails';
get_thumbnails_url(url, str, files[$i], 1);
}
}
} }
obj.disabled='disabled'; obj.disabled='disabled';
} }
function get_thumbnails_url(str, filea) { /*function get_thumbnails_url(str, filea) {
if (!str) return; if (!str) return;
var nurl=window.location.href; var nurl=window.location.href;
if (nurl.substr(-1)!="/") nurl+="/"; if (nurl.substr(-1)!="/") nurl+="/";
@ -657,6 +669,20 @@
if (xhr.responseText!='') filea.innerHTML='<img src="'+xhr.responseText+'" alt="'+str+'">'; if (xhr.responseText!='') filea.innerHTML='<img src="'+xhr.responseText+'" alt="'+str+'">';
} else console.log(xhr.status+'\n'+xhr.responseText); } else console.log(xhr.status+'\n'+xhr.responseText);
} }
}*/
function get_thumbnails_url(url, name, filea, thumb) {
if (!thumb) {
filea.innerHTML='<img src="'+url+'" alt="'+name+'" onload="if (this.offsetWidth>document.getElementById(\'list-div\').offsetWidth) this.style.width=\'100%\';">';
return;
}
var xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.send('');
xhr.onload = function(e){
if (xhr.status==200) {
if (xhr.responseText!='') filea.innerHTML='<img src="'+xhr.responseText+'" alt="'+name+'">';
} else console.log(xhr.status+'\n'+xhr.responseText);
}
} }
<!--ShowThumbnailsEnd--> <!--ShowThumbnailsEnd-->
<!--MorePageStart--> <!--MorePageStart-->