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

Side by Side Diff: chrome/common/extensions/docs/js/bootstrap.js

Issue 10834325: Extension Docs: 'unofficial' warning was showing for https urls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | 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 fileXHREnabled = function() { 5 var fileXHREnabled = function() {
6 var xhr = new XMLHttpRequest(); 6 var xhr = new XMLHttpRequest();
7 try { 7 try {
8 xhr.onreadystatechange = function() {}; 8 xhr.onreadystatechange = function() {};
9 xhr.onerror = function() {}; 9 xhr.onerror = function() {};
10 xhr.open("GET", "nothing.xml", true); 10 xhr.open("GET", "nothing.xml", true);
11 xhr.send(null); 11 xhr.send(null);
12 } catch (e) { 12 } catch (e) {
13 return false; 13 return false;
14 } 14 }
15 15
16 xhr.abort(); 16 xhr.abort();
17 return true; 17 return true;
18 }(); 18 }();
19 19
20 var officialURL = (function() { 20 var officialURL = (function() {
21 var candidates = [ 21 var candidates = [
22 'http://code.google.com/chrome/extensions/', 22 'http://code.google.com/chrome/extensions/',
23 'https://code.google.com/chrome/extensions/',
23 'http://developer.chrome.com/', 24 'http://developer.chrome.com/',
25 'https://developer.chrome.com/',
24 26
25 // TODO(aa): Remove this one once developer.chrome.com is live. 27 // TODO(aa): Remove this one once developer.chrome.com is live.
26 'http://chrome-apps-doc.appspot.com/' 28 'http://chrome-apps-doc.appspot.com/'
27 ]; 29 ];
28 for (var i = 0, url; url = candidates[i]; i++) { 30 for (var i = 0, url; url = candidates[i]; i++) {
29 if (location.href.indexOf(candidates[i]) == 0) 31 if (location.href.indexOf(candidates[i]) == 0)
30 return candidates[i]; 32 return candidates[i];
31 } 33 }
32 return ''; 34 return '';
33 })(); 35 })();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 }; 100 };
99 } 101 }
100 if (currentBranch != 'stable' && currentBranch != 'beta') { 102 if (currentBranch != 'stable' && currentBranch != 'beta') {
101 var warning = document.getElementById('eventPageWarning'); 103 var warning = document.getElementById('eventPageWarning');
102 if (warning) 104 if (warning)
103 warning.style.display = 'block'; 105 warning.style.display = 'block';
104 } 106 }
105 } 107 }
106 } 108 }
107 } 109 }
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