-
Notifications
You must be signed in to change notification settings - Fork 54
/
generate-tresize-xpi.html
77 lines (65 loc) · 2.39 KB
/
generate-tresize-xpi.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
<html>
<!--
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<head>
<meta charset="UTF-8"/>
<title>Tresize addon xpi generator</title>
<script src="scripts/jszip.min.js"></script>
<script src="scripts/xpigen.js"></script>
<script>
var base = "startup_test/tresize/addon/";
var files = [
"bootstrap.js",
"chrome.manifest",
"install.rdf",
"content/framescript.js",
"content/Profiler.js",
"content/tresize.overlay.xul",
"content/tresize.js",
"content/tresize-test.html",
];
function triggerBuildXpi() {
function $(id) { return document.getElementById(id); }
$("status-text").innerHTML = "Preparing ...";
$("result").style.display = "none";
$("status").style.display = "inline";
createXpiDataUri(base, files, {
// eslint-disable-next-line no-unsanitized/property
onprogress(p) { $("status-text").innerHTML = "Preparing ... " + p.toFixed(0) + "%"; },
// eslint-disable-next-line no-unsanitized/property
onerror(e) { $("status-text").innerHTML = "Oops, couldn't generate XPI. Reload to retry.<br/>" + e; },
onsuccess(u) {
$("xpi-link").href = u;
$("status").style.display = "none";
$("result").style.display = "inline";
},
});
}
</script>
</head>
<body onload="triggerBuildXpi()" style="font-family: sans-serif; color:#555">
<h3>TResize addon</h3>
<h4>
Install / Download:
<span id="status">
<span id="status-text" style="color: #c40;">Not ready</span>
</span>
<span id="result" style="display: none;">
<a id="xpi-link" href="#" style="background-color: #dfd;">tresize.xpi</a><br/>
<span style="color: grey";>(gibberish file name is expected, just rename/save as tresize.xpi)</span>
</span>
</h4>
<p>
Once installed, to run Tresize tests, visit
<span style="color: green; font-family: monospace;">chrome://tresize/content/tresize-test.html</span>
and follow the instructions.
</p>
<p>
You can also build the addon yourself on a local talos repo: zip the content
of <span style="font-family: monospace;">talos/statup_test/tresize/addon/</span> and rename the zip to xpi.
</p>
</body>
</html>