-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathviewer.htm
40 lines (40 loc) · 1.49 KB
/
viewer.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Photo</title>
</head>
<body bgcolor="#000000">
<img src="" id="imag" style="image-orientation:none" onerror="this.src=this.src.split('/').pop();this.onerror=null;">
<script>
var chem = window.location.hash.substring(2);
var rot = window.location.hash.substring(1,2);
chem = chem.replace(/\*/g,"%");
chem = decodeURIComponent(chem);
switch (rot) {
case "1":
document.getElementById("imag").style.maxWidth="95vh";
document.getElementById("imag").style.maxHeight="98vw";
document.getElementById("imag").style.WebkitTransform="rotate(90deg) translate(0px,-100%)";
document.getElementById("imag").style.WebkitTransformOrigin="top left";
break;
case "2":
document.getElementById("imag").style.maxWidth="95vh";
document.getElementById("imag").style.maxHeight="98vw";
document.getElementById("imag").style.WebkitTransform="rotate(270deg) translate(-100%,0px)";
document.getElementById("imag").style.WebkitTransformOrigin="top left";
break;
case "3":
document.getElementById("imag").style.maxWidth="98vw";
document.getElementById("imag").style.maxHeight="95vh";
document.getElementById("imag").style.WebkitTransform="rotate(180deg) translate(-100%,-100%)";
document.getElementById("imag").style.WebkitTransformOrigin="top left";
break;
default:
document.getElementById("imag").style.maxWidth="98vw";
document.getElementById("imag").style.maxHeight="95vh";
}
document.getElementById("imag").src=chem;
</script>
</body>
</html>