1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00

Use window.confirm instead of confirm

Summary:
This silences the following JSHint warning:

```
>>> Lint for webroot/rsrc/js/application/uiexample/notification-example.js:

   Warning  (W117) JSHintW117
    'confirm' is not defined.

              39           notification.listen(
              40             'activate',
              41             function() {
    >>>       42               if (!confirm('Close notification?')) {
              43                 JX.Stratcom.context().kill();
              44               }
              45             });

```

Test Plan: `arc lint`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11065
This commit is contained in:
Joshua Spence 2014-12-30 02:54:21 -08:00 committed by epriestley
parent 558e1ee3b8
commit 5251f08fb4
3 changed files with 12 additions and 12 deletions

View file

@ -8,7 +8,7 @@
return array(
'names' => array(
'core.pkg.css' => 'f588bfc3',
'core.pkg.js' => '2d1f7db1',
'core.pkg.js' => '44aac665',
'darkconsole.pkg.js' => 'd326843f',
'differential.pkg.css' => '8af45893',
'differential.pkg.js' => '42c10e78',
@ -168,7 +168,7 @@ return array(
'rsrc/externals/javelin/core/init.js' => 'b88ab49e',
'rsrc/externals/javelin/core/init_node.js' => 'd7dde471',
'rsrc/externals/javelin/core/install.js' => '1ffb3a9c',
'rsrc/externals/javelin/core/util.js' => 'e7995242',
'rsrc/externals/javelin/core/util.js' => '90e3fde9',
'rsrc/externals/javelin/docs/Base.js' => '74676256',
'rsrc/externals/javelin/docs/onload.js' => 'e819c479',
'rsrc/externals/javelin/ext/fx/Color.js' => '7e41274a',
@ -427,7 +427,7 @@ return array(
'rsrc/js/application/uiexample/ReactorSendPropertiesExample.js' => 'b1f0ccee',
'rsrc/js/application/uiexample/busy-example.js' => '60479091',
'rsrc/js/application/uiexample/gesture-example.js' => '558829c2',
'rsrc/js/application/uiexample/notification-example.js' => '7a9677fc',
'rsrc/js/application/uiexample/notification-example.js' => '8ce821c5',
'rsrc/js/core/Busy.js' => '6453c869',
'rsrc/js/core/DragAndDropFileUpload.js' => '8c49f386',
'rsrc/js/core/DraggableList.js' => 'a16ec1c6',
@ -610,7 +610,7 @@ return array(
'javelin-behavior-phabricator-keyboard-shortcuts' => 'd75709e6',
'javelin-behavior-phabricator-line-linker' => '1499a8cb',
'javelin-behavior-phabricator-nav' => '14d7a8b8',
'javelin-behavior-phabricator-notification-example' => '7a9677fc',
'javelin-behavior-phabricator-notification-example' => '8ce821c5',
'javelin-behavior-phabricator-object-selector' => '49b73b36',
'javelin-behavior-phabricator-oncopy' => '2926fff2',
'javelin-behavior-phabricator-remarkup-assist' => 'e32d14ab',
@ -677,7 +677,7 @@ return array(
'javelin-typeahead-source' => 'fcba4ecc',
'javelin-typeahead-static-source' => '316b8fa1',
'javelin-uri' => '6eff08aa',
'javelin-util' => 'e7995242',
'javelin-util' => '90e3fde9',
'javelin-vector' => 'cc1bd0b0',
'javelin-view' => '0f764c35',
'javelin-view-html' => 'e5b406f9',
@ -1290,11 +1290,6 @@ return array(
'owners-path-editor',
'javelin-behavior',
),
'7a9677fc' => array(
'phabricator-notification',
'javelin-stratcom',
'javelin-behavior',
),
'7b98d7c5' => array(
'javelin-behavior',
'javelin-dom',
@ -1381,6 +1376,11 @@ return array(
'javelin-uri',
'phabricator-file-upload',
),
'8ce821c5' => array(
'phabricator-notification',
'javelin-stratcom',
'javelin-behavior',
),
'8ef9ab58' => array(
'javelin-behavior',
'javelin-dom',

View file

@ -319,7 +319,7 @@ if (__DEV__) {
if (recent_alerts.length >= 3 &&
(recent_alerts[recent_alerts.length - 1] - recent_alerts[0]) < 5000) {
if (confirm(msg + "\n\nLots of alert()s recently. Kill them?")) {
if (window.confirm(msg + "\n\nLots of alert()s recently. Kill them?")) {
window.alert = JX.bag;
}
} else {

View file

@ -39,7 +39,7 @@ JX.behavior('phabricator-notification-example', function() {
notification.listen(
'activate',
function() {
if (!confirm('Close notification?')) {
if (!window.confirm('Close notification?')) {
JX.Stratcom.context().kill();
}
});