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