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

Side by Side Diff: chrome/browser/resources/security_warnings/interstitial_v2_mobile.js

Issue 865943002: Update SSL/malware/net error interstitial design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch button layout switching from JS to CSS flexbox Created 5 years, 11 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var mobileNav = false;
6
7 /**
8 * For small screen mobile the navigation buttons are moved
9 * below the advanced text.
10 */
11 function onResize() {
12 var helpOuterBox = document.querySelector('#details');
13 var mainContent = document.querySelector('#main-content');
14 var mediaQuery = '(max-width: 420px) and (orientation: portrait),' +
15 '(max-width: 736px) and (max-height: 420px) and (orientation: landscape)';
16
17 mobileNav = window.matchMedia(mediaQuery).matches;
18
19 mainContent.classList.toggle('hidden', false);
20 helpOuterBox.classList.toggle('hidden', true);
21 }
22
23 function setupMobileNav() {
24 window.addEventListener('resize', onResize);
25 onResize();
26 }
27
28 document.addEventListener('DOMContentLoaded', setupMobileNav);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698