2 <html i18n-values=
"dir:textdirection">
5 <link rel=
"stylesheet" href=
"dialog.css">
8 -webkit-user-select: none;
9 margin:
10px
10px
0 10px;
26 <script src=
"chrome://resources/js/i18n_template.js"></script>
29 return document
.getElementById(o
);
32 function disableControls() {
33 $('cancel').disabled
= true;
34 $('accept').disabled
= true;
39 chrome
.send('DialogClose', [JSON
.stringify(false)]);
42 function handleSubmit(e
) {
45 chrome
.send('DialogClose', [JSON
.stringify(true)]);
48 function handleKeyDown(e
) {
49 if (e
.keyCode
== 27) { // Escape
56 i18nTemplate
.process(document
, JSON
.parse(
57 chrome
.getVariableValue('dialogArguments')));
58 document
.addEventListener('keydown', handleKeyDown
);
59 $('form').onsubmit
= handleSubmit
;
60 $('cancel').onclick
= cancel
;
64 document
.addEventListener('DOMContentLoaded', load
);
67 <body i18n-values=
".style.fontFamily:fontfamily;.style.fontSize:fontsize">
68 <div id=
"explanation" i18n-content=
"message"></div>
71 <input id=
"cancel" type=
"reset" i18n-values=
"value:cancel" autofocus
>
72 <input id=
"accept" type=
"submit" i18n-values=
"value:accept">