-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathandroid_frame.php
134 lines (104 loc) · 2.99 KB
/
android_frame.php
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!doctype html>
<html>
<head>
<base target="_parent">
<meta id="viewport" name="viewport" content ="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<script src="/js/jquery.stayInWebApp.min.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type "text/javascript">
$(document).ready(function() {
$(function() {
$.stayInWebApp('a.stay');
});
});
$(function() {
$.stayInWebApp();
});
$(document).bind('touchmove', false);
function stopScrolling( touchEvent ) { touchEvent.preventDefault(); }
document.addEventListener( 'touchstart' , stopScrolling , false );
document.addEventListener( 'touchmove' , stopScrolling , false );
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('iframe').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('iframe').height= the_height;
}
var w = $(window).width();
var h = $(window).height();
alert('Attempting to conform for ' + w + 'x' + h + '.');
$(document).ready(function() {
getElementById('iframe').height = $(window).height();
getElementById('iframe').width = $(window).width();
} );
</script>
<style type="text/css">
<!--
html, body { height: }
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background: #7e7e7e;
}
@media (min-width:500px) {
/* Nexus 7 (or 7" tablets) */
iframe {
overflow: hidden;
-moz-transform: scale(0.60, 0.60);
-webkit-transform: scale(0.60, 0.60);
-o-transform: scale(0.60, 0.60);
-ms-transform: scale(0.60, 0.60);
transform: scale(0.60, 0.60);
-moz-transform-origin: top left;
-webkit-transform-origin: top left;
-o-transform-origin: top left;
-ms-transform-origin: top left;
transform-origin: top left;
}
}
@media (min-width:801px) {
/* Nexus 10 (or 10" tablets) */
iframe {
overflow: hidden;
-moz-transform: scale(1.0, 1.0);
-webkit-transform: scale(1.0, 1.0);
-o-transform: scale(1.0, 1.0);
-ms-transform: scale(1.0, 1.0);
transform: scale(1.0, 1.0);
-moz-transform-origin: top left;
-webkit-transform-origin: top left;
-o-transform-origin: top left;
-ms-transform-origin: top left;
transform-origin: top left;
}
}
/* if you're using a desktop on android?? */
@media (min-width:1024px) {
iframe {
overflow: hidden;
} }
@media (min-width:1225px) {
iframe {
overflow: hidden;
-webkit-transform: scale(1.2);
transform: scale(1.2);
-webkit-transform-origin: 0 0;
-moz-transform: scale(1.2);
-moz-transform-origin: 0 0;
-o-transform: scale(1.2);
-o-transform-origin: 0 0;
-ms-transform: scale(1.2);
-ms-transform-origin: 0 0;
} }
-->
</style>
</head>
<body style="margin:0px;padding:0px;overflow:hidden">
<iframe name="ipad" src="/splash.php" width="1024px" height="768px" scrolling="no" frameborder="0"> </iframe>
</body>
</html>