@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator

Use `JsShrink` if `jsxmin` is not available

Summary: If `jsxmin` is not available, use a pure PHP implementation instead (JsShrink).

Test Plan:
- Ran `arc lint --lintall` on all JS and fixed every relevant warning.
- Forced minification on and browsed around the site using JS behaviors. Didn't hit anything problematic.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5670

+598 -501
+2 -1
.arcconfig
··· 6 6 "phutil_libraries" : { 7 7 "phabricator" : "src/" 8 8 }, 9 - "lint.xhpast.naminghook" : "PhabricatorSymbolNameLinter" 9 + "lint.xhpast.naminghook" : "PhabricatorSymbolNameLinter", 10 + "lint.jshint.config" : "support/jshint/jshintconfig" 10 11 }
+45
externals/JsShrink/jsShrink.php
··· 1 + <?php 2 + /** Remove spaces and comments from JavaScript code 3 + * @param string code with commands terminated by semicolon 4 + * @return string shrinked code 5 + * @link http://vrana.github.com/JsShrink/ 6 + * @author Jakub Vrana, http://www.vrana.cz/ 7 + * @copyright 2007 Jakub Vrana 8 + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 9 + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) 10 + */ 11 + function jsShrink($input) { 12 + return preg_replace_callback('( 13 + (?: 14 + (^|[-+\([{}=,:;!%^&*|?~]|/(?![/*])|return|throw) # context before regexp 15 + (?:\s|//[^\n]*+\n|/\*(?:[^*]|\*(?!/))*+\*/)* # optional space 16 + (/(?![/*])(?:\\\\[^\n]|[^[\n/\\\\]|\[(?:\\\\[^\n]|[^]])++)+/) # regexp 17 + |(^ 18 + |\'(?:\\\\.|[^\n\'\\\\])*\' 19 + |"(?:\\\\.|[^\n"\\\\])*" 20 + |([0-9A-Za-z_$]+) 21 + |([-+]+) 22 + |. 23 + ) 24 + )(?:\s|//[^\n]*+\n|/\*(?:[^*]|\*(?!/))*+\*/)* # optional space 25 + )sx', 'jsShrinkCallback', "$input\n"); 26 + } 27 + 28 + function jsShrinkCallback($match) { 29 + static $last = ''; 30 + $match += array_fill(1, 5, null); // avoid E_NOTICE 31 + list(, $context, $regexp, $result, $word, $operator) = $match; 32 + if ($word != '') { 33 + $result = ($last == 'word' ? "\n" : ($last == 'return' ? " " : "")) . $result; 34 + $last = ($word == 'return' || $word == 'throw' || $word == 'break' ? 'return' : 'word'); 35 + } elseif ($operator) { 36 + $result = ($last == $operator[0] ? "\n" : "") . $result; 37 + $last = $operator[0]; 38 + } else { 39 + if ($regexp) { 40 + $result = $context . ($context == '/' ? "\n" : "") . $regexp; 41 + } 42 + $last = ''; 43 + } 44 + return $result; 45 + }
+23
externals/JsShrink/readme.txt
··· 1 + JsShrink - Remove spaces and comments from JavaScript code 2 + Available in PHP and JavaScript 3 + Requires statements ending by semicolon, use JSHint or JSLint to verify. 4 + 5 + http://vrana.github.com/JsShrink/ 6 + 7 + Usage PHP: 8 + <?php 9 + include "jsShrink.php"; 10 + echo jsShrink($code); 11 + ?> 12 + 13 + Usage JavaScript: 14 + <script type="text/javascript" src="jsShrink.js"></script> 15 + <script type="text/javascript"> 16 + textarea.value = jsShrink(code); 17 + </script> 18 + 19 + Note: 20 + Google Closure Compiler is much more powerful and efficient tool. 21 + JsShrink was created for those looking for PHP or JavaScript only solution. 22 + Most other JS minifiers are not able to process valid JavaScript code: 23 + http://php.vrana.cz/minifikace-javascriptu.php#srovnani
+227 -249
src/__celerity_resource_map__.php
··· 981 981 ), 982 982 'differential-inline-comment-editor' => 983 983 array( 984 - 'uri' => '/res/e0ad34ac/rsrc/js/application/differential/DifferentialInlineCommentEditor.js', 984 + 'uri' => '/res/37e0564f/rsrc/js/application/differential/DifferentialInlineCommentEditor.js', 985 985 'type' => 'js', 986 986 'requires' => 987 987 array( ··· 1161 1161 ), 1162 1162 'javelin-behavior' => 1163 1163 array( 1164 - 'uri' => '/res/adf7368b/rsrc/externals/javelin/lib/behavior.js', 1164 + 'uri' => '/res/15482715/rsrc/externals/javelin/lib/behavior.js', 1165 1165 'type' => 'js', 1166 1166 'requires' => 1167 1167 array( 1168 1168 0 => 'javelin-magical-init', 1169 + 1 => 'javelin-util', 1169 1170 ), 1170 1171 'disk' => '/rsrc/externals/javelin/lib/behavior.js', 1171 1172 ), 1172 1173 'javelin-behavior-aphlict-dropdown' => 1173 1174 array( 1174 - 'uri' => '/res/2418f448/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js', 1175 + 'uri' => '/res/b3be58e8/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js', 1175 1176 'type' => 'js', 1176 1177 'requires' => 1177 1178 array( ··· 1186 1187 ), 1187 1188 'javelin-behavior-aphlict-listen' => 1188 1189 array( 1189 - 'uri' => '/res/6dde3f43/rsrc/js/application/aphlict/behavior-aphlict-listen.js', 1190 + 'uri' => '/res/7487f207/rsrc/js/application/aphlict/behavior-aphlict-listen.js', 1190 1191 'type' => 'js', 1191 1192 'requires' => 1192 1193 array( ··· 1277 1278 ), 1278 1279 'javelin-behavior-audit-preview' => 1279 1280 array( 1280 - 'uri' => '/res/3048b073/rsrc/js/application/diffusion/behavior-audit-preview.js', 1281 + 'uri' => '/res/d8f31e46/rsrc/js/application/diffusion/behavior-audit-preview.js', 1281 1282 'type' => 'js', 1282 1283 'requires' => 1283 1284 array( ··· 1347 1348 ), 1348 1349 'javelin-behavior-conpherence-widget-pane' => 1349 1350 array( 1350 - 'uri' => '/res/a9bcb950/rsrc/js/application/conpherence/behavior-widget-pane.js', 1351 + 'uri' => '/res/d2063fd4/rsrc/js/application/conpherence/behavior-widget-pane.js', 1351 1352 'type' => 'js', 1352 1353 'requires' => 1353 1354 array( ··· 1363 1364 ), 1364 1365 'javelin-behavior-countdown-timer' => 1365 1366 array( 1366 - 'uri' => '/res/7468acb7/rsrc/js/application/countdown/timer.js', 1367 + 'uri' => '/res/3c52aac2/rsrc/js/application/countdown/timer.js', 1367 1368 'type' => 'js', 1368 1369 'requires' => 1369 1370 array( 1370 1371 0 => 'javelin-behavior', 1371 1372 1 => 'javelin-dom', 1372 - 2 => 'javelin-util', 1373 1373 ), 1374 1374 'disk' => '/rsrc/js/application/countdown/timer.js', 1375 1375 ), ··· 1427 1427 ), 1428 1428 'javelin-behavior-differential-comment-jump' => 1429 1429 array( 1430 - 'uri' => '/res/b580229b/rsrc/js/application/differential/behavior-comment-jump.js', 1430 + 'uri' => '/res/8ffb4222/rsrc/js/application/differential/behavior-comment-jump.js', 1431 1431 'type' => 'js', 1432 1432 'requires' => 1433 1433 array( 1434 1434 0 => 'javelin-behavior', 1435 - 1 => 'javelin-util', 1435 + 1 => 'javelin-stratcom', 1436 1436 2 => 'javelin-dom', 1437 1437 ), 1438 1438 'disk' => '/rsrc/js/application/differential/behavior-comment-jump.js', ··· 1451 1451 ), 1452 1452 'javelin-behavior-differential-dropdown-menus' => 1453 1453 array( 1454 - 'uri' => '/res/4e3f1e2f/rsrc/js/application/differential/behavior-dropdown-menus.js', 1454 + 'uri' => '/res/f04cf682/rsrc/js/application/differential/behavior-dropdown-menus.js', 1455 1455 'type' => 'js', 1456 1456 'requires' => 1457 1457 array( ··· 1467 1467 ), 1468 1468 'javelin-behavior-differential-edit-inline-comments' => 1469 1469 array( 1470 - 'uri' => '/res/70c1f3a3/rsrc/js/application/differential/behavior-edit-inline-comments.js', 1470 + 'uri' => '/res/86f459a4/rsrc/js/application/differential/behavior-edit-inline-comments.js', 1471 1471 'type' => 'js', 1472 1472 'requires' => 1473 1473 array( ··· 1482 1482 ), 1483 1483 'javelin-behavior-differential-feedback-preview' => 1484 1484 array( 1485 - 'uri' => '/res/5fbce8db/rsrc/js/application/differential/behavior-comment-preview.js', 1485 + 'uri' => '/res/4421fac6/rsrc/js/application/differential/behavior-comment-preview.js', 1486 1486 'type' => 'js', 1487 1487 'requires' => 1488 1488 array( ··· 1497 1497 ), 1498 1498 'javelin-behavior-differential-keyboard-navigation' => 1499 1499 array( 1500 - 'uri' => '/res/89e93cc9/rsrc/js/application/differential/behavior-keyboard-nav.js', 1500 + 'uri' => '/res/22ed93ba/rsrc/js/application/differential/behavior-keyboard-nav.js', 1501 1501 'type' => 'js', 1502 1502 'requires' => 1503 1503 array( ··· 1510 1510 ), 1511 1511 'javelin-behavior-differential-populate' => 1512 1512 array( 1513 - 'uri' => '/res/526c2615/rsrc/js/application/differential/behavior-populate.js', 1513 + 'uri' => '/res/bb9a29f4/rsrc/js/application/differential/behavior-populate.js', 1514 1514 'type' => 'js', 1515 1515 'requires' => 1516 1516 array( ··· 1527 1527 ), 1528 1528 'javelin-behavior-differential-show-all-comments' => 1529 1529 array( 1530 - 'uri' => '/res/5a26be1a/rsrc/js/application/differential/behavior-show-all-comments.js', 1530 + 'uri' => '/res/8801848d/rsrc/js/application/differential/behavior-show-all-comments.js', 1531 1531 'type' => 'js', 1532 1532 'requires' => 1533 1533 array( ··· 1602 1602 ), 1603 1603 'javelin-behavior-diffusion-commit-graph' => 1604 1604 array( 1605 - 'uri' => '/res/62bd2035/rsrc/js/application/diffusion/behavior-commit-graph.js', 1605 + 'uri' => '/res/536b8483/rsrc/js/application/diffusion/behavior-commit-graph.js', 1606 1606 'type' => 'js', 1607 1607 'requires' => 1608 1608 array( ··· 1614 1614 ), 1615 1615 'javelin-behavior-diffusion-jump-to' => 1616 1616 array( 1617 - 'uri' => '/res/7c42e1ba/rsrc/js/application/diffusion/behavior-jump-to.js', 1617 + 'uri' => '/res/bade44bd/rsrc/js/application/diffusion/behavior-jump-to.js', 1618 1618 'type' => 'js', 1619 1619 'requires' => 1620 1620 array( 1621 1621 0 => 'javelin-behavior', 1622 - 1 => 'javelin-util', 1623 - 2 => 'javelin-vector', 1624 - 3 => 'javelin-dom', 1622 + 1 => 'javelin-vector', 1623 + 2 => 'javelin-dom', 1625 1624 ), 1626 1625 'disk' => '/rsrc/js/application/diffusion/behavior-jump-to.js', 1627 1626 ), ··· 1663 1662 ), 1664 1663 'javelin-behavior-fancy-datepicker' => 1665 1664 array( 1666 - 'uri' => '/res/9b67a0f4/rsrc/js/core/behavior-fancy-datepicker.js', 1665 + 'uri' => '/res/f5c13e07/rsrc/js/core/behavior-fancy-datepicker.js', 1667 1666 'type' => 'js', 1668 1667 'requires' => 1669 1668 array( ··· 1677 1676 ), 1678 1677 'javelin-behavior-global-drag-and-drop' => 1679 1678 array( 1680 - 'uri' => '/res/528e18ed/rsrc/js/core/behavior-global-drag-and-drop.js', 1679 + 'uri' => '/res/ee8e9c39/rsrc/js/core/behavior-global-drag-and-drop.js', 1681 1680 'type' => 'js', 1682 1681 'requires' => 1683 1682 array( ··· 1724 1723 ), 1725 1724 'javelin-behavior-lightbox-attachments' => 1726 1725 array( 1727 - 'uri' => '/res/f2b17609/rsrc/js/core/behavior-lightbox-attachments.js', 1726 + 'uri' => '/res/72b4d3a8/rsrc/js/core/behavior-lightbox-attachments.js', 1728 1727 'type' => 'js', 1729 1728 'requires' => 1730 1729 array( ··· 1763 1762 ), 1764 1763 'javelin-behavior-maniphest-batch-editor' => 1765 1764 array( 1766 - 'uri' => '/res/00accaec/rsrc/js/application/maniphest/behavior-batch-editor.js', 1765 + 'uri' => '/res/81b2b86f/rsrc/js/application/maniphest/behavior-batch-editor.js', 1767 1766 'type' => 'js', 1768 1767 'requires' => 1769 1768 array( ··· 1778 1777 ), 1779 1778 'javelin-behavior-maniphest-batch-selector' => 1780 1779 array( 1781 - 'uri' => '/res/f8cf3b84/rsrc/js/application/maniphest/behavior-batch-selector.js', 1780 + 'uri' => '/res/c33cb5e3/rsrc/js/application/maniphest/behavior-batch-selector.js', 1782 1781 'type' => 'js', 1783 1782 'requires' => 1784 1783 array( ··· 1791 1790 ), 1792 1791 'javelin-behavior-maniphest-description-preview' => 1793 1792 array( 1794 - 'uri' => '/res/8acd6f07/rsrc/js/application/maniphest/behavior-task-preview.js', 1793 + 'uri' => '/res/58ba0ec2/rsrc/js/application/maniphest/behavior-task-preview.js', 1795 1794 'type' => 'js', 1796 1795 'requires' => 1797 1796 array( ··· 1819 1818 ), 1820 1819 'javelin-behavior-maniphest-transaction-controls' => 1821 1820 array( 1822 - 'uri' => '/res/62465554/rsrc/js/application/maniphest/behavior-transaction-controls.js', 1821 + 'uri' => '/res/e8498688/rsrc/js/application/maniphest/behavior-transaction-controls.js', 1823 1822 'type' => 'js', 1824 1823 'requires' => 1825 1824 array( ··· 1844 1843 ), 1845 1844 'javelin-behavior-maniphest-transaction-preview' => 1846 1845 array( 1847 - 'uri' => '/res/855c9f0c/rsrc/js/application/maniphest/behavior-transaction-preview.js', 1846 + 'uri' => '/res/9447a3f9/rsrc/js/application/maniphest/behavior-transaction-preview.js', 1848 1847 'type' => 'js', 1849 1848 'requires' => 1850 1849 array( ··· 1870 1869 ), 1871 1870 'javelin-behavior-phabricator-active-nav' => 1872 1871 array( 1873 - 'uri' => '/res/326866c1/rsrc/js/core/behavior-active-nav.js', 1872 + 'uri' => '/res/9c8d3df8/rsrc/js/core/behavior-active-nav.js', 1874 1873 'type' => 'js', 1875 1874 'requires' => 1876 1875 array( ··· 1922 1921 ), 1923 1922 'javelin-behavior-phabricator-gesture-example' => 1924 1923 array( 1925 - 'uri' => '/res/da636e19/rsrc/js/application/uiexample/gesture-example.js', 1924 + 'uri' => '/res/91d1e7f2/rsrc/js/application/uiexample/gesture-example.js', 1926 1925 'type' => 'js', 1927 1926 'requires' => 1928 1927 array( ··· 1935 1934 ), 1936 1935 'javelin-behavior-phabricator-hovercards' => 1937 1936 array( 1938 - 'uri' => '/res/ed56d3c4/rsrc/js/core/behavior-hovercard.js', 1937 + 'uri' => '/res/4fe6b436/rsrc/js/core/behavior-hovercard.js', 1939 1938 'type' => 'js', 1940 1939 'requires' => 1941 1940 array( ··· 1975 1974 ), 1976 1975 'javelin-behavior-phabricator-nav' => 1977 1976 array( 1978 - 'uri' => '/res/ede26aac/rsrc/js/core/behavior-phabricator-nav.js', 1977 + 'uri' => '/res/afabcf16/rsrc/js/core/behavior-phabricator-nav.js', 1979 1978 'type' => 'js', 1980 1979 'requires' => 1981 1980 array( ··· 1985 1984 3 => 'javelin-dom', 1986 1985 4 => 'javelin-magical-init', 1987 1986 5 => 'javelin-vector', 1987 + 6 => 'javelin-request', 1988 + 7 => 'javelin-util', 1988 1989 ), 1989 1990 'disk' => '/rsrc/js/core/behavior-phabricator-nav.js', 1990 1991 ), 1991 1992 'javelin-behavior-phabricator-notification-example' => 1992 1993 array( 1993 - 'uri' => '/res/a6d51998/rsrc/js/application/uiexample/notification-example.js', 1994 + 'uri' => '/res/7c50cefd/rsrc/js/application/uiexample/notification-example.js', 1994 1995 'type' => 'js', 1995 1996 'requires' => 1996 1997 array( 1997 1998 0 => 'phabricator-notification', 1998 1999 1 => 'javelin-stratcom', 1999 2000 2 => 'javelin-behavior', 2000 - 3 => 'javelin-uri', 2001 2001 ), 2002 2002 'disk' => '/rsrc/js/application/uiexample/notification-example.js', 2003 2003 ), 2004 2004 'javelin-behavior-phabricator-object-selector' => 2005 2005 array( 2006 - 'uri' => '/res/31145104/rsrc/js/core/behavior-object-selector.js', 2006 + 'uri' => '/res/461f95f7/rsrc/js/core/behavior-object-selector.js', 2007 2007 'type' => 'js', 2008 2008 'requires' => 2009 2009 array( ··· 2016 2016 ), 2017 2017 'javelin-behavior-phabricator-oncopy' => 2018 2018 array( 2019 - 'uri' => '/res/c5839892/rsrc/js/core/behavior-oncopy.js', 2019 + 'uri' => '/res/cd3a9345/rsrc/js/core/behavior-oncopy.js', 2020 2020 'type' => 'js', 2021 2021 'requires' => 2022 2022 array( ··· 2027 2027 ), 2028 2028 'javelin-behavior-phabricator-remarkup-assist' => 2029 2029 array( 2030 - 'uri' => '/res/ddfb4eba/rsrc/js/core/behavior-phabricator-remarkup-assist.js', 2030 + 'uri' => '/res/6d9c05d9/rsrc/js/core/behavior-phabricator-remarkup-assist.js', 2031 2031 'type' => 'js', 2032 2032 'requires' => 2033 2033 array( ··· 2043 2043 ), 2044 2044 'javelin-behavior-phabricator-reveal-content' => 2045 2045 array( 2046 - 'uri' => '/res/5f9da91f/rsrc/js/core/behavior-reveal-content.js', 2046 + 'uri' => '/res/fef525ef/rsrc/js/core/behavior-reveal-content.js', 2047 2047 'type' => 'js', 2048 2048 'requires' => 2049 2049 array( ··· 2055 2055 ), 2056 2056 'javelin-behavior-phabricator-search-typeahead' => 2057 2057 array( 2058 - 'uri' => '/res/2662f34f/rsrc/js/core/behavior-search-typeahead.js', 2058 + 'uri' => '/res/b39896d5/rsrc/js/core/behavior-search-typeahead.js', 2059 2059 'type' => 'js', 2060 2060 'requires' => 2061 2061 array( ··· 2084 2084 ), 2085 2085 'javelin-behavior-phabricator-transaction-comment-form' => 2086 2086 array( 2087 - 'uri' => '/res/acc3ada1/rsrc/js/application/transactions/behavior-transaction-comment-form.js', 2087 + 'uri' => '/res/7591a57f/rsrc/js/application/transactions/behavior-transaction-comment-form.js', 2088 2088 'type' => 'js', 2089 2089 'requires' => 2090 2090 array( ··· 2124 2124 ), 2125 2125 'javelin-behavior-phame-post-preview' => 2126 2126 array( 2127 - 'uri' => '/res/ac4c503a/rsrc/js/application/phame/phame-post-preview.js', 2127 + 'uri' => '/res/181d1cbe/rsrc/js/application/phame/phame-post-preview.js', 2128 2128 'type' => 'js', 2129 2129 'requires' => 2130 2130 array( ··· 2137 2137 ), 2138 2138 'javelin-behavior-pholio-mock-view' => 2139 2139 array( 2140 - 'uri' => '/res/ecf5f969/rsrc/js/application/pholio/behavior-pholio-mock-view.js', 2140 + 'uri' => '/res/0632e7d9/rsrc/js/application/pholio/behavior-pholio-mock-view.js', 2141 2141 'type' => 'js', 2142 2142 'requires' => 2143 2143 array( ··· 2158 2158 ), 2159 2159 'javelin-behavior-phriction-document-preview' => 2160 2160 array( 2161 - 'uri' => '/res/f1665ecd/rsrc/js/application/phriction/phriction-document-preview.js', 2161 + 'uri' => '/res/e2fe02de/rsrc/js/application/phriction/phriction-document-preview.js', 2162 2162 'type' => 'js', 2163 2163 'requires' => 2164 2164 array( ··· 2184 2184 ), 2185 2185 'javelin-behavior-ponder-votebox' => 2186 2186 array( 2187 - 'uri' => '/res/9d091af3/rsrc/js/application/ponder/behavior-votebox.js', 2187 + 'uri' => '/res/d8c973a2/rsrc/js/application/ponder/behavior-votebox.js', 2188 2188 'type' => 'js', 2189 2189 'requires' => 2190 2190 array( ··· 2211 2211 ), 2212 2212 'javelin-behavior-refresh-csrf' => 2213 2213 array( 2214 - 'uri' => '/res/424ccc57/rsrc/js/core/behavior-refresh-csrf.js', 2214 + 'uri' => '/res/6c54100f/rsrc/js/core/behavior-refresh-csrf.js', 2215 2215 'type' => 'js', 2216 2216 'requires' => 2217 2217 array( ··· 2224 2224 ), 2225 2225 'javelin-behavior-releeph-preview-branch' => 2226 2226 array( 2227 - 'uri' => '/res/a77ebc86/rsrc/js/application/releeph/releeph-preview-branch.js', 2227 + 'uri' => '/res/f694854d/rsrc/js/application/releeph/releeph-preview-branch.js', 2228 2228 'type' => 'js', 2229 2229 'requires' => 2230 2230 array( 2231 2231 0 => 'javelin-behavior', 2232 2232 1 => 'javelin-dom', 2233 - 2 => 'javelin-stratcom', 2234 - 3 => 'javelin-uri', 2235 - 4 => 'javelin-util', 2233 + 2 => 'javelin-uri', 2234 + 3 => 'javelin-request', 2236 2235 ), 2237 2236 'disk' => '/rsrc/js/application/releeph/releeph-preview-branch.js', 2238 2237 ), 2239 2238 'javelin-behavior-releeph-request-state-change' => 2240 2239 array( 2241 - 'uri' => '/res/38f96ba8/rsrc/js/application/releeph/releeph-request-state-change.js', 2240 + 'uri' => '/res/07ecde0c/rsrc/js/application/releeph/releeph-request-state-change.js', 2242 2241 'type' => 'js', 2243 2242 'requires' => 2244 2243 array( 2245 2244 0 => 'javelin-behavior', 2246 2245 1 => 'javelin-dom', 2247 2246 2 => 'javelin-stratcom', 2248 - 3 => 'javelin-util', 2247 + 3 => 'javelin-request', 2249 2248 4 => 'phabricator-keyboard-shortcut', 2250 2249 5 => 'phabricator-notification', 2251 2250 ), ··· 2253 2252 ), 2254 2253 'javelin-behavior-releeph-request-typeahead' => 2255 2254 array( 2256 - 'uri' => '/res/b52096e2/rsrc/js/application/releeph/releeph-request-typeahead.js', 2255 + 'uri' => '/res/2c2350a0/rsrc/js/application/releeph/releeph-request-typeahead.js', 2257 2256 'type' => 'js', 2258 2257 'requires' => 2259 2258 array( 2260 2259 0 => 'javelin-behavior', 2261 - 1 => 'javelin-util', 2262 - 2 => 'javelin-dom', 2263 - 3 => 'javelin-typeahead', 2264 - 4 => 'javelin-tokenizer', 2265 - 5 => 'javelin-typeahead-preloaded-source', 2266 - 6 => 'javelin-typeahead-ondemand-source', 2267 - 7 => 'javelin-dom', 2268 - 8 => 'javelin-stratcom', 2269 - 9 => 'javelin-util', 2260 + 1 => 'javelin-dom', 2261 + 2 => 'javelin-typeahead', 2262 + 3 => 'javelin-typeahead-ondemand-source', 2263 + 4 => 'javelin-dom', 2270 2264 ), 2271 2265 'disk' => '/rsrc/js/application/releeph/releeph-request-typeahead.js', 2272 2266 ), ··· 2285 2279 ), 2286 2280 'javelin-behavior-slowvote-embed' => 2287 2281 array( 2288 - 'uri' => '/res/eef0818f/rsrc/js/application/slowvote/behavior-slowvote-embed.js', 2282 + 'uri' => '/res/8e85e20d/rsrc/js/application/slowvote/behavior-slowvote-embed.js', 2289 2283 'type' => 'js', 2290 2284 'requires' => 2291 2285 array( 2292 2286 0 => 'javelin-behavior', 2293 - 1 => 'javelin-util', 2287 + 1 => 'javelin-request', 2294 2288 2 => 'javelin-stratcom', 2295 2289 3 => 'javelin-dom', 2296 2290 ), ··· 2334 2328 ), 2335 2329 'javelin-behavior-view-placeholder' => 2336 2330 array( 2337 - 'uri' => '/res/faaf0af7/rsrc/externals/javelin/ext/view/ViewPlaceholder.js', 2331 + 'uri' => '/res/6abdb85b/rsrc/externals/javelin/ext/view/ViewPlaceholder.js', 2338 2332 'type' => 'js', 2339 2333 'requires' => 2340 2334 array( 2341 2335 0 => 'javelin-behavior', 2342 2336 1 => 'javelin-dom', 2343 2337 2 => 'javelin-view-renderer', 2338 + 3 => 'javelin-install', 2344 2339 ), 2345 2340 'disk' => '/rsrc/externals/javelin/ext/view/ViewPlaceholder.js', 2346 2341 ), ··· 2380 2375 ), 2381 2376 'javelin-dom' => 2382 2377 array( 2383 - 'uri' => '/res/64689b54/rsrc/externals/javelin/lib/DOM.js', 2378 + 'uri' => '/res/175211d6/rsrc/externals/javelin/lib/DOM.js', 2384 2379 'type' => 'js', 2385 2380 'requires' => 2386 2381 array( ··· 2407 2402 ), 2408 2403 'javelin-event' => 2409 2404 array( 2410 - 'uri' => '/res/0a4efce8/rsrc/externals/javelin/core/Event.js', 2405 + 'uri' => '/res/5f70f4d0/rsrc/externals/javelin/core/Event.js', 2411 2406 'type' => 'js', 2412 2407 'requires' => 2413 2408 array( ··· 2463 2458 ), 2464 2459 'javelin-magical-init' => 2465 2460 array( 2466 - 'uri' => '/res/7af6987f/rsrc/externals/javelin/core/init.js', 2461 + 'uri' => '/res/7c6c8d5a/rsrc/externals/javelin/core/init.js', 2467 2462 'type' => 'js', 2468 2463 'requires' => 2469 2464 array( ··· 2472 2467 ), 2473 2468 'javelin-mask' => 2474 2469 array( 2475 - 'uri' => '/res/5c40c29f/rsrc/externals/javelin/lib/Mask.js', 2470 + 'uri' => '/res/465cf513/rsrc/externals/javelin/lib/Mask.js', 2476 2471 'type' => 'js', 2477 2472 'requires' => 2478 2473 array( ··· 2494 2489 ), 2495 2490 'javelin-reactor-dom' => 2496 2491 array( 2497 - 'uri' => '/res/477f5d3b/rsrc/externals/javelin/ext/reactor/dom/RDOM.js', 2492 + 'uri' => '/res/5e03117e/rsrc/externals/javelin/ext/reactor/dom/RDOM.js', 2498 2493 'type' => 'js', 2499 2494 'requires' => 2500 2495 array( 2501 2496 0 => 'javelin-dom', 2502 2497 1 => 'javelin-dynval', 2503 - 2 => 'javelin-reactornode', 2504 - 3 => 'javelin-install', 2505 - 4 => 'javelin-util', 2498 + 2 => 'javelin-reactor', 2499 + 3 => 'javelin-reactornode', 2500 + 4 => 'javelin-install', 2501 + 5 => 'javelin-util', 2506 2502 ), 2507 2503 'disk' => '/rsrc/externals/javelin/ext/reactor/dom/RDOM.js', 2508 2504 ), ··· 2533 2529 ), 2534 2530 'javelin-request' => 2535 2531 array( 2536 - 'uri' => '/res/a9fbc4ae/rsrc/externals/javelin/lib/Request.js', 2532 + 'uri' => '/res/687bdcfc/rsrc/externals/javelin/lib/Request.js', 2537 2533 'type' => 'js', 2538 2534 'requires' => 2539 2535 array( ··· 2549 2545 ), 2550 2546 'javelin-resource' => 2551 2547 array( 2552 - 'uri' => '/res/1020e732/rsrc/externals/javelin/lib/Resource.js', 2548 + 'uri' => '/res/33a3bb57/rsrc/externals/javelin/lib/Resource.js', 2553 2549 'type' => 'js', 2554 2550 'requires' => 2555 2551 array( 2556 - 0 => 'javelin-magical-init', 2557 - 1 => 'javelin-stratcom', 2558 - 2 => 'javelin-util', 2559 - 3 => 'javelin-uri', 2552 + 0 => 'javelin-util', 2553 + 1 => 'javelin-uri', 2554 + 2 => 'javelin-install', 2560 2555 ), 2561 2556 'disk' => '/rsrc/externals/javelin/lib/Resource.js', 2562 2557 ), ··· 2575 2570 ), 2576 2571 'javelin-tokenizer' => 2577 2572 array( 2578 - 'uri' => '/res/2c55cb68/rsrc/externals/javelin/lib/control/tokenizer/Tokenizer.js', 2573 + 'uri' => '/res/7c117141/rsrc/externals/javelin/lib/control/tokenizer/Tokenizer.js', 2579 2574 'type' => 'js', 2580 2575 'requires' => 2581 2576 array( ··· 2623 2618 ), 2624 2619 'javelin-typeahead-ondemand-source' => 2625 2620 array( 2626 - 'uri' => '/res/9ab98c3d/rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadOnDemandSource.js', 2621 + 'uri' => '/res/4e5add88/rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadOnDemandSource.js', 2627 2622 'type' => 'js', 2628 2623 'requires' => 2629 2624 array( 2630 2625 0 => 'javelin-install', 2631 2626 1 => 'javelin-util', 2632 - 2 => 'javelin-stratcom', 2633 - 3 => 'javelin-request', 2634 - 4 => 'javelin-typeahead-source', 2627 + 2 => 'javelin-request', 2628 + 3 => 'javelin-typeahead-source', 2635 2629 ), 2636 2630 'disk' => '/rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadOnDemandSource.js', 2637 2631 ), 2638 2632 'javelin-typeahead-preloaded-source' => 2639 2633 array( 2640 - 'uri' => '/res/ffc234d1/rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadPreloadedSource.js', 2634 + 'uri' => '/res/147900c7/rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadPreloadedSource.js', 2641 2635 'type' => 'js', 2642 2636 'requires' => 2643 2637 array( 2644 2638 0 => 'javelin-install', 2645 2639 1 => 'javelin-util', 2646 - 2 => 'javelin-stratcom', 2647 - 3 => 'javelin-request', 2648 - 4 => 'javelin-typeahead-source', 2640 + 2 => 'javelin-request', 2641 + 3 => 'javelin-typeahead-source', 2649 2642 ), 2650 2643 'disk' => '/rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadPreloadedSource.js', 2651 2644 ), 2652 2645 'javelin-typeahead-source' => 2653 2646 array( 2654 - 'uri' => '/res/df206a51/rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadSource.js', 2647 + 'uri' => '/res/13289259/rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadSource.js', 2655 2648 'type' => 'js', 2656 2649 'requires' => 2657 2650 array( ··· 2675 2668 ), 2676 2669 'javelin-uri' => 2677 2670 array( 2678 - 'uri' => '/res/a1e5cbb3/rsrc/externals/javelin/lib/URI.js', 2671 + 'uri' => '/res/75aa4597/rsrc/externals/javelin/lib/URI.js', 2679 2672 'type' => 'js', 2680 2673 'requires' => 2681 2674 array( ··· 2687 2680 ), 2688 2681 'javelin-util' => 2689 2682 array( 2690 - 'uri' => '/res/322fc289/rsrc/externals/javelin/core/util.js', 2683 + 'uri' => '/res/90222113/rsrc/externals/javelin/core/util.js', 2691 2684 'type' => 'js', 2692 2685 'requires' => 2693 2686 array( ··· 2696 2689 ), 2697 2690 'javelin-vector' => 2698 2691 array( 2699 - 'uri' => '/res/c8c64ab7/rsrc/externals/javelin/lib/Vector.js', 2692 + 'uri' => '/res/58ea3dd7/rsrc/externals/javelin/lib/Vector.js', 2700 2693 'type' => 'js', 2701 2694 'requires' => 2702 2695 array( ··· 2707 2700 ), 2708 2701 'javelin-view' => 2709 2702 array( 2710 - 'uri' => '/res/3022e596/rsrc/externals/javelin/ext/view/View.js', 2703 + 'uri' => '/res/38daaec0/rsrc/externals/javelin/ext/view/View.js', 2711 2704 'type' => 'js', 2712 2705 'requires' => 2713 2706 array( ··· 2718 2711 ), 2719 2712 'javelin-view-html' => 2720 2713 array( 2721 - 'uri' => '/res/1b6e621c/rsrc/externals/javelin/ext/view/HTMLView.js', 2714 + 'uri' => '/res/0d225e8c/rsrc/externals/javelin/ext/view/HTMLView.js', 2722 2715 'type' => 'js', 2723 2716 'requires' => 2724 2717 array( 2725 2718 0 => 'javelin-install', 2726 - 1 => 'javelin-view', 2719 + 1 => 'javelin-dom', 2720 + 2 => 'javelin-view-visitor', 2721 + 3 => 'javelin-util', 2727 2722 ), 2728 2723 'disk' => '/rsrc/externals/javelin/ext/view/HTMLView.js', 2729 2724 ), 2730 2725 'javelin-view-interpreter' => 2731 2726 array( 2732 - 'uri' => '/res/39fe3ad3/rsrc/externals/javelin/ext/view/ViewInterpreter.js', 2727 + 'uri' => '/res/b0c07f96/rsrc/externals/javelin/ext/view/ViewInterpreter.js', 2733 2728 'type' => 'js', 2734 2729 'requires' => 2735 2730 array( 2736 2731 0 => 'javelin-view', 2737 2732 1 => 'javelin-install', 2733 + 2 => 'javelin-dom', 2738 2734 ), 2739 2735 'disk' => '/rsrc/externals/javelin/ext/view/ViewInterpreter.js', 2740 2736 ), 2741 2737 'javelin-view-renderer' => 2742 2738 array( 2743 - 'uri' => '/res/d2119b79/rsrc/externals/javelin/ext/view/ViewRenderer.js', 2739 + 'uri' => '/res/fe0d2f60/rsrc/externals/javelin/ext/view/ViewRenderer.js', 2744 2740 'type' => 'js', 2745 2741 'requires' => 2746 2742 array( 2747 2743 0 => 'javelin-install', 2744 + 1 => 'javelin-util', 2748 2745 ), 2749 2746 'disk' => '/rsrc/externals/javelin/ext/view/ViewRenderer.js', 2750 2747 ), ··· 2761 2758 ), 2762 2759 'javelin-workflow' => 2763 2760 array( 2764 - 'uri' => '/res/73e8d0e2/rsrc/externals/javelin/lib/Workflow.js', 2761 + 'uri' => '/res/8274d65f/rsrc/externals/javelin/lib/Workflow.js', 2765 2762 'type' => 'js', 2766 2763 'requires' => 2767 2764 array( ··· 2994 2991 ), 2995 2992 'phabricator-drag-and-drop-file-upload' => 2996 2993 array( 2997 - 'uri' => '/res/3991c1b6/rsrc/js/core/DragAndDropFileUpload.js', 2994 + 'uri' => '/res/396d3b3b/rsrc/js/core/DragAndDropFileUpload.js', 2998 2995 'type' => 'js', 2999 2996 'requires' => 3000 2997 array( ··· 3042 3039 ), 3043 3040 'phabricator-file-upload' => 3044 3041 array( 3045 - 'uri' => '/res/ee9664fd/rsrc/js/core/FileUpload.js', 3042 + 'uri' => '/res/c9605008/rsrc/js/core/FileUpload.js', 3046 3043 'type' => 'js', 3047 3044 'requires' => 3048 3045 array( ··· 3090 3087 ), 3091 3088 'phabricator-hovercard' => 3092 3089 array( 3093 - 'uri' => '/res/2cf2c195/rsrc/js/core/Hovercard.js', 3090 + 'uri' => '/res/7fb94260/rsrc/js/core/Hovercard.js', 3094 3091 'type' => 'js', 3095 3092 'requires' => 3096 3093 array( ··· 3237 3234 ), 3238 3235 'phabricator-phtize' => 3239 3236 array( 3240 - 'uri' => '/res/50a80ff1/rsrc/js/core/phtize.js', 3237 + 'uri' => '/res/dc655a81/rsrc/js/core/phtize.js', 3241 3238 'type' => 'js', 3242 3239 'requires' => 3243 3240 array( ··· 3256 3253 ), 3257 3254 'phabricator-prefab' => 3258 3255 array( 3259 - 'uri' => '/res/513c4313/rsrc/js/core/Prefab.js', 3256 + 'uri' => '/res/511859ca/rsrc/js/core/Prefab.js', 3260 3257 'type' => 'js', 3261 3258 'requires' => 3262 3259 array( ··· 3414 3411 ), 3415 3412 'phabricator-tooltip' => 3416 3413 array( 3417 - 'uri' => '/res/1dc73d91/rsrc/js/core/ToolTip.js', 3414 + 'uri' => '/res/a23bc887/rsrc/js/core/ToolTip.js', 3418 3415 'type' => 'js', 3419 3416 'requires' => 3420 3417 array( ··· 3445 3442 ), 3446 3443 'phabricator-uiexample-javelin-view' => 3447 3444 array( 3448 - 'uri' => '/res/a2ce2cfc/rsrc/js/application/uiexample/JavelinViewExample.js', 3445 + 'uri' => '/res/2da87384/rsrc/js/application/uiexample/JavelinViewExample.js', 3449 3446 'type' => 'js', 3450 3447 'requires' => 3451 3448 array( 3452 3449 0 => 'javelin-install', 3453 - 1 => 'javelin-view', 3454 - 2 => 'javelin-util', 3455 - 3 => 'javelin-dom', 3450 + 1 => 'javelin-dom', 3456 3451 ), 3457 3452 'disk' => '/rsrc/js/application/uiexample/JavelinViewExample.js', 3458 3453 ), 3459 3454 'phabricator-uiexample-reactor-button' => 3460 3455 array( 3461 - 'uri' => '/res/142127f6/rsrc/js/application/uiexample/ReactorButtonExample.js', 3456 + 'uri' => '/res/6bfe4f05/rsrc/js/application/uiexample/ReactorButtonExample.js', 3462 3457 'type' => 'js', 3463 3458 'requires' => 3464 3459 array( 3465 3460 0 => 'javelin-install', 3466 - 1 => 'javelin-view', 3461 + 1 => 'javelin-dom', 3467 3462 2 => 'javelin-util', 3468 - 3 => 'javelin-dom', 3463 + 3 => 'javelin-dynval', 3469 3464 4 => 'javelin-reactor-dom', 3470 3465 ), 3471 3466 'disk' => '/rsrc/js/application/uiexample/ReactorButtonExample.js', 3472 3467 ), 3473 3468 'phabricator-uiexample-reactor-checkbox' => 3474 3469 array( 3475 - 'uri' => '/res/c75cb9e9/rsrc/js/application/uiexample/ReactorCheckboxExample.js', 3470 + 'uri' => '/res/3e8b30ac/rsrc/js/application/uiexample/ReactorCheckboxExample.js', 3476 3471 'type' => 'js', 3477 3472 'requires' => 3478 3473 array( 3479 3474 0 => 'javelin-install', 3480 - 1 => 'javelin-view', 3481 - 2 => 'javelin-util', 3482 - 3 => 'javelin-dom', 3483 - 4 => 'javelin-reactor-dom', 3475 + 1 => 'javelin-dom', 3476 + 2 => 'javelin-reactor-dom', 3484 3477 ), 3485 3478 'disk' => '/rsrc/js/application/uiexample/ReactorCheckboxExample.js', 3486 3479 ), 3487 3480 'phabricator-uiexample-reactor-focus' => 3488 3481 array( 3489 - 'uri' => '/res/3cc992eb/rsrc/js/application/uiexample/ReactorFocusExample.js', 3482 + 'uri' => '/res/d8f3b56e/rsrc/js/application/uiexample/ReactorFocusExample.js', 3490 3483 'type' => 'js', 3491 3484 'requires' => 3492 3485 array( 3493 3486 0 => 'javelin-install', 3494 - 1 => 'javelin-view', 3495 - 2 => 'javelin-util', 3496 - 3 => 'javelin-dom', 3497 - 4 => 'javelin-reactor-dom', 3487 + 1 => 'javelin-dom', 3488 + 2 => 'javelin-reactor-dom', 3498 3489 ), 3499 3490 'disk' => '/rsrc/js/application/uiexample/ReactorFocusExample.js', 3500 3491 ), 3501 3492 'phabricator-uiexample-reactor-input' => 3502 3493 array( 3503 - 'uri' => '/res/4953da16/rsrc/js/application/uiexample/ReactorInputExample.js', 3494 + 'uri' => '/res/936352d9/rsrc/js/application/uiexample/ReactorInputExample.js', 3504 3495 'type' => 'js', 3505 3496 'requires' => 3506 3497 array( 3507 3498 0 => 'javelin-install', 3508 - 1 => 'javelin-view', 3509 - 2 => 'javelin-util', 3510 - 3 => 'javelin-dom', 3511 - 4 => 'javelin-reactor-dom', 3512 - 5 => 'javelin-view-html', 3513 - 6 => 'javelin-view-interpreter', 3514 - 7 => 'javelin-view-renderer', 3499 + 1 => 'javelin-reactor-dom', 3500 + 2 => 'javelin-view-html', 3501 + 3 => 'javelin-view-interpreter', 3502 + 4 => 'javelin-view-renderer', 3515 3503 ), 3516 3504 'disk' => '/rsrc/js/application/uiexample/ReactorInputExample.js', 3517 3505 ), 3518 3506 'phabricator-uiexample-reactor-mouseover' => 3519 3507 array( 3520 - 'uri' => '/res/52a355b6/rsrc/js/application/uiexample/ReactorMouseoverExample.js', 3508 + 'uri' => '/res/031a9f4f/rsrc/js/application/uiexample/ReactorMouseoverExample.js', 3521 3509 'type' => 'js', 3522 3510 'requires' => 3523 3511 array( 3524 3512 0 => 'javelin-install', 3525 - 1 => 'javelin-view', 3526 - 2 => 'javelin-util', 3527 - 3 => 'javelin-dom', 3528 - 4 => 'javelin-reactor-dom', 3513 + 1 => 'javelin-dom', 3514 + 2 => 'javelin-reactor-dom', 3529 3515 ), 3530 3516 'disk' => '/rsrc/js/application/uiexample/ReactorMouseoverExample.js', 3531 3517 ), 3532 3518 'phabricator-uiexample-reactor-radio' => 3533 3519 array( 3534 - 'uri' => '/res/ae87f3af/rsrc/js/application/uiexample/ReactorRadioExample.js', 3520 + 'uri' => '/res/208c58e3/rsrc/js/application/uiexample/ReactorRadioExample.js', 3535 3521 'type' => 'js', 3536 3522 'requires' => 3537 3523 array( 3538 3524 0 => 'javelin-install', 3539 - 1 => 'javelin-view', 3540 - 2 => 'javelin-util', 3541 - 3 => 'javelin-dom', 3542 - 4 => 'javelin-reactor-dom', 3525 + 1 => 'javelin-dom', 3526 + 2 => 'javelin-reactor-dom', 3543 3527 ), 3544 3528 'disk' => '/rsrc/js/application/uiexample/ReactorRadioExample.js', 3545 3529 ), 3546 3530 'phabricator-uiexample-reactor-select' => 3547 3531 array( 3548 - 'uri' => '/res/23cb448a/rsrc/js/application/uiexample/ReactorSelectExample.js', 3532 + 'uri' => '/res/1b68a6db/rsrc/js/application/uiexample/ReactorSelectExample.js', 3549 3533 'type' => 'js', 3550 3534 'requires' => 3551 3535 array( 3552 3536 0 => 'javelin-install', 3553 - 1 => 'javelin-view', 3554 - 2 => 'javelin-util', 3555 - 3 => 'javelin-dom', 3556 - 4 => 'javelin-reactor-dom', 3537 + 1 => 'javelin-dom', 3538 + 2 => 'javelin-reactor-dom', 3557 3539 ), 3558 3540 'disk' => '/rsrc/js/application/uiexample/ReactorSelectExample.js', 3559 3541 ), 3560 3542 'phabricator-uiexample-reactor-sendclass' => 3561 3543 array( 3562 - 'uri' => '/res/8cd34264/rsrc/js/application/uiexample/ReactorSendClassExample.js', 3544 + 'uri' => '/res/00cb3131/rsrc/js/application/uiexample/ReactorSendClassExample.js', 3563 3545 'type' => 'js', 3564 3546 'requires' => 3565 3547 array( 3566 3548 0 => 'javelin-install', 3567 - 1 => 'javelin-view', 3568 - 2 => 'javelin-util', 3569 - 3 => 'javelin-dom', 3570 - 4 => 'javelin-reactor-dom', 3549 + 1 => 'javelin-dom', 3550 + 2 => 'javelin-reactor-dom', 3571 3551 ), 3572 3552 'disk' => '/rsrc/js/application/uiexample/ReactorSendClassExample.js', 3573 3553 ), 3574 3554 'phabricator-uiexample-reactor-sendproperties' => 3575 3555 array( 3576 - 'uri' => '/res/18af54aa/rsrc/js/application/uiexample/ReactorSendPropertiesExample.js', 3556 + 'uri' => '/res/392f1e02/rsrc/js/application/uiexample/ReactorSendPropertiesExample.js', 3577 3557 'type' => 'js', 3578 3558 'requires' => 3579 3559 array( 3580 3560 0 => 'javelin-install', 3581 - 1 => 'javelin-view', 3582 - 2 => 'javelin-util', 3583 - 3 => 'javelin-dom', 3584 - 4 => 'javelin-reactor-dom', 3561 + 1 => 'javelin-dom', 3562 + 2 => 'javelin-reactor-dom', 3585 3563 ), 3586 3564 'disk' => '/rsrc/js/application/uiexample/ReactorSendPropertiesExample.js', 3587 3565 ), ··· 3772 3750 ), 3773 3751 'raphael-core' => 3774 3752 array( 3775 - 'uri' => '/res/0939b925/rsrc/externals/raphael/raphael.js', 3753 + 'uri' => '/res/5dc5e17c/rsrc/externals/raphael/raphael.js', 3776 3754 'type' => 'js', 3777 3755 'requires' => 3778 3756 array( ··· 3781 3759 ), 3782 3760 'raphael-g' => 3783 3761 array( 3784 - 'uri' => '/res/e14432ce/rsrc/externals/raphael/g.raphael.js', 3762 + 'uri' => '/res/229b89a1/rsrc/externals/raphael/g.raphael.js', 3785 3763 'type' => 'js', 3786 3764 'requires' => 3787 3765 array( ··· 3790 3768 ), 3791 3769 'raphael-g-line' => 3792 3770 array( 3793 - 'uri' => '/res/2c9e6746/rsrc/externals/raphael/g.raphael.line.js', 3771 + 'uri' => '/res/96da30f7/rsrc/externals/raphael/g.raphael.line.js', 3794 3772 'type' => 'js', 3795 3773 'requires' => 3796 3774 array( ··· 4070 4048 'uri' => '/res/pkg/bdba44f0/core.pkg.css', 4071 4049 'type' => 'css', 4072 4050 ), 4073 - '26980a1c' => 4051 + '25aa6fec' => 4074 4052 array( 4075 4053 'name' => 'core.pkg.js', 4076 4054 'symbols' => ··· 4111 4089 33 => 'javelin-behavior-global-drag-and-drop', 4112 4090 34 => 'javelin-behavior-phabricator-reveal-content', 4113 4091 ), 4114 - 'uri' => '/res/pkg/26980a1c/core.pkg.js', 4092 + 'uri' => '/res/pkg/25aa6fec/core.pkg.js', 4115 4093 'type' => 'js', 4116 4094 ), 4117 4095 '4ccfeb47' => ··· 4147 4125 'uri' => '/res/pkg/dd27a69b/differential.pkg.css', 4148 4126 'type' => 'css', 4149 4127 ), 4150 - '77e07ff4' => 4128 + '9488bb69' => 4151 4129 array( 4152 4130 'name' => 'differential.pkg.js', 4153 4131 'symbols' => ··· 4173 4151 18 => 'javelin-behavior-differential-toggle-files', 4174 4152 19 => 'javelin-behavior-differential-user-select', 4175 4153 ), 4176 - 'uri' => '/res/pkg/77e07ff4/differential.pkg.js', 4154 + 'uri' => '/res/pkg/9488bb69/differential.pkg.js', 4177 4155 'type' => 'js', 4178 4156 ), 4179 4157 'c8ce2d88' => ··· 4187 4165 'uri' => '/res/pkg/c8ce2d88/diffusion.pkg.css', 4188 4166 'type' => 'css', 4189 4167 ), 4190 - 'f96657b8' => 4168 + 96909266 => 4191 4169 array( 4192 4170 'name' => 'diffusion.pkg.js', 4193 4171 'symbols' => ··· 4196 4174 1 => 'javelin-behavior-diffusion-commit-graph', 4197 4175 2 => 'javelin-behavior-audit-preview', 4198 4176 ), 4199 - 'uri' => '/res/pkg/f96657b8/diffusion.pkg.js', 4177 + 'uri' => '/res/pkg/96909266/diffusion.pkg.js', 4200 4178 'type' => 'js', 4201 4179 ), 4202 - '202a3dd0' => 4180 + '565e00f7' => 4203 4181 array( 4204 4182 'name' => 'javelin.pkg.js', 4205 4183 'symbols' => ··· 4224 4202 17 => 'javelin-typeahead-ondemand-source', 4225 4203 18 => 'javelin-tokenizer', 4226 4204 ), 4227 - 'uri' => '/res/pkg/202a3dd0/javelin.pkg.js', 4205 + 'uri' => '/res/pkg/565e00f7/javelin.pkg.js', 4228 4206 'type' => 'js', 4229 4207 ), 4230 4208 '6b1fccc6' => ··· 4240 4218 'uri' => '/res/pkg/6b1fccc6/maniphest.pkg.css', 4241 4219 'type' => 'css', 4242 4220 ), 4243 - 'f85eb6d8' => 4221 + '1621e522' => 4244 4222 array( 4245 4223 'name' => 'maniphest.pkg.js', 4246 4224 'symbols' => ··· 4251 4229 3 => 'javelin-behavior-maniphest-transaction-expand', 4252 4230 4 => 'javelin-behavior-maniphest-subpriority-editor', 4253 4231 ), 4254 - 'uri' => '/res/pkg/f85eb6d8/maniphest.pkg.js', 4232 + 'uri' => '/res/pkg/1621e522/maniphest.pkg.js', 4255 4233 'type' => 'js', 4256 4234 ), 4257 4235 ), ··· 4270 4248 'aphront-typeahead-control-css' => 'bdba44f0', 4271 4249 'differential-changeset-view-css' => 'dd27a69b', 4272 4250 'differential-core-view-css' => 'dd27a69b', 4273 - 'differential-inline-comment-editor' => '77e07ff4', 4251 + 'differential-inline-comment-editor' => '9488bb69', 4274 4252 'differential-local-commits-view-css' => 'dd27a69b', 4275 4253 'differential-results-table-css' => 'dd27a69b', 4276 4254 'differential-revision-add-comment-css' => 'dd27a69b', ··· 4283 4261 'diffusion-icons-css' => 'c8ce2d88', 4284 4262 'global-drag-and-drop-css' => 'bdba44f0', 4285 4263 'inline-comment-summary-css' => 'dd27a69b', 4286 - 'javelin-aphlict' => '26980a1c', 4287 - 'javelin-behavior' => '202a3dd0', 4288 - 'javelin-behavior-aphlict-dropdown' => '26980a1c', 4289 - 'javelin-behavior-aphlict-listen' => '26980a1c', 4290 - 'javelin-behavior-aphront-basic-tokenizer' => '26980a1c', 4291 - 'javelin-behavior-aphront-drag-and-drop' => '77e07ff4', 4292 - 'javelin-behavior-aphront-drag-and-drop-textarea' => '77e07ff4', 4293 - 'javelin-behavior-aphront-form-disable-on-submit' => '26980a1c', 4294 - 'javelin-behavior-audit-preview' => 'f96657b8', 4264 + 'javelin-aphlict' => '25aa6fec', 4265 + 'javelin-behavior' => '565e00f7', 4266 + 'javelin-behavior-aphlict-dropdown' => '25aa6fec', 4267 + 'javelin-behavior-aphlict-listen' => '25aa6fec', 4268 + 'javelin-behavior-aphront-basic-tokenizer' => '25aa6fec', 4269 + 'javelin-behavior-aphront-drag-and-drop' => '9488bb69', 4270 + 'javelin-behavior-aphront-drag-and-drop-textarea' => '9488bb69', 4271 + 'javelin-behavior-aphront-form-disable-on-submit' => '25aa6fec', 4272 + 'javelin-behavior-audit-preview' => '96909266', 4295 4273 'javelin-behavior-dark-console' => '4ccfeb47', 4296 - 'javelin-behavior-device' => '26980a1c', 4297 - 'javelin-behavior-differential-accept-with-errors' => '77e07ff4', 4298 - 'javelin-behavior-differential-add-reviewers-and-ccs' => '77e07ff4', 4299 - 'javelin-behavior-differential-comment-jump' => '77e07ff4', 4300 - 'javelin-behavior-differential-diff-radios' => '77e07ff4', 4301 - 'javelin-behavior-differential-dropdown-menus' => '77e07ff4', 4302 - 'javelin-behavior-differential-edit-inline-comments' => '77e07ff4', 4303 - 'javelin-behavior-differential-feedback-preview' => '77e07ff4', 4304 - 'javelin-behavior-differential-keyboard-navigation' => '77e07ff4', 4305 - 'javelin-behavior-differential-populate' => '77e07ff4', 4306 - 'javelin-behavior-differential-show-more' => '77e07ff4', 4307 - 'javelin-behavior-differential-toggle-files' => '77e07ff4', 4308 - 'javelin-behavior-differential-user-select' => '77e07ff4', 4309 - 'javelin-behavior-diffusion-commit-graph' => 'f96657b8', 4310 - 'javelin-behavior-diffusion-pull-lastmodified' => 'f96657b8', 4274 + 'javelin-behavior-device' => '25aa6fec', 4275 + 'javelin-behavior-differential-accept-with-errors' => '9488bb69', 4276 + 'javelin-behavior-differential-add-reviewers-and-ccs' => '9488bb69', 4277 + 'javelin-behavior-differential-comment-jump' => '9488bb69', 4278 + 'javelin-behavior-differential-diff-radios' => '9488bb69', 4279 + 'javelin-behavior-differential-dropdown-menus' => '9488bb69', 4280 + 'javelin-behavior-differential-edit-inline-comments' => '9488bb69', 4281 + 'javelin-behavior-differential-feedback-preview' => '9488bb69', 4282 + 'javelin-behavior-differential-keyboard-navigation' => '9488bb69', 4283 + 'javelin-behavior-differential-populate' => '9488bb69', 4284 + 'javelin-behavior-differential-show-more' => '9488bb69', 4285 + 'javelin-behavior-differential-toggle-files' => '9488bb69', 4286 + 'javelin-behavior-differential-user-select' => '9488bb69', 4287 + 'javelin-behavior-diffusion-commit-graph' => '96909266', 4288 + 'javelin-behavior-diffusion-pull-lastmodified' => '96909266', 4311 4289 'javelin-behavior-error-log' => '4ccfeb47', 4312 - 'javelin-behavior-global-drag-and-drop' => '26980a1c', 4313 - 'javelin-behavior-history-install' => '26980a1c', 4314 - 'javelin-behavior-konami' => '26980a1c', 4315 - 'javelin-behavior-lightbox-attachments' => '26980a1c', 4316 - 'javelin-behavior-load-blame' => '77e07ff4', 4317 - 'javelin-behavior-maniphest-batch-selector' => 'f85eb6d8', 4318 - 'javelin-behavior-maniphest-subpriority-editor' => 'f85eb6d8', 4319 - 'javelin-behavior-maniphest-transaction-controls' => 'f85eb6d8', 4320 - 'javelin-behavior-maniphest-transaction-expand' => 'f85eb6d8', 4321 - 'javelin-behavior-maniphest-transaction-preview' => 'f85eb6d8', 4322 - 'javelin-behavior-phabricator-active-nav' => '26980a1c', 4323 - 'javelin-behavior-phabricator-autofocus' => '26980a1c', 4324 - 'javelin-behavior-phabricator-gesture' => '26980a1c', 4325 - 'javelin-behavior-phabricator-keyboard-shortcuts' => '26980a1c', 4326 - 'javelin-behavior-phabricator-nav' => '26980a1c', 4327 - 'javelin-behavior-phabricator-object-selector' => '77e07ff4', 4328 - 'javelin-behavior-phabricator-oncopy' => '26980a1c', 4329 - 'javelin-behavior-phabricator-remarkup-assist' => '26980a1c', 4330 - 'javelin-behavior-phabricator-reveal-content' => '26980a1c', 4331 - 'javelin-behavior-phabricator-search-typeahead' => '26980a1c', 4332 - 'javelin-behavior-phabricator-tooltips' => '26980a1c', 4333 - 'javelin-behavior-phabricator-watch-anchor' => '26980a1c', 4334 - 'javelin-behavior-refresh-csrf' => '26980a1c', 4335 - 'javelin-behavior-repository-crossreference' => '77e07ff4', 4336 - 'javelin-behavior-toggle-class' => '26980a1c', 4337 - 'javelin-behavior-workflow' => '26980a1c', 4338 - 'javelin-dom' => '202a3dd0', 4339 - 'javelin-event' => '202a3dd0', 4340 - 'javelin-install' => '202a3dd0', 4341 - 'javelin-json' => '202a3dd0', 4342 - 'javelin-mask' => '202a3dd0', 4343 - 'javelin-request' => '202a3dd0', 4344 - 'javelin-resource' => '202a3dd0', 4345 - 'javelin-stratcom' => '202a3dd0', 4346 - 'javelin-tokenizer' => '202a3dd0', 4347 - 'javelin-typeahead' => '202a3dd0', 4348 - 'javelin-typeahead-normalizer' => '202a3dd0', 4349 - 'javelin-typeahead-ondemand-source' => '202a3dd0', 4350 - 'javelin-typeahead-preloaded-source' => '202a3dd0', 4351 - 'javelin-typeahead-source' => '202a3dd0', 4352 - 'javelin-uri' => '202a3dd0', 4353 - 'javelin-util' => '202a3dd0', 4354 - 'javelin-vector' => '202a3dd0', 4355 - 'javelin-workflow' => '202a3dd0', 4290 + 'javelin-behavior-global-drag-and-drop' => '25aa6fec', 4291 + 'javelin-behavior-history-install' => '25aa6fec', 4292 + 'javelin-behavior-konami' => '25aa6fec', 4293 + 'javelin-behavior-lightbox-attachments' => '25aa6fec', 4294 + 'javelin-behavior-load-blame' => '9488bb69', 4295 + 'javelin-behavior-maniphest-batch-selector' => '1621e522', 4296 + 'javelin-behavior-maniphest-subpriority-editor' => '1621e522', 4297 + 'javelin-behavior-maniphest-transaction-controls' => '1621e522', 4298 + 'javelin-behavior-maniphest-transaction-expand' => '1621e522', 4299 + 'javelin-behavior-maniphest-transaction-preview' => '1621e522', 4300 + 'javelin-behavior-phabricator-active-nav' => '25aa6fec', 4301 + 'javelin-behavior-phabricator-autofocus' => '25aa6fec', 4302 + 'javelin-behavior-phabricator-gesture' => '25aa6fec', 4303 + 'javelin-behavior-phabricator-keyboard-shortcuts' => '25aa6fec', 4304 + 'javelin-behavior-phabricator-nav' => '25aa6fec', 4305 + 'javelin-behavior-phabricator-object-selector' => '9488bb69', 4306 + 'javelin-behavior-phabricator-oncopy' => '25aa6fec', 4307 + 'javelin-behavior-phabricator-remarkup-assist' => '25aa6fec', 4308 + 'javelin-behavior-phabricator-reveal-content' => '25aa6fec', 4309 + 'javelin-behavior-phabricator-search-typeahead' => '25aa6fec', 4310 + 'javelin-behavior-phabricator-tooltips' => '25aa6fec', 4311 + 'javelin-behavior-phabricator-watch-anchor' => '25aa6fec', 4312 + 'javelin-behavior-refresh-csrf' => '25aa6fec', 4313 + 'javelin-behavior-repository-crossreference' => '9488bb69', 4314 + 'javelin-behavior-toggle-class' => '25aa6fec', 4315 + 'javelin-behavior-workflow' => '25aa6fec', 4316 + 'javelin-dom' => '565e00f7', 4317 + 'javelin-event' => '565e00f7', 4318 + 'javelin-install' => '565e00f7', 4319 + 'javelin-json' => '565e00f7', 4320 + 'javelin-mask' => '565e00f7', 4321 + 'javelin-request' => '565e00f7', 4322 + 'javelin-resource' => '565e00f7', 4323 + 'javelin-stratcom' => '565e00f7', 4324 + 'javelin-tokenizer' => '565e00f7', 4325 + 'javelin-typeahead' => '565e00f7', 4326 + 'javelin-typeahead-normalizer' => '565e00f7', 4327 + 'javelin-typeahead-ondemand-source' => '565e00f7', 4328 + 'javelin-typeahead-preloaded-source' => '565e00f7', 4329 + 'javelin-typeahead-source' => '565e00f7', 4330 + 'javelin-uri' => '565e00f7', 4331 + 'javelin-util' => '565e00f7', 4332 + 'javelin-vector' => '565e00f7', 4333 + 'javelin-workflow' => '565e00f7', 4356 4334 'lightbox-attachment-css' => 'bdba44f0', 4357 4335 'maniphest-task-summary-css' => '6b1fccc6', 4358 4336 'maniphest-transaction-detail-css' => '6b1fccc6', 4359 - 'phabricator-busy' => '26980a1c', 4337 + 'phabricator-busy' => '25aa6fec', 4360 4338 'phabricator-content-source-view-css' => 'dd27a69b', 4361 4339 'phabricator-core-buttons-css' => 'bdba44f0', 4362 4340 'phabricator-core-css' => 'bdba44f0', 4363 4341 'phabricator-crumbs-view-css' => 'bdba44f0', 4364 4342 'phabricator-directory-css' => 'bdba44f0', 4365 - 'phabricator-drag-and-drop-file-upload' => '77e07ff4', 4366 - 'phabricator-dropdown-menu' => '26980a1c', 4367 - 'phabricator-file-upload' => '26980a1c', 4343 + 'phabricator-drag-and-drop-file-upload' => '9488bb69', 4344 + 'phabricator-dropdown-menu' => '25aa6fec', 4345 + 'phabricator-file-upload' => '25aa6fec', 4368 4346 'phabricator-filetree-view-css' => 'bdba44f0', 4369 4347 'phabricator-flag-css' => 'bdba44f0', 4370 4348 'phabricator-form-view-css' => 'bdba44f0', 4371 4349 'phabricator-header-view-css' => 'bdba44f0', 4372 4350 'phabricator-jump-nav' => 'bdba44f0', 4373 - 'phabricator-keyboard-shortcut' => '26980a1c', 4374 - 'phabricator-keyboard-shortcut-manager' => '26980a1c', 4351 + 'phabricator-keyboard-shortcut' => '25aa6fec', 4352 + 'phabricator-keyboard-shortcut-manager' => '25aa6fec', 4375 4353 'phabricator-main-menu-view' => 'bdba44f0', 4376 - 'phabricator-menu-item' => '26980a1c', 4354 + 'phabricator-menu-item' => '25aa6fec', 4377 4355 'phabricator-nav-view-css' => 'bdba44f0', 4378 - 'phabricator-notification' => '26980a1c', 4356 + 'phabricator-notification' => '25aa6fec', 4379 4357 'phabricator-notification-css' => 'bdba44f0', 4380 4358 'phabricator-notification-menu-css' => 'bdba44f0', 4381 4359 'phabricator-object-item-list-view-css' => 'bdba44f0', 4382 4360 'phabricator-object-selector-css' => 'dd27a69b', 4383 - 'phabricator-phtize' => '26980a1c', 4384 - 'phabricator-prefab' => '26980a1c', 4361 + 'phabricator-phtize' => '25aa6fec', 4362 + 'phabricator-prefab' => '25aa6fec', 4385 4363 'phabricator-project-tag-css' => '6b1fccc6', 4386 4364 'phabricator-remarkup-css' => 'bdba44f0', 4387 - 'phabricator-shaped-request' => '77e07ff4', 4365 + 'phabricator-shaped-request' => '9488bb69', 4388 4366 'phabricator-side-menu-view-css' => 'bdba44f0', 4389 4367 'phabricator-standard-page-view' => 'bdba44f0', 4390 - 'phabricator-textareautils' => '26980a1c', 4391 - 'phabricator-tooltip' => '26980a1c', 4368 + 'phabricator-textareautils' => '25aa6fec', 4369 + 'phabricator-tooltip' => '25aa6fec', 4392 4370 'phabricator-transaction-view-css' => 'bdba44f0', 4393 4371 'phabricator-zindex-css' => 'bdba44f0', 4394 4372 'sprite-apps-large-css' => 'bdba44f0',
+15 -4
src/infrastructure/celerity/CelerityResourceTransformer.php
··· 30 30 return $this; 31 31 } 32 32 33 + /** 34 + * @phutil-external-symbol function jsShrink 35 + */ 33 36 public function transformResource($path, $data) { 34 37 $type = self::getResourceType($path); 35 38 ··· 70 73 $data = trim($data); 71 74 break; 72 75 case 'js': 73 - $root = dirname(phutil_get_library_root('phabricator')); 74 - $bin = $root.'/externals/javelin/support/jsxmin/jsxmin'; 75 76 76 - if (@file_exists($bin)) { 77 - $future = new ExecFuture('%s __DEV__:0', $bin); 77 + // If `jsxmin` is available, use it. jsxmin is the Javelin minifier and 78 + // produces the smallest output, but is complicated to build. 79 + if (Filesystem::binaryExists('jsxmin')) { 80 + $future = new ExecFuture('jsxmin __DEV__:0'); 78 81 $future->write($data); 79 82 list($err, $result) = $future->resolve(); 80 83 if (!$err) { 81 84 $data = $result; 85 + break; 82 86 } 83 87 } 88 + 89 + // If `jsxmin` is not available, use `JsShrink`, which doesn't compress 90 + // quite as well but is always available. 91 + $root = dirname(phutil_get_library_root('phabricator')); 92 + require_once $root.'/externals/JsShrink/jsShrink.php'; 93 + $data = jsShrink($data); 94 + 84 95 break; 85 96 } 86 97
+23 -4
src/infrastructure/lint/PhabricatorLintEngine.php
··· 37 37 $javelin_linter = new PhabricatorJavelinLinter(); 38 38 $linters[] = $javelin_linter; 39 39 40 + $jshint_linter = new ArcanistJSHintLinter(); 41 + $linters[] = $jshint_linter; 42 + 40 43 foreach ($paths as $path) { 44 + if (!preg_match('/\.js$/', $path)) { 45 + continue; 46 + } 47 + 48 + if (strpos($path, 'externals/JsShrink') !== false) { 49 + // Ignore warnings in JsShrink tests. 50 + continue; 51 + } 52 + 53 + if (strpos($path, 'externals/raphael') !== false) { 54 + // Ignore Raphael. 55 + continue; 56 + } 57 + 58 + $jshint_linter->addPath($path); 59 + $jshint_linter->addData($path, $this->loadData($path)); 60 + 41 61 if (strpos($path, 'support/aphlict/') !== false) { 42 62 // This stuff is Node.js, not Javelin, so don't apply the Javelin 43 63 // linter. 44 64 continue; 45 65 } 46 - if (preg_match('/\.js$/', $path)) { 47 - $javelin_linter->addPath($path); 48 - $javelin_linter->addData($path, $this->loadData($path)); 49 - } 66 + 67 + $javelin_linter->addPath($path); 68 + $javelin_linter->addData($path, $this->loadData($path)); 50 69 } 51 70 52 71 return $linters;
+11 -6
src/infrastructure/lint/linter/PhabricatorJavelinLinter.php
··· 78 78 } 79 79 80 80 private function shouldIgnorePath($path) { 81 - return preg_match('@/__tests__/|externals/javelinjs/src/docs/@', $path); 81 + return preg_match('@/__tests__/|externals/javelin/docs/@', $path); 82 82 } 83 83 84 84 public function lintPath($path) { ··· 167 167 continue; 168 168 } 169 169 170 - $symbol_path = 'webroot'.$symbol_info['disk']; 171 - list($ignored, $req_install) = $this->getUsedAndInstalledSymbolsForPath( 172 - $symbol_path); 173 - if (array_intersect_key($req_install, $external_classes)) { 174 - $need = array_diff_key($need, $req_install); 170 + if (preg_match('/\\.css$/', $symbol_info['disk'])) { 171 + // If JS requires CSS, just assume everything is fine. 175 172 unset($requires[$key]); 173 + } else { 174 + $symbol_path = 'webroot'.$symbol_info['disk']; 175 + list($ignored, $req_install) = $this->getUsedAndInstalledSymbolsForPath( 176 + $symbol_path); 177 + if (array_intersect_key($req_install, $external_classes)) { 178 + $need = array_diff_key($need, $req_install); 179 + unset($requires[$key]); 180 + } 176 181 } 177 182 } 178 183
+7 -7
support/aphlict/server/aphlict_server.js
··· 35 35 return config; 36 36 } 37 37 38 - if (process.getuid() != 0) { 38 + if (process.getuid() !== 0) { 39 39 console.log( 40 40 "ERROR: "+ 41 41 "This server must be run as root because it needs to bind to privileged "+ ··· 118 118 // you want to write something pretty be my guest 119 119 120 120 function generate_id() { 121 - if (typeof generate_id.current_id == 'undefined' 122 - || generate_id.current_id > MAX_ID) { 121 + if (typeof generate_id.current_id == 'undefined' || 122 + generate_id.current_id > MAX_ID) { 123 123 generate_id.current_id = 0; 124 124 } 125 125 return generate_id.current_id++; ··· 132 132 socket.on('connect', function() { 133 133 clients[client_id] = socket; 134 134 current_connections++; 135 - log(client_name + 'connected\t\t(' 136 - + current_connections + ' current connections)'); 135 + log(client_name + 'connected\t\t(' + 136 + current_connections + ' current connections)'); 137 137 }); 138 138 139 139 socket.on('close', function() { 140 140 delete clients[client_id]; 141 141 current_connections--; 142 - log(client_name + 'closed\t\t(' 143 - + current_connections + ' current connections)'); 142 + log(client_name + 'closed\t\t(' + 143 + current_connections + ' current connections)'); 144 144 }); 145 145 146 146 socket.on('timeout', function() {
+5
support/jshint/jshintconfig
··· 1 + { 2 + "expr" : true, 3 + "loopfunc" : true, 4 + "sub" : true 5 + }
+1 -1
webroot/rsrc/externals/javelin/core/Event.js
··· 337 337 JX.Event.prototype.toString = function() { 338 338 var path = '['+this.getPath().join(', ')+']'; 339 339 return 'Event<'+this.getType()+', '+path+', '+this.getTarget()+'>'; 340 - } 340 + }; 341 341 } 342 342 } 343 343 });
+9 -7
webroot/rsrc/externals/javelin/core/init.js
··· 32 32 return; 33 33 } 34 34 holding_queues[name] = []; 35 - JX[name] = function() { holding_queues[name].push(arguments); } 35 + JX[name] = function() { holding_queues[name].push(arguments); }; 36 36 } 37 37 38 38 JX.flushHoldingQueue = function(name, fn) { ··· 40 40 fn.apply(null, holding_queues[name][ii]); 41 41 } 42 42 holding_queues[name] = {}; 43 - } 43 + }; 44 44 45 45 makeHoldingQueue('install'); 46 46 makeHoldingQueue('behavior'); ··· 107 107 return false; 108 108 } 109 109 } 110 - } 110 + }; 111 111 112 112 JX.enableDispatch = function(target, type) { 113 113 if (__DEV__) { ··· 165 165 } 166 166 } 167 167 168 - for (var ii = 0; ii < document_events.length; ++ii) { 168 + var ii; 169 + for (ii = 0; ii < document_events.length; ++ii) { 169 170 JX.enableDispatch(root, document_events[ii]); 170 171 } 171 172 ··· 182 183 ]; 183 184 184 185 185 - for (var ii = 0; ii < window_events.length; ++ii) { 186 + for (ii = 0; ii < window_events.length; ++ii) { 186 187 JX.enableDispatch(window, window_events[ii]); 187 188 } 188 189 ··· 212 213 '<script' + 213 214 ' defer="defer"' + 214 215 ' onreadystatechange="' + ready + '"' + 215 - '><\/sc' + 'ript\>'); 216 + '><\/sc' + 'ript' + '>'); 216 217 } 217 218 218 219 JX.onload = function(func) { ··· 221 222 } else { 222 223 onload.push(func); 223 224 } 224 - } 225 + }; 226 + 225 227 })();
+3 -3
webroot/rsrc/externals/javelin/core/util.js
··· 247 247 248 248 return function() { 249 249 return func.apply(context || window, bound.concat(JX.$A(arguments))); 250 - } 250 + }; 251 251 }; 252 252 253 253 ··· 320 320 */ 321 321 JX.log = function(message) { 322 322 window.console.log(message); 323 - } 323 + }; 324 324 325 325 window.alert = (function(native_alert) { 326 326 var recent_alerts = []; ··· 349 349 native_alert(msg); 350 350 } 351 351 in_alert = false; 352 - } 352 + }; 353 353 })(window.alert); 354 354 } 355 355
+1
webroot/rsrc/externals/javelin/ext/reactor/dom/RDOM.js
··· 3 3 * @provides javelin-reactor-dom 4 4 * @requires javelin-dom 5 5 * javelin-dynval 6 + * javelin-reactor 6 7 * javelin-reactornode 7 8 * javelin-install 8 9 * javelin-util
+4 -2
webroot/rsrc/externals/javelin/ext/view/HTMLView.js
··· 5 5 * 6 6 * @provides javelin-view-html 7 7 * @requires javelin-install 8 - * javelin-view 8 + * javelin-dom 9 + * javelin-view-visitor 10 + * javelin-util 9 11 */ 10 12 11 13 JX.install('HTMLView', { ··· 26 28 27 29 validate: function(view, children) { 28 30 var spec = this._getHTMLSpec(); 29 - if (!view.getName() in spec) { 31 + if (!(view.getName() in spec)) { 30 32 throw new Error("invalid tag"); 31 33 } 32 34
+7 -4
webroot/rsrc/externals/javelin/ext/view/View.js
··· 82 82 var result = []; 83 83 var should_repack = false; 84 84 85 - for(var ii = 0; ii < this._childKeys.length; ii++) { 86 - var key = this._childKeys[ii]; 85 + var ii; 86 + var key; 87 + 88 + for (ii = 0; ii < this._childKeys.length; ii++) { 89 + key = this._childKeys[ii]; 87 90 if (this._rawChildren[key] === undefined) { 88 91 should_repack = true; 89 92 } else { ··· 93 96 94 97 if (should_repack) { 95 98 var new_child_keys = []; 96 - for(var ii = 0; ii < this._childKeys.length; ii++) { 97 - var key = this._childKeys[ii]; 99 + for (ii = 0; ii < this._childKeys.length; ii++) { 100 + key = this._childKeys[ii]; 98 101 if (this._rawChildren[key] !== undefined) { 99 102 new_child_keys.push(key); 100 103 }
+2 -2
webroot/rsrc/externals/javelin/ext/view/ViewInterpreter.js
··· 42 42 * @provides javelin-view-interpreter 43 43 * @requires javelin-view 44 44 * javelin-install 45 - * 45 + * javelin-dom 46 46 */ 47 47 48 48 JX.install('ViewInterpreter', { ··· 65 65 result.addChildren(children); 66 66 67 67 return result; 68 - } 68 + }; 69 69 } 70 70 } 71 71 });
+4 -2
webroot/rsrc/externals/javelin/ext/view/ViewPlaceholder.js
··· 48 48 * @requires javelin-behavior 49 49 * javelin-dom 50 50 * javelin-view-renderer 51 + * javelin-install 51 52 */ 52 53 53 54 ··· 72 73 statics: { 73 74 register: function(wait_on_token, token, cb) { 74 75 var ready_q = []; 76 + var waiting; 75 77 76 78 if (!wait_on_token || wait_on_token in JX.ViewPlaceholder.ready) { 77 79 ready_q.push({token: token, cb: cb}); 78 80 } else { 79 - var waiting = JX.ViewPlaceholder.waiting; 81 + waiting = JX.ViewPlaceholder.waiting; 80 82 waiting[wait_on_token] = waiting[wait_on_token] || []; 81 83 waiting[wait_on_token].push({token: token, cb: cb}); 82 84 } ··· 84 86 while(ready_q.length) { 85 87 var ready = ready_q.shift(); 86 88 87 - var waiting = JX.ViewPlaceholder.waiting[ready.token]; 89 + waiting = JX.ViewPlaceholder.waiting[ready.token]; 88 90 if (waiting) { 89 91 for (var ii = 0; ii < waiting.length; ii++) { 90 92 ready_q.push(waiting[ii]);
+1
webroot/rsrc/externals/javelin/ext/view/ViewRenderer.js
··· 1 1 /** 2 2 * @provides javelin-view-renderer 3 3 * @requires javelin-install 4 + * javelin-util 4 5 */ 5 6 6 7 JX.install('ViewRenderer', {
+2 -2
webroot/rsrc/externals/javelin/ext/view/__tests__/ViewRenderer.js
··· 13 13 parent.addChild(child); 14 14 child.render = function(_) { 15 15 child_rendered = true; 16 - } 16 + }; 17 17 18 18 parent.render = function(rendered_children) { 19 19 child_rendered_first = child_rendered; 20 - } 20 + }; 21 21 22 22 JX.ViewRenderer.render(parent); 23 23 expect(child_rendered_first).toBe(true);
+10 -6
webroot/rsrc/externals/javelin/lib/DOM.js
··· 102 102 var tags = ['legend', 'thead', 'tbody', 'tfoot', 'column', 'colgroup', 103 103 'caption', 'tr', 'th', 'td', 'option']; 104 104 var evil_stuff = new RegExp('^\\s*<(' + tags.join('|') + ')\\b', 'i'); 105 - var match = null; 106 - if (match = str.match(evil_stuff)) { 105 + var match = str.match(evil_stuff); 106 + if (match) { 107 107 JX.$E( 108 108 'new JX.HTML("<' + match[1] + '>..."): ' + 109 109 'call initializes an HTML object with an invalid partial fragment ' + ··· 725 725 * @return void 726 726 */ 727 727 show : function() { 728 + var ii; 729 + 728 730 if (__DEV__) { 729 - for (var ii = 0; ii < arguments.length; ++ii) { 731 + for (ii = 0; ii < arguments.length; ++ii) { 730 732 if (!arguments[ii]) { 731 733 JX.$E( 732 734 'JX.DOM.show(...): ' + ··· 735 737 } 736 738 } 737 739 738 - for (var ii = 0; ii < arguments.length; ++ii) { 740 + for (ii = 0; ii < arguments.length; ++ii) { 739 741 arguments[ii].style.display = ''; 740 742 } 741 743 }, ··· 750 752 * @return void 751 753 */ 752 754 hide : function() { 755 + var ii; 756 + 753 757 if (__DEV__) { 754 - for (var ii = 0; ii < arguments.length; ++ii) { 758 + for (ii = 0; ii < arguments.length; ++ii) { 755 759 if (!arguments[ii]) { 756 760 JX.$E( 757 761 'JX.DOM.hide(...): ' + ··· 760 764 } 761 765 } 762 766 763 - for (var ii = 0; ii < arguments.length; ++ii) { 767 + for (ii = 0; ii < arguments.length; ++ii) { 764 768 arguments[ii].style.display = 'none'; 765 769 } 766 770 },
+1 -1
webroot/rsrc/externals/javelin/lib/Mask.js
··· 71 71 document.body.appendChild(self._mask); 72 72 } 73 73 74 - self._adjustType(mask_type) 74 + self._adjustType(mask_type); 75 75 JX.Mask._stack.push(mask_type); 76 76 }, 77 77
+2 -2
webroot/rsrc/externals/javelin/lib/Request.js
··· 201 201 'JX.Request("'+this.getURI()+'", ...): '+ 202 202 'server returned an empty response.'); 203 203 } 204 - if (expect_guard && xport.responseText.indexOf('for (;;);') != 0) { 204 + if (expect_guard && xport.responseText.indexOf('for (;;);') !== 0) { 205 205 JX.$E( 206 206 'JX.Request("'+this.getURI()+'", ...): '+ 207 207 'server returned an invalid response.'); ··· 405 405 recurse(obj, ii); 406 406 } 407 407 } else if (obj && typeof obj == 'object') { 408 - if (obj.__html != null) { 408 + if (('__html' in obj) && (obj.__html !== null)) { 409 409 parent[index] = JX.$H(obj.__html); 410 410 } else { 411 411 for (var key in obj) {
+2 -3
webroot/rsrc/externals/javelin/lib/Resource.js
··· 1 1 /** 2 2 * @provides javelin-resource 3 - * @requires javelin-magical-init 4 - * javelin-stratcom 5 - * javelin-util 3 + * @requires javelin-util 6 4 * javelin-uri 5 + * javelin-install 7 6 * 8 7 * @javelin 9 8 */
+1 -1
webroot/rsrc/externals/javelin/lib/URI.js
··· 54 54 _defaultQuerySerializer : function(obj) { 55 55 var kv_pairs = []; 56 56 for (var key in obj) { 57 - if (obj[key] != null) { 57 + if (obj[key] !== null) { 58 58 var value = encodeURIComponent(obj[key]); 59 59 kv_pairs.push(encodeURIComponent(key) + (value ? '=' + value : '')); 60 60 }
+2 -6
webroot/rsrc/externals/javelin/lib/Vector.js
··· 164 164 */ 165 165 setDim : function(node) { 166 166 node.style.width = 167 - (this.x === null) 168 - ? '' 169 - : (parseInt(this.x, 10) + 'px'); 167 + (this.x === null) ? '' : (parseInt(this.x, 10) + 'px'); 170 168 node.style.height = 171 - (this.y === null) 172 - ? '' 173 - : (parseInt(this.y, 10) + 'px'); 169 + (this.y === null) ? '' : (parseInt(this.y, 10) + 'px'); 174 170 return this; 175 171 }, 176 172
+1 -1
webroot/rsrc/externals/javelin/lib/Workflow.js
··· 282 282 283 283 JX.Workflow._pop(); 284 284 e.prevent(); 285 - }; 285 + } 286 286 287 287 JX.Stratcom.listen('keydown', null, close_dialog_when_user_presses_escape); 288 288 }
+1 -1
webroot/rsrc/externals/javelin/lib/__tests__/URI.js
··· 262 262 expect(uri.toString()).toEqual('/?clown=town'); 263 263 }); 264 264 265 - it('can remove non existant query data', function() { 265 + it('can remove non existent query data', function() { 266 266 var uri = JX.$U('/?key=value'); 267 267 uri.addQueryParams({'magic' : null}); 268 268 expect(uri.getQueryParams()).toEqual({
+1
webroot/rsrc/externals/javelin/lib/behavior.js
··· 1 1 /** 2 2 * @provides javelin-behavior 3 3 * @requires javelin-magical-init 4 + * javelin-util 4 5 * 5 6 * @javelin-installs JX.behavior 6 7 * @javelin-installs JX.initBehaviors
+1 -1
webroot/rsrc/externals/javelin/lib/control/tokenizer/Tokenizer.js
··· 345 345 case 'delete': 346 346 if (!this._focus.value.length) { 347 347 var tok; 348 - while (tok = this._tokens.pop()) { 348 + while ((tok = this._tokens.pop())) { 349 349 if (this._remove(tok, true)) { 350 350 break; 351 351 }
-1
webroot/rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadOnDemandSource.js
··· 1 1 /** 2 2 * @requires javelin-install 3 3 * javelin-util 4 - * javelin-stratcom 5 4 * javelin-request 6 5 * javelin-typeahead-source 7 6 * @provides javelin-typeahead-ondemand-source
-1
webroot/rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadPreloadedSource.js
··· 1 1 /** 2 2 * @requires javelin-install 3 3 * javelin-util 4 - * javelin-stratcom 5 4 * javelin-request 6 5 * javelin-typeahead-source 7 6 * @provides javelin-typeahead-preloaded-source
+3 -2
webroot/rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadSource.js
··· 282 282 283 283 sortHits : function(value, hits) { 284 284 var objs = []; 285 - for (var ii = 0; ii < hits.length; ii++) { 285 + var ii; 286 + for (ii = 0; ii < hits.length; ii++) { 286 287 objs.push(this._raw[hits[ii]]); 287 288 } 288 289 ··· 299 300 handler(value, objs, default_comparator); 300 301 301 302 hits.splice(0, hits.length); 302 - for (var ii = 0; ii < objs.length; ii++) { 303 + for (ii = 0; ii < objs.length; ii++) { 303 304 hits.push(objs[ii].id); 304 305 } 305 306 },
+1
webroot/rsrc/externals/raphael/g.raphael.js
··· 1 1 /** 2 2 * @provides raphael-g 3 3 * @do-not-minify 4 + * @nolint 4 5 */ 5 6 /*! 6 7 * g.Raphael 0.5 - Charting library, based on Raphaël
+1
webroot/rsrc/externals/raphael/g.raphael.line.js
··· 1 1 /** 2 2 * @provides raphael-g-line 3 3 * @do-not-minify 4 + * @nolint 4 5 */ 5 6 /*! 6 7 * g.Raphael 0.5 - Charting library, based on Raphaël
+1
webroot/rsrc/externals/raphael/raphael.js
··· 1 1 /** 2 2 * @provides raphael-core 3 3 * @do-not-minify 4 + * @nolint 4 5 */ 5 6 // ┌─────────────────────────────────────────────────────────────────────┐ \\ 6 7 // │ Raphaël 2.0.1 - JavaScript Vector Library │ \\
+3 -5
webroot/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js
··· 29 29 return; 30 30 } 31 31 request = new JX.Request('/notification/panel/', function(response) { 32 - var display = (response.number > 999) 33 - ? "\u221E" 34 - : response.number; 32 + var display = (response.number > 999) ? "\u221E" : response.number; 35 33 36 34 JX.DOM.setContent(count, display); 37 - if (response.number == 0) { 35 + if (response.number === 0) { 38 36 JX.DOM.alterClass(bubble, 'alert-unread', false); 39 37 } else { 40 38 JX.DOM.alterClass(bubble, 'alert-unread', true); ··· 102 100 visible = !visible; 103 101 e.kill(); 104 102 } 105 - ) 103 + ); 106 104 107 105 JX.Stratcom.listen('notification-panel-update', null, function() { 108 106 dirty = true;
+9 -11
webroot/rsrc/js/application/aphlict/behavior-aphlict-listen.js
··· 29 29 .send(); 30 30 } else if (__DEV__) { 31 31 if (config.debug) { 32 - var details = message 33 - ? JX.JSON.stringify(message) 34 - : ''; 32 + var details = message ? JX.JSON.stringify(message) : ''; 35 33 36 34 new JX.Notification() 37 35 .setContent('(Aphlict) [' + type + '] ' + details) ··· 65 63 .setContent('Page updated, click to reload.') 66 64 .alterClassName('jx-notification-alert', true) 67 65 .setDuration(0); 68 - reload.listen('activate', function(e) { JX.$U().go(); }) 66 + reload.listen('activate', function(e) { JX.$U().go(); }); 69 67 reload.show(); 70 68 71 69 showing_reload = true; ··· 80 78 81 79 // Add Flash object to page 82 80 JX.$(config.containerID).innerHTML = 83 - '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">' 84 - + '<param name="movie" value="/rsrc/swf/aphlict.swf" />' 85 - + '<param name="allowScriptAccess" value="always" />' 86 - + '<param name="wmode" value="opaque" />' 87 - + '<embed src="/rsrc/swf/aphlict.swf" wmode="opaque"' 88 - + 'width="0" height="0" id="' + config.id + '">' 89 - + '</embed></object>'; //Evan sanctioned 81 + '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">' + 82 + '<param name="movie" value="/rsrc/swf/aphlict.swf" />' + 83 + '<param name="allowScriptAccess" value="always" />' + 84 + '<param name="wmode" value="opaque" />' + 85 + '<embed src="/rsrc/swf/aphlict.swf" wmode="opaque"' + 86 + 'width="0" height="0" id="' + config.id + '">' + 87 + '</embed></object>'; //Evan sanctioned 90 88 });
+13 -9
webroot/rsrc/js/application/conpherence/behavior-widget-pane.js
··· 21 21 22 22 var root = JX.DOM.find(document, 'div', 'conpherence-layout'); 23 23 var widgetPane = JX.DOM.find(root, 'div', 'conpherence-widget-pane'); 24 + var i; 25 + var tag_data; 26 + var node; 27 + 24 28 for (var widget in config.widgetRegistery) { 25 29 // device-only widgets are *always shown* on the desktop 26 30 if (config.widgetRegistery[widget] == config.devicesOnly) { 27 31 if (is_desktop) { 28 32 JX.$(widget).style.display = 'block'; 29 33 if (config.widgetExtraNodes[widget]) { 30 - for (var i in config.widgetExtraNodes[widget]) { 31 - var tag_data = config.widgetExtraNodes[widget][i]; 32 - var node = JX.DOM.find(root, tag_data.tagname, tag_data.sigil); 34 + for (i in config.widgetExtraNodes[widget]) { 35 + tag_data = config.widgetExtraNodes[widget][i]; 36 + node = JX.DOM.find(root, tag_data.tagname, tag_data.sigil); 33 37 node.style.display = tag_data.desktopstyle; 34 38 } 35 39 } ··· 48 52 widgetPane.style.height = '100%'; 49 53 } 50 54 if (config.widgetExtraNodes[widget]) { 51 - for (var i in config.widgetExtraNodes[widget]) { 52 - var tag_data = config.widgetExtraNodes[widget][i]; 53 - var node = JX.DOM.find(root, tag_data.tagname, tag_data.sigil); 55 + for (i in config.widgetExtraNodes[widget]) { 56 + tag_data = config.widgetExtraNodes[widget][i]; 57 + node = JX.DOM.find(root, tag_data.tagname, tag_data.sigil); 54 58 node.style.display = tag_data.showstyle; 55 59 } 56 60 } ··· 75 79 ); 76 80 JX.$(widget).style.display = 'none'; 77 81 if (config.widgetExtraNodes[widget]) { 78 - for (var i in config.widgetExtraNodes[widget]) { 79 - var tag_data = config.widgetExtraNodes[widget][i]; 80 - var node = JX.DOM.find(root, tag_data.tagname, tag_data.sigil); 82 + for (i in config.widgetExtraNodes[widget]) { 83 + tag_data = config.widgetExtraNodes[widget][i]; 84 + node = JX.DOM.find(root, tag_data.tagname, tag_data.sigil); 81 85 node.style.display = tag_data.hidestyle; 82 86 } 83 87 }
-1
webroot/rsrc/js/application/countdown/timer.js
··· 2 2 * @provides javelin-behavior-countdown-timer 3 3 * @requires javelin-behavior 4 4 * javelin-dom 5 - * javelin-util 6 5 */ 7 6 8 7 JX.behavior('countdown-timer', function(config) {
+5 -5
webroot/rsrc/js/application/differential/DifferentialInlineCommentEditor.js
··· 162 162 return; 163 163 } 164 164 165 + var textarea; 165 166 try { 166 - var textarea = JX.DOM.find( 167 + textarea = JX.DOM.find( 167 168 document.body, // TODO: use getDialogRootNode() when available 168 169 'textarea', 169 170 'differential-inline-comment-edit-textarea'); ··· 180 181 181 182 // If the user hasn't edited the text (i.e., no change from original for 182 183 // 'edit' or no text at all), don't offer them an undo. 183 - if (text == this.getOriginalText() || text == '') { 184 + if (text == this.getOriginalText() || text === '') { 184 185 return; 185 186 } 186 187 187 188 // Save the text so we can 'undo' back to it. 188 189 this._undoText = text; 189 190 190 - var template = this.getOnRight() 191 - ? this.getTemplates().r 192 - : this.getTemplates().l; 191 + var templates = this.getTemplates(); 192 + var template = this.getOnRight() ? templates.r : templates.l; 193 193 template = JX.$N('div', JX.$H(template)); 194 194 195 195 // NOTE: Operation order matters here; we can't remove anything until
+2 -2
webroot/rsrc/js/application/differential/behavior-comment-jump.js
··· 1 1 /** 2 2 * @provides javelin-behavior-differential-comment-jump 3 3 * @requires javelin-behavior 4 - * javelin-util 4 + * javelin-stratcom 5 5 * javelin-dom 6 6 */ 7 7 ··· 20 20 } 21 21 } 22 22 JX.Stratcom.invoke('differential-toggle-file-request', null, { 23 - element: jumpto, 23 + element: jumpto 24 24 }); 25 25 JX.DOM.scrollTo(jumpto); 26 26 e.kill();
+3 -2
webroot/rsrc/js/application/differential/behavior-comment-preview.js
··· 13 13 var action = JX.$(config.action); 14 14 var content = JX.$(config.content); 15 15 var previewTokenizers = {}; 16 - for (var field in config.previewTokenizers) { 16 + var field; 17 + for (field in config.previewTokenizers) { 17 18 var tokenizer = JX.$(config.previewTokenizers[field]); 18 19 previewTokenizers[field] = JX.Stratcom.getData(tokenizer).tokenizer; 19 20 } ··· 46 47 47 48 JX.DOM.listen(content, 'keydown', null, trigger); 48 49 JX.DOM.listen(action, 'change', null, trigger); 49 - for (var field in previewTokenizers) { 50 + for (field in previewTokenizers) { 50 51 previewTokenizers[field].listen('change', trigger); 51 52 } 52 53
+1 -1
webroot/rsrc/js/application/differential/behavior-dropdown-menus.js
··· 57 57 58 58 var visible_item = new JX.PhabricatorMenuItem('', function () { 59 59 JX.Stratcom.invoke('differential-toggle-file', null, { 60 - diff: JX.DOM.scry(JX.$(data.containerID), 'table', 'differential-diff'), 60 + diff: JX.DOM.scry(JX.$(data.containerID), 'table', 'differential-diff') 61 61 }); 62 62 }); 63 63 menu.addItem(visible_item);
+2 -2
webroot/rsrc/js/application/differential/behavior-edit-inline-comments.js
··· 197 197 198 198 var node = e.getNode('differential-inline-comment'); 199 199 handle_inline_action(node, op); 200 - } 200 + }; 201 201 202 202 var handle_inline_action = function(node, op) { 203 203 var data = JX.Stratcom.getData(node); ··· 243 243 .start(); 244 244 245 245 set_link_state(true); 246 - } 246 + }; 247 247 248 248 for (var op in {'edit' : 1, 'delete' : 1, 'reply' : 1}) { 249 249 JX.Stratcom.listen(
+5 -2
webroot/rsrc/js/application/differential/behavior-keyboard-nav.js
··· 130 130 selection_end = blocks[focus][1]; 131 131 132 132 manager.scrollTo(selection_begin); 133 - (refreshFocus = function() { 133 + 134 + refreshFocus = function() { 134 135 manager.focusOn(selection_begin, selection_end); 135 - })(); 136 + }; 137 + 138 + refreshFocus(); 136 139 137 140 return; 138 141 } else {
+1 -1
webroot/rsrc/js/application/differential/behavior-populate.js
··· 97 97 var diff; 98 98 try { 99 99 diff = JX.$(meta.id); 100 - } catch (e) { 100 + } catch (ex) { 101 101 // Already loaded. 102 102 } 103 103 if (diff) {
+1 -1
webroot/rsrc/js/application/differential/behavior-show-all-comments.js
··· 42 42 try { 43 43 var target = JX.$(window.location.hash.replace(/^#/, '')); 44 44 window.scrollTo(0, target.offsetTop); 45 - } catch (e) { 45 + } catch (ex) { 46 46 } 47 47 } 48 48 });
+1 -1
webroot/rsrc/js/application/diffusion/behavior-audit-preview.js
··· 21 21 action: action.value, 22 22 content: content.value 23 23 }; 24 - } 24 + }; 25 25 26 26 var request = new JX.PhabricatorShapedRequest(config.uri, callback, getdata); 27 27 var trigger = JX.bind(request, request.trigger);
+18 -12
webroot/rsrc/js/application/diffusion/behavior-commit-graph.js
··· 20 20 '#00cccc', 21 21 '#00cc33', 22 22 '#66cc00', 23 - '#cc9900', 23 + '#cc9900' 24 24 ]; 25 25 return colors[c % colors.length]; 26 26 } ··· 48 48 var data = JX.Stratcom.getData(nodes[ii]); 49 49 50 50 var cell = 12; // Width of each thread. 51 - function xpos(col) { 51 + var xpos = function(col) { 52 52 return (col * cell) + (cell / 2); 53 - } 53 + }; 54 54 55 55 var h = 26; 56 56 var w = cell * config.count; ··· 71 71 // a parent). We use this to figure out where to draw the join/split lines. 72 72 73 73 var origin = null; 74 - for (var jj = 0; jj < data.line.length; jj++) { 75 - var c = data.line.charAt(jj); 74 + var jj; 75 + var x; 76 + var c; 77 + for (jj = 0; jj < data.line.length; jj++) { 78 + c = data.line.charAt(jj); 76 79 switch (c) { 77 80 case 'o': 78 81 case '^': ··· 84 87 // Draw all the join lines. These start at some column at the top of the 85 88 // canvas and join the commit's column. They indicate branching. 86 89 87 - for (var jj = 0; jj < data.join.length; jj++) { 90 + for (jj = 0; jj < data.join.length; jj++) { 88 91 var join = data.join[jj]; 89 - var x = xpos(join); 92 + x = xpos(join); 90 93 cxt.beginPath(); 91 94 cxt.moveTo(x, 0); 92 95 cxt.bezierCurveTo(x, h/4, origin, h/4, origin, h/2); ··· 96 99 // Draw all the split lines. These start at the commit and end at some 97 100 // column on the bottom of the canvas. They indicate merging. 98 101 99 - for (var jj = 0; jj < data.split.length; jj++) { 102 + for (jj = 0; jj < data.split.length; jj++) { 100 103 var split = data.split[jj]; 101 - var x = xpos(split); 104 + x = xpos(split); 102 105 cxt.beginPath(); 103 106 cxt.moveTo(origin, h/2); 104 107 cxt.bezierCurveTo(origin, 3*h/4, x, 3*h/4, x, h); ··· 108 111 // Draw the vertical lines (a branch with no activity at this commit) and 109 112 // the commit circles. 110 113 111 - for (var jj = 0; jj < data.line.length; jj++) { 112 - var c = data.line.charAt(jj); 114 + for (jj = 0; jj < data.line.length; jj++) { 115 + c = data.line.charAt(jj); 113 116 switch (c) { 114 117 case 'o': 115 118 case '^': 116 - origin = xpos(jj); 117 119 case '|': 120 + if (c == 'o' || c == '^') { 121 + origin = xpos(jj); 122 + } 123 + 118 124 cxt.beginPath(); 119 125 cxt.moveTo(xpos(jj), (c == '^' ? h/2 : 0)); 120 126 cxt.lineTo(xpos(jj), h);
-1
webroot/rsrc/js/application/diffusion/behavior-jump-to.js
··· 1 1 /** 2 2 * @provides javelin-behavior-diffusion-jump-to 3 3 * @requires javelin-behavior 4 - * javelin-util 5 4 * javelin-vector 6 5 * javelin-dom 7 6 */
+1 -1
webroot/rsrc/js/application/maniphest/behavior-batch-editor.js
··· 79 79 vfunc = function() { return status_select.value; }; 80 80 break; 81 81 } 82 - }; 82 + } 83 83 84 84 JX.DOM.listen(action_select, 'change', null, update); 85 85 update();
+6 -6
webroot/rsrc/js/application/maniphest/behavior-batch-selector.js
··· 14 14 15 15 var get_id = function(task) { 16 16 return JX.Stratcom.getData(task).taskID; 17 - } 17 + }; 18 18 19 19 var is_selected = function(task) { 20 20 return (get_id(task) in selected); 21 - } 21 + }; 22 22 23 23 // Change the selected state of a task. 24 24 ··· 50 50 for (var ii = 0; ii < inputs.length; ii++) { 51 51 change(inputs[ii], to); 52 52 } 53 - } 53 + }; 54 54 55 55 // Clear any document text selection after toggling a task via shift click, 56 56 // since errant clicks tend to start selecting various ranges otherwise. ··· 65 65 } else if (document.selection) { 66 66 document.selection.empty(); 67 67 } 68 - } 68 + }; 69 69 70 70 // Update the status text showing how many tasks are selected, and the button 71 71 // state. ··· 73 73 var update = function() { 74 74 var count = JX.keys(selected).length; 75 75 var status; 76 - if (count == 0) { 76 + if (count === 0) { 77 77 status = 'Shift-Click to Select Tasks'; 78 78 } else if (status == 1) { 79 79 status = '1 Selected Task'; ··· 83 83 JX.DOM.setContent(JX.$(config.status), status); 84 84 85 85 var submit = JX.$(config.submit); 86 - var disable = (count == 0); 86 + var disable = (count === 0); 87 87 submit.disabled = disable; 88 88 JX.DOM.alterClass(submit, 'disabled', disable); 89 89 };
+1 -1
webroot/rsrc/js/application/maniphest/behavior-task-preview.js
··· 19 19 return { 20 20 description : textarea.value 21 21 }; 22 - } 22 + }; 23 23 24 24 var request = new JX.PhabricatorShapedRequest(config.uri, callback, getdata); 25 25 var trigger = JX.bind(request, request.trigger);
+1 -1
webroot/rsrc/js/application/maniphest/behavior-transaction-controls.js
··· 12 12 for (var k in config.tokenizers) { 13 13 var tconfig = config.tokenizers[k]; 14 14 tokenizers[k] = JX.Prefab.buildTokenizer(tconfig).tokenizer; 15 - tokenizers[k].start() 15 + tokenizers[k].start(); 16 16 } 17 17 18 18 JX.DOM.listen(
+1 -1
webroot/rsrc/js/application/maniphest/behavior-transaction-preview.js
··· 48 48 action : selected, 49 49 value : value || '' 50 50 }; 51 - } 51 + }; 52 52 53 53 var request = new JX.PhabricatorShapedRequest(config.uri, callback, getdata); 54 54 var trigger = JX.bind(request, request.trigger);
+6 -6
webroot/rsrc/js/application/phame/phame-post-preview.js
··· 18 18 if (!sync_titles) { 19 19 return; 20 20 } 21 - var title_string = new String(title.value); 21 + var title_string = title.value; 22 22 phame_title.value = normalizeSlug(title_string); 23 - } 23 + }; 24 24 25 25 var phameTitleKeyupCallback = function (e) { 26 26 // stop sync'ing once user edits phame_title directly ··· 38 38 phame_title.focus(); 39 39 phame_title.setSelectionRange(position, position); 40 40 } 41 - } 41 + }; 42 42 43 43 var phameTitleBlurCallback = function (e) { 44 44 phame_title.value = normalizeSlug(phame_title.value); 45 - } 45 + }; 46 46 47 47 // This is a sort of implementation of PhabricatorSlug::normalize 48 48 var normalizeSlug = function (slug, spare_trailing_underscore) { ··· 53 53 s = s.replace(/_$/g, ''); 54 54 } 55 55 return s; 56 - } 56 + }; 57 57 58 58 var callback = function(r) { 59 59 JX.DOM.setContent(JX.$(config.preview), JX.$H(r)); ··· 65 65 title : title.value, 66 66 phame_title : phame_title.value 67 67 }; 68 - } 68 + }; 69 69 70 70 var request = new JX.PhabricatorShapedRequest(config.uri, callback, getdata); 71 71 var trigger = JX.bind(request, request.trigger);
+10 -8
webroot/rsrc/js/application/pholio/behavior-pholio-mock-view.js
··· 76 76 } 77 77 78 78 function clear_stage() { 79 - for (var ii = 0; ii < reticles.length; ii++) { 79 + var ii; 80 + for (ii = 0; ii < reticles.length; ii++) { 80 81 JX.DOM.remove(reticles[ii]); 81 82 } 82 - for (var ii = 0; ii < cards.length; ii++) { 83 + for (ii = 0; ii < cards.length; ii++) { 83 84 JX.DOM.remove(cards[ii]); 84 85 } 85 86 reticles = []; ··· 160 161 if (!active_image) { 161 162 return; 162 163 } 163 - var idx = get_image_index(active_image.id) 164 + var idx = get_image_index(active_image.id); 164 165 idx = (idx + delta + config.images.length) % config.images.length; 165 166 select_image(config.images[idx].id); 166 167 } ··· 324 325 ).setPos(dialog); 325 326 326 327 JX.DOM.focus(JX.DOM.find(dialog, 'textarea')); 327 - } 328 + }; 328 329 329 330 new JX.Workflow('/pholio/inline/save/', data) 330 331 .setHandler(handler) ··· 343 344 344 345 var width = end.x - start.x; 345 346 var height = end.y - start.y; 347 + var addon; 346 348 347 349 if (width < min_size) { 348 - var addon = (min_size-width)/2; 350 + addon = (min_size-width)/2; 349 351 350 352 start.x = Math.max(0, start.x - addon); 351 353 end.x = Math.min(active_image.tag.naturalWidth, end.x + addon); 352 354 353 - if (start.x == 0) { 355 + if (start.x === 0) { 354 356 end.x = Math.min(min_size, active_image.tag.naturalWidth); 355 357 } else if (end.x == active_image.tag.naturalWidth) { 356 358 start.x = Math.max(0, active_image.tag.naturalWidth - min_size); ··· 358 360 } 359 361 360 362 if (height < min_size) { 361 - var addon = (min_size-height)/2; 363 + addon = (min_size-height)/2; 362 364 363 365 start.y = Math.max(0, start.y - addon); 364 366 end.y = Math.min(active_image.tag.naturalHeight, end.y + addon); 365 367 366 - if (start.y == 0) { 368 + if (start.y === 0) { 367 369 end.y = Math.min(min_size, active_image.tag.naturalHeight); 368 370 } else if (end.y == active_image.tag.naturalHeight) { 369 371 start.y = Math.max(0, active_image.tag.naturalHeight - min_size);
+1 -1
webroot/rsrc/js/application/phriction/phriction-document-preview.js
··· 19 19 return { 20 20 document : textarea.value 21 21 }; 22 - } 22 + }; 23 23 24 24 var request = new JX.PhabricatorShapedRequest(config.uri, callback, getdata); 25 25 var trigger = JX.bind(request, request.trigger);
+2 -2
webroot/rsrc/js/application/ponder/behavior-votebox.js
··· 28 28 JX.DOM.alterClass(upv, 'ponder-vote-active', (data.vote > 0)); 29 29 30 30 var downv = JX.DOM.find(root, 'a', 'downvote'); 31 - JX.DOM.alterClass(downv, 'ponder-vote-active', (data.vote < 0)) 31 + JX.DOM.alterClass(downv, 'ponder-vote-active', (data.vote < 0)); 32 32 33 33 JX.DOM.setContent( 34 34 JX.DOM.find(root, 'div', 'ponder-vote-count'), ··· 36 36 37 37 new JX.Request(e.getTarget().href, JX.bag) 38 38 .setData({vote: data.vote}) 39 - .send() 39 + .send(); 40 40 } 41 41 42 42 JX.Stratcom.listen(
+4 -5
webroot/rsrc/js/application/releeph/releeph-preview-branch.js
··· 2 2 * @provides javelin-behavior-releeph-preview-branch 3 3 * @requires javelin-behavior 4 4 * javelin-dom 5 - * javelin-stratcom 6 5 * javelin-uri 7 - * javelin-util 6 + * javelin-request 8 7 */ 9 8 10 9 JX.behavior('releeph-preview-branch', function(config) { 11 10 12 11 var uri = JX.$U(config.uri); 13 - for (param_name in config.params.static) { 12 + for (var param_name in config.params.static) { 14 13 var value = config.params.static[param_name]; 15 14 uri.setQueryParam(param_name, value); 16 15 } ··· 20 19 var dynamics = config.params.dynamic; 21 20 22 21 function renderPreview() { 23 - for (param_name in dynamics) { 22 + for (var param_name in dynamics) { 24 23 var node_id = dynamics[param_name]; 25 24 var input = JX.$(node_id); 26 25 uri.setQueryParam(param_name, input.value); ··· 33 32 34 33 renderPreview(); 35 34 36 - for (ii in dynamics) { 35 + for (var ii in dynamics) { 37 36 var node_id = dynamics[ii]; 38 37 var input = JX.$(node_id); 39 38 JX.DOM.listen(
+3 -3
webroot/rsrc/js/application/releeph/releeph-request-state-change.js
··· 3 3 * @requires javelin-behavior 4 4 * javelin-dom 5 5 * javelin-stratcom 6 - * javelin-util 6 + * javelin-request 7 7 * phabricator-keyboard-shortcut 8 8 * phabricator-notification 9 9 */ ··· 45 45 46 46 function keynavMarkup() { 47 47 var headers = getRequestHeaderNodes(); 48 - for (ii in headers) { 49 - JX.DOM.alterClass(headers[ii], 'focus', ii == keynav_cursor); 48 + for (var k in headers) { 49 + JX.DOM.alterClass(headers[k], 'focus', k == keynav_cursor); 50 50 } 51 51 } 52 52
+1 -6
webroot/rsrc/js/application/releeph/releeph-request-typeahead.js
··· 1 1 /** 2 2 * @provides javelin-behavior-releeph-request-typeahead 3 3 * @requires javelin-behavior 4 - * javelin-util 5 4 * javelin-dom 6 5 * javelin-typeahead 7 - * javelin-tokenizer 8 - * javelin-typeahead-preloaded-source 9 6 * javelin-typeahead-ondemand-source 10 7 * javelin-dom 11 - * javelin-stratcom 12 - * javelin-util 13 8 */ 14 9 15 10 JX.behavior('releeph-request-typeahead', function(config) { ··· 48 43 'div', 49 44 { className: 'summary' }, 50 45 summary 51 - ), 46 + ) 52 47 ] 53 48 ); 54 49
+1 -1
webroot/rsrc/js/application/slowvote/behavior-slowvote-embed.js
··· 1 1 /** 2 2 * @provides javelin-behavior-slowvote-embed 3 3 * @requires javelin-behavior 4 - * javelin-util 4 + * javelin-request 5 5 * javelin-stratcom 6 6 * javelin-dom 7 7 */
+1 -1
webroot/rsrc/js/application/transactions/behavior-transaction-comment-form.js
··· 36 36 [ 37 37 JX.$H(response.spacer), 38 38 JX.$H(response.xactions.join(response.spacer)), 39 - JX.$H(response.spacer), 39 + JX.$H(response.spacer) 40 40 ]); 41 41 JX.DOM.show(panel); 42 42 }
-2
webroot/rsrc/js/application/uiexample/JavelinViewExample.js
··· 1 1 /** 2 2 * @provides phabricator-uiexample-javelin-view 3 3 * @requires javelin-install 4 - * javelin-view 5 - * javelin-util 6 4 * javelin-dom 7 5 */ 8 6
+2 -2
webroot/rsrc/js/application/uiexample/ReactorButtonExample.js
··· 1 1 /** 2 2 * @provides phabricator-uiexample-reactor-button 3 3 * @requires javelin-install 4 - * javelin-view 5 - * javelin-util 6 4 * javelin-dom 5 + * javelin-util 6 + * javelin-dynval 7 7 * javelin-reactor-dom 8 8 */ 9 9
-2
webroot/rsrc/js/application/uiexample/ReactorCheckboxExample.js
··· 1 1 /** 2 2 * @provides phabricator-uiexample-reactor-checkbox 3 3 * @requires javelin-install 4 - * javelin-view 5 - * javelin-util 6 4 * javelin-dom 7 5 * javelin-reactor-dom 8 6 */
-2
webroot/rsrc/js/application/uiexample/ReactorFocusExample.js
··· 1 1 /** 2 2 * @provides phabricator-uiexample-reactor-focus 3 3 * @requires javelin-install 4 - * javelin-view 5 - * javelin-util 6 4 * javelin-dom 7 5 * javelin-reactor-dom 8 6 */
-3
webroot/rsrc/js/application/uiexample/ReactorInputExample.js
··· 1 1 /** 2 2 * @provides phabricator-uiexample-reactor-input 3 3 * @requires javelin-install 4 - * javelin-view 5 - * javelin-util 6 - * javelin-dom 7 4 * javelin-reactor-dom 8 5 * javelin-view-html 9 6 * javelin-view-interpreter
-2
webroot/rsrc/js/application/uiexample/ReactorMouseoverExample.js
··· 1 1 /** 2 2 * @provides phabricator-uiexample-reactor-mouseover 3 3 * @requires javelin-install 4 - * javelin-view 5 - * javelin-util 6 4 * javelin-dom 7 5 * javelin-reactor-dom 8 6 */
-2
webroot/rsrc/js/application/uiexample/ReactorRadioExample.js
··· 1 1 /** 2 2 * @provides phabricator-uiexample-reactor-radio 3 3 * @requires javelin-install 4 - * javelin-view 5 - * javelin-util 6 4 * javelin-dom 7 5 * javelin-reactor-dom 8 6 */
+1 -3
webroot/rsrc/js/application/uiexample/ReactorSelectExample.js
··· 1 1 /** 2 2 * @provides phabricator-uiexample-reactor-select 3 3 * @requires javelin-install 4 - * javelin-view 5 - * javelin-util 6 4 * javelin-dom 7 5 * javelin-reactor-dom 8 6 */ ··· 14 12 var select = JX.$N('select', {}, [ 15 13 JX.$N('option', { value: 'goat' }, 'Goat'), 16 14 JX.$N('option', { value: 'bat' }, 'Bat'), 17 - JX.$N('option', { value: 'duck' }, 'Duck'), 15 + JX.$N('option', { value: 'duck' }, 'Duck') 18 16 ]); 19 17 20 18 return [select, JX.RDOM.$DT(JX.RDOM.select(select))];
-2
webroot/rsrc/js/application/uiexample/ReactorSendClassExample.js
··· 1 1 /** 2 2 * @provides phabricator-uiexample-reactor-sendclass 3 3 * @requires javelin-install 4 - * javelin-view 5 - * javelin-util 6 4 * javelin-dom 7 5 * javelin-reactor-dom 8 6 */
-2
webroot/rsrc/js/application/uiexample/ReactorSendPropertiesExample.js
··· 1 1 /** 2 2 * @provides phabricator-uiexample-reactor-sendproperties 3 3 * @requires javelin-install 4 - * javelin-view 5 - * javelin-util 6 4 * javelin-dom 7 5 * javelin-reactor-dom 8 6 */
+6 -4
webroot/rsrc/js/application/uiexample/gesture-example.js
··· 62 62 cxt.fillStyle = '#dfdfdf'; 63 63 cxt.fillRect(0, 0, d.x, d.y); 64 64 65 - for (var ii = 0; ii < strokes.length; ii++) { 66 - var s = strokes[ii]; 65 + var s; 66 + var ii; 67 + for (ii = 0; ii < strokes.length; ii++) { 68 + s = strokes[ii]; 67 69 cxt.strokeStyle = 'rgba(0, 0, 0, 0.50)'; 68 70 cxt.beginPath(); 69 71 cxt.moveTo(s[0], s[1]); ··· 71 73 cxt.stroke(); 72 74 } 73 75 74 - for (var ii = 0; ii < current.length; ii++) { 75 - var s = current[ii]; 76 + for (ii = 0; ii < current.length; ii++) { 77 + s = current[ii]; 76 78 cxt.strokeStyle = 'rgba(255, 0, 0, 1)'; 77 79 cxt.beginPath(); 78 80 cxt.moveTo(s[0], s[1]);
-1
webroot/rsrc/js/application/uiexample/notification-example.js
··· 2 2 * @requires phabricator-notification 3 3 * javelin-stratcom 4 4 * javelin-behavior 5 - * javelin-uri 6 5 * @provides javelin-behavior-phabricator-notification-example 7 6 */ 8 7
+2 -2
webroot/rsrc/js/core/DragAndDropFileUpload.js
··· 41 41 _node : null, 42 42 _depth : 0, 43 43 _updateDepth : function(delta) { 44 - if (this._depth == 0 && delta > 0) { 44 + if (this._depth === 0 && delta > 0) { 45 45 this.invoke('didBeginDrag'); 46 46 } 47 47 48 48 this._depth += delta; 49 49 50 - if (this._depth == 0 && delta < 0) { 50 + if (this._depth === 0 && delta < 0) { 51 51 this.invoke('didEndDrag'); 52 52 } 53 53 },
+4 -3
webroot/rsrc/js/core/FileUpload.js
··· 36 36 .setDuration(0) 37 37 .show(); 38 38 39 + var content; 39 40 switch (this.getStatus()) { 40 41 case 'done': 41 42 var link = JX.$N('a', {href: this.getURI()}, 'F' + this.getID()); 42 43 43 - var content = [ 44 + content = [ 44 45 JX.$N('strong', {}, ['Upload Complete (', link, ')']), 45 46 JX.$N('br'), 46 47 this.getName() ··· 53 54 this._notification = null; 54 55 break; 55 56 case 'error': 56 - var content = [ 57 + content = [ 57 58 JX.$N('strong', {}, 'Upload Failure'), 58 59 JX.$N('br'), 59 60 this.getName(), ··· 89 90 return null; 90 91 } 91 92 var ratio = this.getUploadedBytes() / this.getTotalBytes(); 92 - return parseInt(100 * ratio) + '%'; 93 + return parseInt(100 * ratio, 10) + '%'; 93 94 }, 94 95 _renderFileSize : function() { 95 96 if (!this.getTotalBytes()) {
+3 -3
webroot/rsrc/js/core/Hovercard.js
··· 86 86 // TODO: Fix southern graceful align 87 87 var margin = 20; 88 88 // We can't shift left by ~$margin or more here due to Pholio, Phriction 89 - var x = parseInt(p.x) - margin / 2; 90 - var y = parseInt(p.y - n.y) - margin; 89 + var x = parseInt(p.x, 10) - margin / 2; 90 + var y = parseInt(p.y - n.y, 10) - margin; 91 91 92 92 // If more in the center, we can safely center 93 93 if (x > (n.x / 2) + margin) { 94 - x = parseInt(p.x - (n.x / 2) + d.x); 94 + x = parseInt(p.x - (n.x / 2) + d.x, 10); 95 95 } 96 96 97 97 // Temporarily disabled, since it gives weird results (you can only see
+3 -1
webroot/rsrc/js/core/Prefab.js
··· 46 46 * 47 47 */ 48 48 buildTokenizer : function(config) { 49 + var root; 50 + 49 51 try { 50 - var root = config.root || JX.$(config.id); 52 + root = config.root || JX.$(config.id); 51 53 } catch (ex) { 52 54 // If the root element does not exist, just return without building 53 55 // anything. This happens in some cases -- like Conpherence -- where we
+8 -8
webroot/rsrc/js/core/ToolTip.js
··· 54 54 55 55 switch (align) { 56 56 case 'N': 57 - node.style.left = parseInt(p.x - ((n.x - d.x) / 2)) + 'px'; 58 - node.style.top = parseInt(p.y - n.y) + 'px'; 57 + node.style.left = parseInt(p.x - ((n.x - d.x) / 2), 10) + 'px'; 58 + node.style.top = parseInt(p.y - n.y, 10) + 'px'; 59 59 break; 60 60 case 'E': 61 - node.style.left = parseInt(p.x + d.x) + 'px'; 62 - node.style.top = parseInt(p.y - ((n.y - d.y) / 2)) + 'px'; 61 + node.style.left = parseInt(p.x + d.x, 10) + 'px'; 62 + node.style.top = parseInt(p.y - ((n.y - d.y) / 2), 10) + 'px'; 63 63 break; 64 64 case 'S': 65 - node.style.left = parseInt(p.x - ((n.x - d.x) / 2)) + 'px'; 66 - node.style.top = parseInt(p.y + d.y + 5) + 'px'; 65 + node.style.left = parseInt(p.x - ((n.x - d.x) / 2), 10) + 'px'; 66 + node.style.top = parseInt(p.y + d.y + 5, 10) + 'px'; 67 67 break; 68 68 case 'W': 69 - node.style.left = parseInt(p.x - n.x - 5) + 'px'; 70 - node.style.top = parseInt(p.y - ((n.y - d.y) / 2)) + 'px'; 69 + node.style.left = parseInt(p.x - n.x - 5, 10) + 'px'; 70 + node.style.top = parseInt(p.y - ((n.y - d.y) / 2), 10) + 'px'; 71 71 break; 72 72 } 73 73 },
+6 -5
webroot/rsrc/js/core/behavior-active-nav.js
··· 29 29 'phabricator-active-nav-focus', 30 30 selected); 31 31 } 32 - } 32 + }; 33 33 34 34 35 35 /** ··· 49 49 50 50 // Sort the markers by Y position, descending. 51 51 var markinfo = []; 52 - for (var ii = 0; ii < markers.length; ii++) { 52 + var ii; 53 + for (ii = 0; ii < markers.length; ii++) { 53 54 markinfo.push({ 54 55 marker: markers[ii], 55 56 position: JX.$V(markers[ii]).y - 15 ··· 60 61 // Find the first marker above the current scroll position, or the first 61 62 // marker in the document if we're above all the markers. 62 63 var active = null; 63 - for (var ii = 0; ii < markinfo.length; ii++) { 64 + for (ii = 0; ii < markinfo.length; ii++) { 64 65 active = markinfo[ii].marker; 65 66 if (markinfo[ii].position <= scroll_position) { 66 67 break; ··· 72 73 73 74 // If we get above the first marker, select it. 74 75 selectnav(active && JX.Stratcom.getData(active).anchor); 75 - } 76 + }; 76 77 77 78 var pending = null; 78 79 var onviewportchange = function(e) { 79 80 pending && clearTimeout(pending); 80 81 pending = setTimeout(updateposition, 100); 81 - } 82 + }; 82 83 83 84 JX.Stratcom.listen('scroll', null, onviewportchange); 84 85 JX.Stratcom.listen('resize', null, onviewportchange);
+10 -9
webroot/rsrc/js/core/behavior-fancy-datepicker.js
··· 76 76 m: JX.DOM.find(root, 'select', 'month-input'), 77 77 d: JX.DOM.find(root, 'select', 'day-input') 78 78 }; 79 - } 79 + }; 80 80 81 81 var read_date = function() { 82 82 var i = get_inputs(); ··· 97 97 picker.firstChild, 98 98 [ 99 99 render_month(), 100 - render_day(), 100 + render_day() 101 101 ]); 102 102 }; 103 103 ··· 114 114 } 115 115 116 116 return JX.$N('td', {meta: {value: value}, className: class_name}, label); 117 - } 117 + }; 118 118 119 119 120 120 // Render the top bar which allows you to pick a month and year. ··· 152 152 // First, render the weekday names. 153 153 var weekdays = 'SMTWTFS'; 154 154 var weekday_names = []; 155 - for (var ii = 0; ii < weekdays.length; ii++) { 155 + var ii; 156 + for (ii = 0; ii < weekdays.length; ii++) { 156 157 weekday_names.push(cell(weekdays.charAt(ii), null, false, 'day-name')); 157 158 } 158 159 weeks.push(JX.$N('tr', {}, weekday_names)); ··· 168 169 169 170 var today = new Date(); 170 171 171 - for (var ii = 1; ii <= 31; ii++) { 172 + for (ii = 1; ii <= 31; ii++) { 172 173 var date = new Date(value_y, value_m - 1, ii); 173 174 if (date.getMonth() != (value_m - 1)) { 174 175 // We've spilled over into the next month, so stop rendering. ··· 183 184 if (is_today) { 184 185 classes.push('today'); 185 186 } 186 - if (date.getDay() == 0 || date.getDay() == 6) { 187 + if (date.getDay() === 0 || date.getDay() == 6) { 187 188 classes.push('weekend'); 188 189 } 189 190 ··· 191 192 } 192 193 193 194 // Slice the days into weeks. 194 - for (var ii = 0; ii < days.length; ii += 7) { 195 + for (ii = 0; ii < days.length; ii += 7) { 195 196 weeks.push(JX.$N('tr', {}, days.slice(ii, ii + 7))); 196 197 } 197 198 ··· 216 217 switch (p[0]) { 217 218 case 'm': 218 219 // User clicked left or right month selection buttons. 219 - value_m = value_m + parseInt(p[1]); 220 + value_m = value_m + parseInt(p[1], 10); 220 221 if (value_m > 12) { 221 222 value_m -= 12; 222 223 value_y++; ··· 227 228 break; 228 229 case 'd': 229 230 // User clicked a day. 230 - value_d = parseInt(p[1]); 231 + value_d = parseInt(p[1], 10); 231 232 write_date(); 232 233 233 234 // Wait a moment to close the selector so they can see the effect
+1 -1
webroot/rsrc/js/core/behavior-global-drag-and-drop.js
··· 41 41 files.push(f); 42 42 43 43 pending--; 44 - if (pending == 0 && !errors) { 44 + if (pending === 0 && !errors) { 45 45 // If whatever the user dropped in has finished uploading, send them to 46 46 // their uploads. 47 47 var uri;
+1 -1
webroot/rsrc/js/core/behavior-hovercard.js
··· 13 13 // We listen for mousemove instead of mouseover to handle the case when user 14 14 // scrolls with keyboard. We don't want to display hovercard if node gets 15 15 // under the mouse cursor randomly placed somewhere on the screen. This 16 - // unfortunatelly doesn't work in Google Chrome which triggers both mousemove 16 + // unfortunately doesn't work in Google Chrome which triggers both mousemove 17 17 // and mouseover in this case but works in other browsers. 18 18 JX.Stratcom.listen( 19 19 'mousemove',
+1 -1
webroot/rsrc/js/core/behavior-lightbox-attachments.js
··· 157 157 img.onload = function() { 158 158 JX.DOM.alterClass(img, 'loading', false); 159 159 JX.Busy.done(); 160 - } 160 + }; 161 161 162 162 img.src = img_uri; 163 163 }
+2 -2
webroot/rsrc/js/core/behavior-object-selector.js
··· 79 79 var cells = [ 80 80 JX.$N('td', {}, view_object_link), 81 81 JX.$N('th', {}, select_object_link), 82 - JX.$N('td', {}, select_object_button), 82 + JX.$N('td', {}, select_object_button) 83 83 ]; 84 84 85 85 var table = JX.$N( ··· 109 109 110 110 function sendQuery() { 111 111 query_timer = null; 112 - JX.DOM.setContent(JX.$(config.results), renderNote('Loading...')) 112 + JX.DOM.setContent(JX.$(config.results), renderNote('Loading...')); 113 113 new JX.Request(config.uri, JX.bind(null, onreceive, ++n)) 114 114 .setData({ 115 115 filter: JX.$(config.filter).value,
+2 -2
webroot/rsrc/js/core/behavior-oncopy.js
··· 37 37 var pos; 38 38 for (var ii = 0; ii < lines.length; ii++) { 39 39 pos = lines[ii].indexOf(zws); 40 - if (pos == -1 && ii != 0) { 40 + if (pos == -1 && ii !== 0) { 41 41 continue; 42 42 } 43 43 result.push(lines[ii].substring(pos + 1)); ··· 76 76 // to work or give me any errors. So you lose your selection when you 77 77 // copy. Oh well? 78 78 } 79 - } 79 + }; 80 80 });
+6 -4
webroot/rsrc/js/core/behavior-phabricator-nav.js
··· 6 6 * javelin-dom 7 7 * javelin-magical-init 8 8 * javelin-vector 9 + * javelin-request 10 + * javelin-util 9 11 * @javelin 10 12 */ 11 13 ··· 46 48 element: background, 47 49 parameter: 'width', 48 50 start: JX.Vector.getDim(background).x, 49 - start: JX.Vector.getDim(background).x, 50 51 minWidth: 1 51 52 }, 52 53 { ··· 74 75 75 76 var dx = JX.$V(e).x - dragging.x; 76 77 var panel; 78 + var k; 77 79 78 - for (var k = 0; k < track.length; k++) { 80 + for (k = 0; k < track.length; k++) { 79 81 panel = track[k]; 80 82 if (!panel.minWidth) { 81 83 continue; ··· 86 88 } 87 89 } 88 90 89 - for (var k = 0; k < track.length; k++) { 91 + for (k = 0; k < track.length; k++) { 90 92 panel = track[k]; 91 93 var v = (panel.start + (dx * (panel.scale || 1))); 92 94 panel.element.style[panel.parameter] = v + 'px'; ··· 115 117 JX.DOM.alterClass(main, 'has-local-nav', !collapsed); 116 118 JX.DOM.alterClass(main, 'has-drag-nav', !collapsed); 117 119 resetdrag(); 118 - new JX.Request('/settings/adjust/', JX.Bag) 120 + new JX.Request('/settings/adjust/', JX.bag) 119 121 .setData({ key : 'nav-collapsed', value : (collapsed ? 1 : 0) }) 120 122 .send(); 121 123 });
+7 -7
webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js
··· 119 119 // Now, select just the middle part. For instance, if the user clicked 120 120 // "B" to create bold text, we insert '**bold**' but just select the word 121 121 // "bold" so if they type stuff they'll be editing the bold text. 122 - var r = JX.TextAreaUtils.getSelectionRange(area); 122 + var range = JX.TextAreaUtils.getSelectionRange(area); 123 123 JX.TextAreaUtils.setSelectionRange( 124 124 area, 125 - r.start + l.length, 126 - r.start + l.length + m.length); 125 + range.start + l.length, 126 + range.start + l.length + m.length); 127 127 } 128 128 129 129 function assist(area, action, root) { ··· 152 152 sel = ["List Item"]; 153 153 } 154 154 sel = sel.join("\n" + ch); 155 - update(area, ((r.start == 0) ? "" : "\n\n") + ch, sel, "\n\n"); 155 + update(area, ((r.start === 0) ? "" : "\n\n") + ch, sel, "\n\n"); 156 156 break; 157 157 case 'code': 158 158 sel = sel || "foreach ($list as $item) {\n work_miracles($item);\n}"; 159 159 sel = sel.split("\n"); 160 160 sel = " " + sel.join("\n "); 161 - update(area, ((r.start == 0) ? "" : "\n\n"), sel, "\n\n"); 161 + update(area, ((r.start === 0) ? "" : "\n\n"), sel, "\n\n"); 162 162 break; 163 163 case 'table': 164 - update(area, (r.start == 0 ? '' : '\n\n') + '| ', sel || 'data', ' |'); 164 + update(area, (r.start === 0 ? '' : '\n\n') + '| ', sel || 'data', ' |'); 165 165 break; 166 166 case 'meme': 167 167 new JX.Workflow('/macro/meme/create/') ··· 170 170 area, 171 171 '', 172 172 sel, 173 - (r.start == 0 ? '' : '\n\n') + response.text + '\n\n'); 173 + (r.start === 0 ? '' : '\n\n') + response.text + '\n\n'); 174 174 }) 175 175 .start(); 176 176 break;
+2 -1
webroot/rsrc/js/core/behavior-refresh-csrf.js
··· 54 54 55 55 JX.Request.listen('finally', function(r) { 56 56 JX.Busy.done(); 57 - }) 57 + }); 58 + 58 59 });
+3 -2
webroot/rsrc/js/core/behavior-reveal-content.js
··· 13 13 function(e) { 14 14 e.kill(); 15 15 var nodes = e.getNodeData('reveal-content'); 16 - for (var ii = 0; ii < nodes.showIDs.length; ii++) { 16 + var ii; 17 + for (ii = 0; ii < nodes.showIDs.length; ii++) { 17 18 JX.DOM.show(JX.$(nodes.showIDs[ii])); 18 19 } 19 - for (var ii = 0; ii < nodes.hideIDs.length; ii++) { 20 + for (ii = 0; ii < nodes.hideIDs.length; ii++) { 20 21 JX.DOM.hide(JX.$(nodes.hideIDs[ii])); 21 22 } 22 23 });
+4 -3
webroot/rsrc/js/core/behavior-search-typeahead.js
··· 16 16 function transform(object) { 17 17 var attr = { 18 18 className: 'phabricator-main-search-typeahead-result' 19 - } 19 + }; 20 20 21 21 if (object[6]) { 22 22 attr.style = {backgroundImage: 'url('+object[6]+')'}; ··· 59 59 60 60 var tokens = this.tokenize(value); 61 61 62 - for (var ii = 0; ii < list.length; ii++) { 62 + var ii; 63 + for (ii = 0; ii < list.length; ii++) { 63 64 var item = list[ii]; 64 65 if (!item.priority) { 65 66 continue; ··· 91 92 // we show 3 applications, then 3 users, etc. 92 93 var type_count = 0; 93 94 var current_type = null; 94 - for (var ii = 0; ii < list.length; ii++) { 95 + for (ii = 0; ii < list.length; ii++) { 95 96 if (list.length <= config.limit) { 96 97 break; 97 98 }
+1
webroot/rsrc/js/core/phtize.js
··· 1 1 /** 2 2 * @provides phabricator-phtize 3 3 * @requires javelin-util 4 + * @javelin-installs JX.phtize 4 5 * @javelin 5 6 */ 6 7