-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
145 lines (130 loc) · 4.02 KB
/
Copy pathindex.html
File metadata and controls
145 lines (130 loc) · 4.02 KB
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
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Language Forcer</title>
<!-- Le styles -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<link href='https://fonts.googleapis.com/css?family=Roboto:300' rel='stylesheet' type='text/css'>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="/lib/js/html5.js"></script>
<![endif]-->
<style>
html, body {
font-family: 'Roboto', sans-serif;
box-sizing: border-box;
}
.page-header input,
.page-header select {
color: #333;
}
.page-header button {
background: 0;
border: 0;
outline: 0;
border-radius: 3px;
letter-spacing: 1px;
text-shadow: 0 1px 0 rgba(0,0,0,0.01);
font-size: 15px;
padding: 8px 20px;
border: 1px solid #fff;
margin-left: 25px;
transition: all 0.2s;
}
.page-header button:hover {
background-color: #fff;
color: #000;
}
.page-header select {
margin-left: 25px;
background: #000;
color: #fff;
outline: 0;
border: 1px solid #fff;
padding: 4px 20px;
border-radius: 3px;
font-size: 15px;
}
.page-header option,
.page-header option:focus,
.page-header option:active,
.page-header select:focus,
.page-header select:active {
outline: 0;
}
.page-header input {
background: #000;
color: #fff;
border: 1px solid #fff;
padding: 8px 20px;
border-radius: 3px;
}
.error {
border-color: red !important;
transition: border-color 0.2s;
}
</style>
</head>
<body>
<div id="preview" class="page" style="background:#000;background:radial-gradient(#434343 0%, #000000);">
<div class="container">
<div class="page-header" style="margin: 30px 0 5px 0;border-bottom: 0; text-align: center; color: #fff;">
<h1 style="font-family:Roboto, sans-serif;font-weight:300;font-size:40px;">Validar <small> Language Forcer</small></h1>
<form id="postURL" name="sending" >
<input name="url" type="text" id="url" placeholder="Evaluation URL"/>
<select name="language" id="language">
<option value="">Select Language</option>
<option value="en">English</option>
<option value="fr">French</option>
<option value="es">Spanish</option>
<option value="it">Italian</option>
<option value="de">German</option>
<option value="ja">Japanese</option>
<option value="zh">Chinese</option>
</select>
<button type="submit" name="load" id="go">Load</button>
</form>
</div>
<div id="ipad" style="background-image: url(./img/demoipad.png);width:1113px;height:867px;background-repeat:no-repeat;margin: 0 auto;">
<iframe id="content" src="" width="1024px" height="768px" marginheight="0" marginwidth="0" style="margin-left:42px; margin-top:42px; border: 0px solid #ffffff; overflow:hidden;background:#000;"></iframe>
</div>
</div>
</div>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script>
$('#go').on('click', function(ev){
ev.preventDefault();
var errorFlag = false;
var lang = $('#language').val();
if(lang === ''){
$('#language').addClass('error');
errorFlag = true;
} else {
$('#language').removeClass('error');
}
if(url === ''){
$('#url').addClass('error');
errorFlag = true;
} else {
$('#url').removeClass('error');
}
if(errorFlag){
return false;
}
$.ajax({
method: "POST",
url: 'getPage.asp',
processData : false,
data: $('#postURL').serialize(),
success: function(data) {
console.log(data);
document.getElementById('content').src = "data:text/html;charset=utf-8," + data;
}});
});
</script>
</body>
</html>