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

Side by Side Diff: chrome/browser/resources/inspect/inspect.js

Issue 108843003: DevTools: Make hash case-insensitive in chrome://inspect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 4
5 var MIN_VERSION_TAB_CLOSE = 25; 5 var MIN_VERSION_TAB_CLOSE = 25;
6 var MIN_VERSION_TARGET_ID = 26; 6 var MIN_VERSION_TARGET_ID = 26;
7 var MIN_VERSION_NEW_TAB = 29; 7 var MIN_VERSION_NEW_TAB = 29;
8 var MIN_VERSION_TAB_ACTIVATE = 30; 8 var MIN_VERSION_TAB_ACTIVATE = 30;
9 9
10 function sendCommand(command, args) { 10 function sendCommand(command, args) {
(...skipping 22 matching lines...) Expand all
33 tabHeader.appendChild(button); 33 tabHeader.appendChild(button);
34 tabHeader.addEventListener('click', selectTab.bind(null, tabContent.id)); 34 tabHeader.addEventListener('click', selectTab.bind(null, tabContent.id));
35 $('navigation').appendChild(tabHeader); 35 $('navigation').appendChild(tabHeader);
36 } 36 }
37 onHashChange(); 37 onHashChange();
38 initSettings(); 38 initSettings();
39 sendCommand('init-ui'); 39 sendCommand('init-ui');
40 } 40 }
41 41
42 function onHashChange() { 42 function onHashChange() {
43 var hash = window.location.hash.slice(1); 43 var hash = window.location.hash.slice(1).toLowerCase();
44 if (!selectTab(hash)) 44 if (!selectTab(hash))
45 selectTab('devices'); 45 selectTab('devices');
46 } 46 }
47 47
48 /** 48 /**
49 * @param {string} id Tab id. 49 * @param {string} id Tab id.
50 * @return {boolean} True if successful. 50 * @return {boolean} True if successful.
51 */ 51 */
52 function selectTab(id) { 52 function selectTab(id) {
53 var tabContents = document.querySelectorAll('#content > div'); 53 var tabContents = document.querySelectorAll('#content > div');
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 line.classList.remove('fresh'); 801 line.classList.remove('fresh');
802 var freshLine = createEmptyConfigLine(); 802 var freshLine = createEmptyConfigLine();
803 line.parentNode.appendChild(freshLine); 803 line.parentNode.appendChild(freshLine);
804 if (opt_selectNew) 804 if (opt_selectNew)
805 freshLine.querySelector('.port').focus(); 805 freshLine.querySelector('.port').focus();
806 } 806 }
807 807
808 document.addEventListener('DOMContentLoaded', onload); 808 document.addEventListener('DOMContentLoaded', onload);
809 809
810 window.addEventListener('hashchange', onHashChange); 810 window.addEventListener('hashchange', onHashChange);
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