-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrequestbuild.html
235 lines (201 loc) · 8.41 KB
/
requestbuild.html
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<html>
<head>
<title>Unstable Apps Recovery Builder</title>
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<link href="/css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<style type="text/css">
ul {
-webkit-column-count: 4; -webkit-column-gap:20px;
-moz-column-count:4; -moz-column-gap:20px;
-o-column-count:4; -o-column-gap:20px;
column-count:4; column-gap:20px;
}
</style>
<script type="text/javascript">
$(window).load(function() {
checkAdBlock();
});
</script>
</head>
<body>
<div id="header">
<h1>Unstable Apps Recovery Builder</h1>
<p><a href="/">Return to main page</a></p>
</div>
<div id="container">
<div id="leftbar">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Builder Download Page -->
<ins class="adsbygoogle"
style="display:inline-block;width:120px;height:600px"
data-ad-client="ca-pub-4046238239506212"
data-ad-slot="6921192316"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<div id="maincontent">
<h2>Issue a build request</h2>
<p id="pleaseshowads" style="display: none;">
UnstableApps Recovery Downloader is currently a free service and we hope to keep it that way. You
appear to have an ad blocker running and we hope you might consider disabling it for this site to
allow us to keep the service free.
</p>
<div id="notsignedin">
<p>To issue a build request you must first sign in with your Google+ account. This is used to notify you via email once your build is finished.</p>
<span id="signinButton">
<span
class="g-signin"
data-callback="signinCallback"
data-clientid="73658132174-cmro35hgh0pq8opk0h19d8ln7pmov6q9.apps.googleusercontent.com"
data-cookiepolicy="single_host_origin"
data-scope="https://www.googleapis.com/auth/plus.profile.emails.read">
</span>
</span>
<meta name="google-signin-callback" content="signinCallback" />
</div>
<div id="signedin" style="display: none;">
<p>You are currently signed in as <span id="currentemail"></span>. This address will be emailed on build completion.</p>
<p>
Select what type of recovery you want to build:<br />
<input type="radio" name="recoverytype" value="cwmr" checked /> ClockworkMod Recovery<br />
<input type="radio" name="recoverytype" value="cm" /> CyanogenMod Recovery<br />
<input type="radio" name="recoverytype" value="twrp" /> TWRP Recovery<br />
<input type="checkbox" id="bootimage" name="bootimage" value="yes" /> Build boot image (only use if you know what this does)<br />
<input type="checkbox" id="koushtouch" name="koushtouch" value="yes" /> Enable Koush's Touch Controls (this will disable stock swipe code)
</p>
<div id="deviceList">
Device list will load here...
</div>
<div id="customdeviceentry">
Is your device so fancy and new it isn't getting cm builds
yet? No problem, just specify the device name here:<br />
<input type="text" id="customdevice" />
<input type="button" value="Request Build" onclick="issueCustomRequest();" />
</div>
</div>
<div id="donateinfo">
<p>Thank you for using Unstable Apps Recovery Downloader. We hope
to keep this service free and you can help. We
happily accept donations via PayPal to help us pay our
hosting bills. Use the following links if
you feel so inclined:</p>
<form action="https://www.paypal.com/cgi-bin/webscr"
method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id"
value="A69H2XGXUX5ZJ">
<input type="image"
src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
border="0" name="submit" alt="PayPal - The safer,
easier way to pay online!">
<img alt="" border="0"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif"
width="1" height="1">
</form>
</div>
<!-- Place this asynchronous JavaScript just before your </body> tag -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/client:plusone.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
var email = "";
function signinCallback(authResult) {
if (authResult['status']['signed_in']) {
// Update the app to reflect a signed in user
// Hide the sign-in button now that the user is authorized, for example:
document.getElementById('signinButton').setAttribute('style', 'display: none');
console.log("User is signed in");
//console.log(authResult);
$("#signedin").fadeIn();
$("#notsignedin").fadeOut();
gapi.client.load('plus','v1', function(){
var request = gapi.client.plus.people.get({
'userId': 'me'
});
request.execute(function(resp) {
//console.log(resp);
console.log('Retrieved profile for:' + resp.displayName);
email = resp.emails[0].value;
$("#currentemail").html(resp.emails[0].value);
loadDeviceList();
});
});
} else {
// Update the app to reflect a signed out user
// Possible error values:
// "user_signed_out" - User is signed-out
// "access_denied" - User denied access to your app
// "immediate_failed" - Could not automatically log in the user
console.log('Sign-in state: ' + authResult['error']);
}
}
function loadDeviceList() {
$.getJSON( "https://s3.amazonaws.com/recoverybuilderwebsite/cm11devices.json", function( data ) {
console.log("Devices loaded!");
var devices = [];
$.each( data, function( key, val ) {
//console.log("found: " + key + " and " + val);
//console.log(val);
if(val[1] == "cm-11.0") {
devices.push( "<li><a href='javascript:void(0);' onclick=\"issueRequest('" + val[0] + "')\">" + val[0] + "</a></li>" );
}
});
$("#deviceList").html("");
$( "<ul />", {
"class": "my-new-list",
html: devices.join( "" )
}).appendTo("#deviceList");
});
}
function issueRequest(device) {
var recoverytype = $("input:radio[name=recoverytype]:checked").val();
var bootimage = $("#bootimage:checked").val();
var koushtouch = $("#koushtouch:checked").val();
console.log("starting build for " + device + "?email=" + email + "&recoverytype=" + recoverytype + "&bootimage=" + bootimage + "&koushtouch=" + koushtouch);
alert("Build request for " + device + " issued. You will be emailed on completion.");
if(recoverytype == "cwmr") {
$.get("http://209.114.126.242:8080/job/ClockworkMod%20Recovery%20Build/buildWithParameters?token=buildrecovery&DEVICENAME=" + device + "&EMAIL=" + email + "&BOOTIMAGE=" + bootimage + "&KOUSHTOUCH=" + koushtouch);
} else if($recoverytype == "cm") {
$.get("http://209.114.126.242:8080/job/Cyanogen%20Recovery%20Build/buildWithParameters?token=buildrecovery&DEVICENAME=" + device + "&EMAIL=" + email);
} else if($recoverytype == "twrp") {
$.get("http://209.114.126.242:8080/job/TWRP%20Recovery%20Build/buildWithParameters?token=buildrecovery&DEVICENAME=" + device + "&EMAIL=" + email);
}
}
function issueCustomRequest() {
var customdevice = $("#customdevice").val();
console.log("issuing build for: " + customdevice);
if(customdevice != "") issueRequest(customdevice);
}
</script>
</div>
<div id="rightbar">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Builder Download Page -->
<ins class="adsbygoogle"
style="display:inline-block;width:120px;height:600px"
data-ad-client="ca-pub-4046238239506212"
data-ad-slot="6921192316"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-51053412-2', 'auto');
ga('require', 'displayfeatures');
ga('send', 'pageview');
</script>
</body>
</html>