Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: components/neterror/resources/offline.js

Issue 2107753002: Allow page interactions whilst the offline easter egg is inactive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 (function() { 4 (function() {
5 'use strict'; 5 'use strict';
6 /** 6 /**
7 * T-Rex runner. 7 * T-Rex runner.
8 * @param {string} outerContainerId Outer containing element id. 8 * @param {string} outerContainerId Outer containing element id.
9 * @param {Object} opt_config 9 * @param {Object} opt_config
10 * @constructor 10 * @constructor
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 document.removeEventListener(Runner.events.MOUSEUP, this); 643 document.removeEventListener(Runner.events.MOUSEUP, this);
644 } 644 }
645 }, 645 },
646 646
647 /** 647 /**
648 * Process keydown. 648 * Process keydown.
649 * @param {Event} e 649 * @param {Event} e
650 */ 650 */
651 onKeyDown: function(e) { 651 onKeyDown: function(e) {
652 // Prevent native page scrolling whilst tapping on mobile. 652 // Prevent native page scrolling whilst tapping on mobile.
653 if (IS_MOBILE) { 653 if (IS_MOBILE && this.activated) {
mmenke 2016/06/28 13:39:21 If I'm following the code right, this means that y
654 e.preventDefault(); 654 e.preventDefault();
655 } 655 }
656 656
657 if (e.target != this.detailsButton) { 657 if (e.target != this.detailsButton) {
658 if (!this.crashed && (Runner.keycodes.JUMP[e.keyCode] || 658 if (!this.crashed && (Runner.keycodes.JUMP[e.keyCode] ||
659 e.type == Runner.events.TOUCHSTART)) { 659 e.type == Runner.events.TOUCHSTART)) {
660 if (!this.activated) { 660 if (!this.activated) {
661 this.loadSounds(); 661 this.loadSounds();
662 this.activated = true; 662 this.activated = true;
663 errorPageController.trackEasterEgg(); 663 errorPageController.trackEasterEgg();
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after
2680 2680
2681 /** 2681 /**
2682 * Add a new cloud to the horizon. 2682 * Add a new cloud to the horizon.
2683 */ 2683 */
2684 addCloud: function() { 2684 addCloud: function() {
2685 this.clouds.push(new Cloud(this.canvas, this.spritePos.CLOUD, 2685 this.clouds.push(new Cloud(this.canvas, this.spritePos.CLOUD,
2686 this.dimensions.WIDTH)); 2686 this.dimensions.WIDTH));
2687 } 2687 }
2688 }; 2688 };
2689 })(); 2689 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698