]> git.saurik.com Git - cydget.git/blob - PhotoExamplePlus.cydget/background.html
Fix PhotoExample for iOS 8.x (slow, but whatever).
[cydget.git] / PhotoExamplePlus.cydget / background.html
1 <html><head>
2 <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
3 <style>
4 * {
5 border: 0;
6 -moz-border-radius: 0;
7 -webkit-border-radius: 0;
8 box-sizing: border-box;
9 -moz-box-sizing: border-box;
10 -ms-box-sizing: border-box;
11 -webkit-box-sizing: border-box;
12 /*font-family: inherit;*/
13 font-size: 100%;
14 font-style: inherit;
15 font-weight: inherit;
16 margin: 0;
17 outline: 0;
18 padding: 0;
19 text-decoration: none;
20 vertical-align: baseline;
21 }
22
23 * {
24 -webkit-touch-callout: none;
25 -webkit-text-size-adjust: none;
26 -webkit-user-select: none;
27 }
28
29 body {
30 height: 100%;
31 width: 100%;
32 background: none;
33 background-color: black;
34 }
35
36 #content {
37 height: 100%;
38 width: 100%;
39 }
40
41 #content td {
42 vertical-align: middle;
43 }
44
45 #content img {
46 max-width: 100%;
47 max-height: 100%;
48 }
49
50 #shadow {
51 position: absolute;
52 width: 100%;
53 height: 164px;
54 top: 0px;
55 left: 0px;
56 background-color: rgba(87, 87, 87, 0.5);
57 }
58 </style></head><body>
59 <table id="content" cellspacing="0" cellpadding="0"><tr><td><script type="text/javascript">
60 var album = PLPhotoLibrary.sharedPhotoLibrary.albums[0].userEditableAssets.array;
61 var length = album.length;
62 if (length != 0) {
63 var index = Math.floor(Math.random() * length);
64 var path = album[index].pathForLargeDisplayableImageFile;
65 document.write('<img src="' + path + '"/>');
66 }
67 </script></td></tr></table>
68
69 <div id="shadow"></div>
70 </body></html>