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

Unified Diff: remoting/webapp/base/js/base.js

Issue 888323002: Improve HRD first run experience (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: remoting/webapp/base/js/base.js
diff --git a/remoting/webapp/base/js/base.js b/remoting/webapp/base/js/base.js
index 11bd091acf0ca9d5397e91db878a399403450da9..aa0b3a59a876bf10b9e5febc3717109257f39556 100644
--- a/remoting/webapp/base/js/base.js
+++ b/remoting/webapp/base/js/base.js
@@ -469,6 +469,19 @@ base.generateXsrfToken = function() {
};
/**
+ * @return {Object.<string, string>} The URL parameters.
+ */
+base.getUrlParameters = function() {
+ var result = {};
+ var parts = window.location.search.substring(1).split('&');
+ for (var i = 0; i < parts.length; i++) {
+ var pair = parts[i].split('=');
+ result[pair[0]] = decodeURIComponent(pair[1]);
+ }
+ return result;
+}
+
+/**
* @param {string} jsonString A JSON-encoded string.
* @return {Object|undefined} The decoded object, or undefined if the string
* cannot be parsed.

Powered by Google App Engine
This is Rietveld 408576698