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

Unified Diff: chrome/browser/resources/new_new_tab.js

Issue 429005: More tweaks and fixes for extension and bookmark sync promo. ... (Closed) Base URL: svn://chrome-svn/chrome/branches/249/src/
Patch Set: Created 11 years, 1 month 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
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/new_new_tab.js
===================================================================
--- chrome/browser/resources/new_new_tab.js (revision 32748)
+++ chrome/browser/resources/new_new_tab.js (working copy)
@@ -1243,6 +1243,9 @@
// page itself (without going to Options dialog box).
document.addEventListener('DOMContentLoaded', showSetAsHomePageLink);
+// Set up links and text-decoration for promotional message.
+document.addEventListener('DOMContentLoaded', setUpPromoMessage);
+
/**
* The sync code is not yet built by default on all platforms so we have to
* make sure we don't send the initial sync message to the backend unless the
@@ -1595,7 +1598,23 @@
// Closes the promo line when close button is clicked.
$('promo-close').onclick = function (e) {
- $('footer').className = 'hide-footer';
+ $('promo-line').className = 'hide-promo-line';
chrome.send('stopPromoLineMessage');
e.preventDefault();
};
+
+// Set bookmark sync button to start bookmark sync process on click; also set
+// link underline colors correctly.
+function setUpPromoMessage() {
+ var syncButton = document.querySelector('#promo-message button');
+ syncButton.className = 'sync-button link';
+ syncButton.onclick = syncSectionLinkClicked;
+ fixLinkUnderlines($('promo-message'));
+}
+
+// A Windows-specific Webkit bug adds padding to buttons and will push the
+// bookmark sync button in the promo message too far to the right unless we
+// use this fix. See https://bugs.webkit.org/show_bug.cgi?id=31703
+if (navigator.platform == 'Win32') {
+ addClass(document.body, 'win-button-padding-bug');
+}
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698