summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 18:47:30 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 18:47:30 +0000
commit0d177c0b2386a1dea6249157df81fce6c71758ac (patch)
tree91ff6fa288391d478ba7256f47794a2e5b24d5c7 /chrome/browser/resources
parent3eb7c16a5e8699ea75a449ef98f19b87f0d716de (diff)
downloadchromium_src-0d177c0b2386a1dea6249157df81fce6c71758ac.zip
chromium_src-0d177c0b2386a1dea6249157df81fce6c71758ac.tar.gz
chromium_src-0d177c0b2386a1dea6249157df81fce6c71758ac.tar.bz2
Tell the app launcher about any newly installed apps. This is intended to be used for a nice animation.
Review URL: http://codereview.chromium.org/1906004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46472 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r--chrome/browser/resources/new_new_tab.css2
-rw-r--r--chrome/browser/resources/new_new_tab.html23
2 files changed, 22 insertions, 3 deletions
diff --git a/chrome/browser/resources/new_new_tab.css b/chrome/browser/resources/new_new_tab.css
index 43099a13..69409f2 100644
--- a/chrome/browser/resources/new_new_tab.css
+++ b/chrome/browser/resources/new_new_tab.css
@@ -16,7 +16,7 @@ body {
min-height: 100%;
}
-html[hash=app-launcher] #container {
+html[mode=app-launcher] #container {
min-height: 0;
}
diff --git a/chrome/browser/resources/new_new_tab.html b/chrome/browser/resources/new_new_tab.html
index a10b238..47bc25b 100644
--- a/chrome/browser/resources/new_new_tab.html
+++ b/chrome/browser/resources/new_new_tab.html
@@ -96,8 +96,27 @@ function updateSimpleSection(id, section) {
document.getElementById(id).className += ' hidden';
}
-// Reflect the hash as an attribute so we can use CSS attribute selectors on it.
-document.documentElement.setAttribute('hash', location.hash.slice(1));
+// Parse any name value pairs passed through the URL hash.
+var hashParams = (function() {
+ var result = {};
+ if (location.hash.length) {
+ location.hash.substr(1).split('&').forEach(function(pair) {
+ pair = pair.split('=');
+ if (pair.length != 2) {
+ throw new Error('Unexpected hash value: ' + location.hash);
+ }
+
+ result[pair[0]] = pair[1];
+ });
+ }
+ return result;
+})();
+
+// Reflect the mode param as an attribute so we can use CSS attribute selectors
+// on it.
+if ('mode' in hashParams) {
+ document.documentElement.setAttribute('mode', hashParams['mode']);
+}
</script>
</head>