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

Side by Side Diff: chrome/browser/resources/shared/js/util.js

Issue 3526020: Redirected network details to options DOM UI page.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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 | « chrome/browser/resources/options/chromeos_internet_options_page.css ('k') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 /** 5 /**
6 * The global object. 6 * The global object.
7 * @param {!Object} 7 * @param {!Object}
8 */ 8 */
9 const global = this; 9 const global = this;
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // quotes (") appearing in a URI must be escaped with a backslash 48 // quotes (") appearing in a URI must be escaped with a backslash
49 var s2 = s.replace(/(\(|\)|\,|\s|\'|\"|\\)/g, '\\$1'); 49 var s2 = s.replace(/(\(|\)|\,|\s|\'|\"|\\)/g, '\\$1');
50 // WebKit has a bug when it comes to URLs that end with \ 50 // WebKit has a bug when it comes to URLs that end with \
51 // https://bugs.webkit.org/show_bug.cgi?id=28885 51 // https://bugs.webkit.org/show_bug.cgi?id=28885
52 if (/\\\\$/.test(s2)) { 52 if (/\\\\$/.test(s2)) {
53 // Add a space to work around the WebKit bug. 53 // Add a space to work around the WebKit bug.
54 s2 += ' '; 54 s2 += ' ';
55 } 55 }
56 return 'url("' + s2 + '")'; 56 return 'url("' + s2 + '")';
57 } 57 }
58
59 /**
60 * Parses query parameters from Location.
61 * @param {string} s The URL to generate the CSS url for.
62 * @return {object} Dictionary containing name value pairs for URL
63 */
64 function parseQueryParams(location) {
65 var params = {};
66 var query = unescape(location.search.substring(1));
67 var vars = query.split("&");
68 for (var i=0; i < vars.length; i++) {
69 var pair = vars[i].split("=");
70 params[pair[0]] = pair[1];
71 }
72 return params;
73 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/chromeos_internet_options_page.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698