From 2fc17489a8e1679c1084e75dd68a185db85c7aca Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 20 Apr 2013 07:01:08 -0700 Subject: [PATCH] Contain the chaos Auditors: vrana --- src/__celerity_resource_map__.php | 74 +++++++++---------- .../behavior-phabricator-remarkup-assist.js | 6 +- 2 files changed, 41 insertions(+), 39 deletions(-) diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index bb324362c6..aac03d8f70 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -1992,7 +1992,7 @@ celerity_register_resource_map(array( ), 'javelin-behavior-phabricator-remarkup-assist' => array( - 'uri' => '/res/c1986694/rsrc/js/application/core/behavior-phabricator-remarkup-assist.js', + 'uri' => '/res/ebc88729/rsrc/js/application/core/behavior-phabricator-remarkup-assist.js', 'type' => 'js', 'requires' => array( @@ -3969,7 +3969,7 @@ celerity_register_resource_map(array( 'uri' => '/res/pkg/53664e83/core.pkg.css', 'type' => 'css', ), - 'e32b785c' => + '5c3b10c8' => array( 'name' => 'core.pkg.js', 'symbols' => @@ -4009,7 +4009,7 @@ celerity_register_resource_map(array( 32 => 'javelin-behavior-global-drag-and-drop', 33 => 'javelin-behavior-phabricator-reveal-content', ), - 'uri' => '/res/pkg/e32b785c/core.pkg.js', + 'uri' => '/res/pkg/5c3b10c8/core.pkg.js', 'type' => 'js', ), 'e208b108' => @@ -4181,17 +4181,17 @@ celerity_register_resource_map(array( 'diffusion-icons-css' => 'c8ce2d88', 'global-drag-and-drop-css' => '53664e83', 'inline-comment-summary-css' => '8aaacd1b', - 'javelin-aphlict' => 'e32b785c', + 'javelin-aphlict' => '5c3b10c8', 'javelin-behavior' => '41f3916d', - 'javelin-behavior-aphlict-dropdown' => 'e32b785c', - 'javelin-behavior-aphlict-listen' => 'e32b785c', - 'javelin-behavior-aphront-basic-tokenizer' => 'e32b785c', + 'javelin-behavior-aphlict-dropdown' => '5c3b10c8', + 'javelin-behavior-aphlict-listen' => '5c3b10c8', + 'javelin-behavior-aphront-basic-tokenizer' => '5c3b10c8', 'javelin-behavior-aphront-drag-and-drop' => 'e96b08f8', 'javelin-behavior-aphront-drag-and-drop-textarea' => 'e96b08f8', - 'javelin-behavior-aphront-form-disable-on-submit' => 'e32b785c', + 'javelin-behavior-aphront-form-disable-on-submit' => '5c3b10c8', 'javelin-behavior-audit-preview' => 'f96657b8', 'javelin-behavior-dark-console' => 'e208b108', - 'javelin-behavior-device' => 'e32b785c', + 'javelin-behavior-device' => '5c3b10c8', 'javelin-behavior-differential-accept-with-errors' => 'e96b08f8', 'javelin-behavior-differential-add-reviewers-and-ccs' => 'e96b08f8', 'javelin-behavior-differential-comment-jump' => 'e96b08f8', @@ -4207,32 +4207,32 @@ celerity_register_resource_map(array( 'javelin-behavior-diffusion-commit-graph' => 'f96657b8', 'javelin-behavior-diffusion-pull-lastmodified' => 'f96657b8', 'javelin-behavior-error-log' => 'e208b108', - 'javelin-behavior-global-drag-and-drop' => 'e32b785c', - 'javelin-behavior-history-install' => 'e32b785c', - 'javelin-behavior-konami' => 'e32b785c', - 'javelin-behavior-lightbox-attachments' => 'e32b785c', + 'javelin-behavior-global-drag-and-drop' => '5c3b10c8', + 'javelin-behavior-history-install' => '5c3b10c8', + 'javelin-behavior-konami' => '5c3b10c8', + 'javelin-behavior-lightbox-attachments' => '5c3b10c8', 'javelin-behavior-load-blame' => 'e96b08f8', 'javelin-behavior-maniphest-batch-selector' => 'f85eb6d8', 'javelin-behavior-maniphest-subpriority-editor' => 'f85eb6d8', 'javelin-behavior-maniphest-transaction-controls' => 'f85eb6d8', 'javelin-behavior-maniphest-transaction-expand' => 'f85eb6d8', 'javelin-behavior-maniphest-transaction-preview' => 'f85eb6d8', - 'javelin-behavior-phabricator-active-nav' => 'e32b785c', - 'javelin-behavior-phabricator-autofocus' => 'e32b785c', - 'javelin-behavior-phabricator-gesture' => 'e32b785c', - 'javelin-behavior-phabricator-keyboard-shortcuts' => 'e32b785c', - 'javelin-behavior-phabricator-nav' => 'e32b785c', + 'javelin-behavior-phabricator-active-nav' => '5c3b10c8', + 'javelin-behavior-phabricator-autofocus' => '5c3b10c8', + 'javelin-behavior-phabricator-gesture' => '5c3b10c8', + 'javelin-behavior-phabricator-keyboard-shortcuts' => '5c3b10c8', + 'javelin-behavior-phabricator-nav' => '5c3b10c8', 'javelin-behavior-phabricator-object-selector' => 'e96b08f8', - 'javelin-behavior-phabricator-oncopy' => 'e32b785c', - 'javelin-behavior-phabricator-remarkup-assist' => 'e32b785c', - 'javelin-behavior-phabricator-reveal-content' => 'e32b785c', - 'javelin-behavior-phabricator-search-typeahead' => 'e32b785c', - 'javelin-behavior-phabricator-tooltips' => 'e32b785c', - 'javelin-behavior-phabricator-watch-anchor' => 'e32b785c', - 'javelin-behavior-refresh-csrf' => 'e32b785c', + 'javelin-behavior-phabricator-oncopy' => '5c3b10c8', + 'javelin-behavior-phabricator-remarkup-assist' => '5c3b10c8', + 'javelin-behavior-phabricator-reveal-content' => '5c3b10c8', + 'javelin-behavior-phabricator-search-typeahead' => '5c3b10c8', + 'javelin-behavior-phabricator-tooltips' => '5c3b10c8', + 'javelin-behavior-phabricator-watch-anchor' => '5c3b10c8', + 'javelin-behavior-refresh-csrf' => '5c3b10c8', 'javelin-behavior-repository-crossreference' => 'e96b08f8', - 'javelin-behavior-toggle-class' => 'e32b785c', - 'javelin-behavior-workflow' => 'e32b785c', + 'javelin-behavior-toggle-class' => '5c3b10c8', + 'javelin-behavior-workflow' => '5c3b10c8', 'javelin-dom' => '41f3916d', 'javelin-event' => '41f3916d', 'javelin-install' => '41f3916d', @@ -4254,38 +4254,38 @@ celerity_register_resource_map(array( 'lightbox-attachment-css' => '53664e83', 'maniphest-task-summary-css' => '6b1fccc6', 'maniphest-transaction-detail-css' => '6b1fccc6', - 'phabricator-busy' => 'e32b785c', + 'phabricator-busy' => '5c3b10c8', 'phabricator-content-source-view-css' => '8aaacd1b', 'phabricator-core-buttons-css' => '53664e83', 'phabricator-core-css' => '53664e83', 'phabricator-crumbs-view-css' => '53664e83', 'phabricator-directory-css' => '53664e83', 'phabricator-drag-and-drop-file-upload' => 'e96b08f8', - 'phabricator-dropdown-menu' => 'e32b785c', - 'phabricator-file-upload' => 'e32b785c', + 'phabricator-dropdown-menu' => '5c3b10c8', + 'phabricator-file-upload' => '5c3b10c8', 'phabricator-filetree-view-css' => '53664e83', 'phabricator-flag-css' => '53664e83', 'phabricator-form-view-css' => '53664e83', 'phabricator-header-view-css' => '53664e83', 'phabricator-jump-nav' => '53664e83', - 'phabricator-keyboard-shortcut' => 'e32b785c', - 'phabricator-keyboard-shortcut-manager' => 'e32b785c', + 'phabricator-keyboard-shortcut' => '5c3b10c8', + 'phabricator-keyboard-shortcut-manager' => '5c3b10c8', 'phabricator-main-menu-view' => '53664e83', - 'phabricator-menu-item' => 'e32b785c', + 'phabricator-menu-item' => '5c3b10c8', 'phabricator-nav-view-css' => '53664e83', - 'phabricator-notification' => 'e32b785c', + 'phabricator-notification' => '5c3b10c8', 'phabricator-notification-css' => '53664e83', 'phabricator-notification-menu-css' => '53664e83', 'phabricator-object-item-list-view-css' => '53664e83', 'phabricator-object-selector-css' => '8aaacd1b', - 'phabricator-prefab' => 'e32b785c', + 'phabricator-prefab' => '5c3b10c8', 'phabricator-project-tag-css' => '6b1fccc6', 'phabricator-remarkup-css' => '53664e83', 'phabricator-shaped-request' => 'e96b08f8', 'phabricator-side-menu-view-css' => '53664e83', 'phabricator-standard-page-view' => '53664e83', - 'phabricator-textareautils' => 'e32b785c', - 'phabricator-tooltip' => 'e32b785c', + 'phabricator-textareautils' => '5c3b10c8', + 'phabricator-tooltip' => '5c3b10c8', 'phabricator-transaction-view-css' => '53664e83', 'phabricator-zindex-css' => '53664e83', 'sprite-apps-large-css' => '53664e83', diff --git a/webroot/rsrc/js/application/core/behavior-phabricator-remarkup-assist.js b/webroot/rsrc/js/application/core/behavior-phabricator-remarkup-assist.js index 4112385287..eeca7aed9d 100644 --- a/webroot/rsrc/js/application/core/behavior-phabricator-remarkup-assist.js +++ b/webroot/rsrc/js/application/core/behavior-phabricator-remarkup-assist.js @@ -42,7 +42,9 @@ JX.behavior('phabricator-remarkup-assist', function(config) { } JX.Stratcom.listen('keydown', null, function(e) { - cause_chaos(); + if (edit_mode == 'chaos') { + cause_chaos(); + } if (e.getSpecialKey() != 'esc') { return; @@ -68,7 +70,7 @@ JX.behavior('phabricator-remarkup-assist', function(config) { !!chaos_states[ii]); } - if (Math.random() > 0.99) { + if (Math.random() > 0.98) { var n = new JX.Notification() .setContent("Hey, listen!") .setDuration(1000 + Math.random() * 6000);