@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
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove Konami code easter egg

Summary:
This is cool in theory, but has broken like 5 times and is broken now too. The CSS magic just isn't robust enough to keep up with CSS changes.

Just strip it out for now; if we come up with some more durable replacement we can put that back in its place.

Test Plan: Typed konami code, page didn't break horribly.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

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

+13 -122
+13 -16
resources/celerity/map.php
··· 44 44 'rsrc/css/application/config/config-welcome.css' => '6abd79be', 45 45 'rsrc/css/application/config/setup-issue.css' => '22270af2', 46 46 'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2', 47 - 'rsrc/css/application/conpherence/durable-column.css' => '7abcc3f2', 47 + 'rsrc/css/application/conpherence/durable-column.css' => '9207426d', 48 48 'rsrc/css/application/conpherence/menu.css' => 'c6ac5299', 49 49 'rsrc/css/application/conpherence/message-pane.css' => '5930260a', 50 50 'rsrc/css/application/conpherence/notification.css' => '04a6e10a', ··· 353 353 'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18', 354 354 'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de', 355 355 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => 'efef202b', 356 - 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'aa3b6c22', 356 + 'rsrc/js/application/conpherence/behavior-durable-column.js' => '1eef9f26', 357 357 'rsrc/js/application/conpherence/behavior-menu.js' => 'e476c952', 358 358 'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861', 359 359 'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3', ··· 470 470 'rsrc/js/core/behavior-hovercard.js' => 'f36e01af', 471 471 'rsrc/js/core/behavior-keyboard-pager.js' => 'a8da01f0', 472 472 'rsrc/js/core/behavior-keyboard-shortcuts.js' => 'd75709e6', 473 - 'rsrc/js/core/behavior-konami.js' => '5bc2cb21', 474 473 'rsrc/js/core/behavior-lightbox-attachments.js' => 'f8ba29d7', 475 474 'rsrc/js/core/behavior-line-linker.js' => '1499a8cb', 476 475 'rsrc/js/core/behavior-more.js' => 'a80d0378', ··· 515 514 'changeset-view-manager' => '88be0133', 516 515 'config-options-css' => '7fedf08b', 517 516 'config-welcome-css' => '6abd79be', 518 - 'conpherence-durable-column-view' => '7abcc3f2', 517 + 'conpherence-durable-column-view' => '9207426d', 519 518 'conpherence-menu-css' => 'c6ac5299', 520 519 'conpherence-message-pane-css' => '5930260a', 521 520 'conpherence-notification-css' => '04a6e10a', ··· 586 585 'javelin-behavior-diffusion-locate-file' => '6d3e1947', 587 586 'javelin-behavior-diffusion-pull-lastmodified' => '2b228192', 588 587 'javelin-behavior-doorkeeper-tag' => 'e5822781', 589 - 'javelin-behavior-durable-column' => 'aa3b6c22', 588 + 'javelin-behavior-durable-column' => '1eef9f26', 590 589 'javelin-behavior-error-log' => '6882e80a', 591 590 'javelin-behavior-fancy-datepicker' => 'c51ae228', 592 591 'javelin-behavior-global-drag-and-drop' => '07f199d8', ··· 594 593 'javelin-behavior-high-security-warning' => '8fc1c918', 595 594 'javelin-behavior-history-install' => '7ee2b591', 596 595 'javelin-behavior-icon-composer' => '8ef9ab58', 597 - 'javelin-behavior-konami' => '5bc2cb21', 598 596 'javelin-behavior-launch-icon-composer' => '48086888', 599 597 'javelin-behavior-lightbox-attachments' => 'f8ba29d7', 600 598 'javelin-behavior-line-chart' => '88f0c5b3', ··· 956 954 'javelin-dom', 957 955 'javelin-reactor-dom', 958 956 ), 957 + '1eef9f26' => array( 958 + 'javelin-behavior', 959 + 'javelin-dom', 960 + 'javelin-stratcom', 961 + 'javelin-scrollbar', 962 + 'javelin-quicksand', 963 + 'phabricator-keyboard-shortcut', 964 + 'conpherence-thread-manager', 965 + ), 959 966 '1feea462' => array( 960 967 'javelin-install', 961 968 'javelin-dom', ··· 1657 1664 'javelin-util', 1658 1665 'phabricator-prefab', 1659 1666 ), 1660 - 'aa3b6c22' => array( 1661 - 'javelin-behavior', 1662 - 'javelin-dom', 1663 - 'javelin-stratcom', 1664 - 'javelin-scrollbar', 1665 - 'javelin-quicksand', 1666 - 'phabricator-keyboard-shortcut', 1667 - 'conpherence-thread-manager', 1668 - ), 1669 1667 'b1f0ccee' => array( 1670 1668 'javelin-install', 1671 1669 'javelin-dom', ··· 2128 2126 'phabricator-notification', 2129 2127 'javelin-behavior-aphlict-listen', 2130 2128 'javelin-behavior-phabricator-search-typeahead', 2131 - 'javelin-behavior-konami', 2132 2129 'javelin-behavior-aphlict-dropdown', 2133 2130 'javelin-behavior-history-install', 2134 2131 'javelin-behavior-phabricator-gesture',
-1
resources/celerity/packages.php
··· 49 49 'phabricator-notification', 50 50 'javelin-behavior-aphlict-listen', 51 51 'javelin-behavior-phabricator-search-typeahead', 52 - 'javelin-behavior-konami', 53 52 'javelin-behavior-aphlict-dropdown', 54 53 'javelin-behavior-history-install', 55 54 'javelin-behavior-phabricator-gesture',
-1
src/view/page/PhabricatorStandardPageView.php
··· 197 197 198 198 Javelin::initBehavior('aphront-form-disable-on-submit'); 199 199 Javelin::initBehavior('toggle-class', array()); 200 - Javelin::initBehavior('konami', array()); 201 200 Javelin::initBehavior('history-install'); 202 201 Javelin::initBehavior('phabricator-gesture'); 203 202
-104
webroot/rsrc/js/core/behavior-konami.js
··· 1 - /** 2 - * @provides javelin-behavior-konami 3 - * @requires javelin-behavior 4 - * javelin-stratcom 5 - */ 6 - 7 - JX.behavior('konami', function() { 8 - var sequence = [ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ]; 9 - var seen = []; 10 - 11 - JX.Stratcom.listen('keyup', null, function(e) { 12 - if (!sequence) { 13 - return; 14 - } 15 - 16 - seen.push(e.getRawEvent().keyCode); 17 - 18 - while (seen.length) { 19 - var mismatch = false; 20 - for (var i = 0; i < seen.length; ++i) { 21 - if (seen[i] != sequence[i]) { 22 - mismatch = true; 23 - break; 24 - } 25 - } 26 - if (!mismatch) { 27 - break; 28 - } 29 - seen.shift(); 30 - } 31 - 32 - if (seen.length == sequence.length) { 33 - sequence = seen = null; 34 - activate(); 35 - } 36 - }); 37 - 38 - var prefixes = { '-webkit-': 1, '-moz-': 1, '-o-': 1, '-ms-': 1, '': 1 }; 39 - 40 - function generateCSS(selector, props) { 41 - var ret = selector + '{'; 42 - for (var key in props) { 43 - ret += key + ':' + props[key] + ';'; 44 - } 45 - return ret + '}'; 46 - } 47 - 48 - function generateAllCSS(selector, props) { 49 - var more_props = {}; 50 - for (var key in props) { 51 - for (var prefix in prefixes) { 52 - more_props[prefix + key] = props[key]; 53 - } 54 - } 55 - return generateCSS(selector, more_props); 56 - } 57 - 58 - function modifyCSS(rule, key, value) { 59 - rule.setProperty(key, value, ''); 60 - } 61 - 62 - function modifyAllCSS(rule, key, value) { 63 - for (var prefix in prefixes) { 64 - modifyCSS(rule, prefix + key, value); 65 - } 66 - } 67 - 68 - var top_rule; 69 - 70 - function activate() { 71 - var matrix = document.createElement('style'); 72 - matrix.textContent = [ 73 - generateAllCSS('html', { 74 - background: '#000' 75 - }), 76 - generateAllCSS('body', { 77 - perspective: '2048px', 78 - background: 'transparent' 79 - }), 80 - generateAllCSS('*', { 81 - 'transform-style': 'preserve-3d' 82 - }), 83 - generateAllCSS('body > *', { 84 - }) 85 - ].join('\n'); 86 - document.head.appendChild(matrix); 87 - 88 - top_rule = matrix.sheet.cssRules[3].style; 89 - 90 - var first_event = null; 91 - document.body.addEventListener('mousemove', function(e) { 92 - if (!first_event) { 93 - first_event = {x: e.screenX, y: e.screenY}; 94 - } 95 - var dx = (e.screenX - first_event.x); 96 - var dy = (e.screenY - first_event.y); 97 - 98 - var x = -(dx / window.innerWidth) * (Math.PI / 2); 99 - var y = (dy / window.innerHeight) * (Math.PI / 2); 100 - var body_rotate = 'rotateY(' + x + 'rad) rotateX(' + y + 'rad)'; 101 - modifyAllCSS(top_rule, 'transform', body_rotate); 102 - }, false); 103 - } 104 - });