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

Unified Diff: remoting/webapp/ui_mode.js

Issue 9903008: Added first-run infographic screens for IT2Me and Me2Me. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 9 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
« no previous file with comments | « remoting/webapp/remoting.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/ui_mode.js
diff --git a/remoting/webapp/ui_mode.js b/remoting/webapp/ui_mode.js
index 30a7c44908005eb381f4fdfa4f9b6b0e6a4689f5..ecb5d5765b156e3ca19fa6ad43f050ad27d98317 100644
--- a/remoting/webapp/ui_mode.js
+++ b/remoting/webapp/ui_mode.js
@@ -119,3 +119,32 @@ remoting.setMode = function(mode) {
remoting.getMajorMode = function() {
return remoting.currentMode.split('.')[0];
};
+
+remoting.showOrHideIt2MeUi = function() {
+ var visited = !!window.localStorage.getItem('it2me-visited');
+ document.getElementById('it2me-first-run').hidden = visited;
+ document.getElementById('it2me-content').hidden = !visited;
+};
+
+remoting.showOrHideMe2MeUi = function() {
+ var visited = !!window.localStorage.getItem('me2me-visited');
+ document.getElementById('me2me-first-run').hidden = visited;
+ document.getElementById('me2me-content').hidden = !visited;
+};
+
+remoting.showIt2MeUiAndSave = function() {
+ window.localStorage.setItem('it2me-visited', true);
+ remoting.showOrHideIt2MeUi();
+};
+
+remoting.showMe2MeUiAndSave = function() {
+ window.localStorage.setItem('me2me-visited', true);
+ remoting.showOrHideMe2MeUi();
+};
+
+remoting.resetInfographics = function() {
+ window.localStorage.removeItem('it2me-visited');
+ window.localStorage.removeItem('me2me-visited');
+ remoting.showOrHideIt2MeUi();
+ remoting.showOrHideMe2MeUi();
+}
« no previous file with comments | « remoting/webapp/remoting.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698