3 <link type=
"text/css" href=
"popup.css" rel=
"stylesheet"/>
4 <script src=
"jquery-1.3.2.min.js"></script>
7 var execute = function() {
8 var code = $(
"#code").val();
9 localStorage.code = code;
10 chrome.extension.getBackgroundPage().execute(code);
12 $(
"#code").keypress(function(evt) {
13 if (evt.ctrlKey && (evt.keyCode ===
10)) execute();
15 $(
"#run").click(function(evt) {execute();});
16 $(
"#reload").click(function(evt) {
17 chrome.extension.getBackgroundPage().reload();
19 $(
"#clear").click(function(evt) {
23 $(
"#close").click(function(evt) {window.close();});
24 $(
"#code").val(localStorage.code);
26 $(
"#main").slideDown();
31 <div id=
"main" style=
"display:none">
32 <textarea id=
"code" rows=
"10" cols=
"80"></textarea>
33 <button id=
"run">Run
</button>
34 <button id=
"reload">Reload
</button>
35 <button id=
"clear">Clear
</button>
36 <button id=
"close">Close
</button>