Index: chrome/browser/resources/about_welcome_android/about_welcome_android.js |
diff --git a/chrome/browser/resources/about_welcome_android/about_welcome_android.js b/chrome/browser/resources/about_welcome_android/about_welcome_android.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..71d947be1a31f737ed84c1719513bb2ff8a9c166 |
--- /dev/null |
+++ b/chrome/browser/resources/about_welcome_android/about_welcome_android.js |
@@ -0,0 +1,36 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// File Description: |
+// Contains all the necessary functions for rendering the Welcome page on |
+// Android. |
+ |
+cr.define('about_welcome_android', function() { |
+ 'use strict'; |
+ |
+ /** |
+ * Object for accessing localized strings. |
+ * @type {!LocalStrings} |
+ */ |
+ var localStrings = new LocalStrings; |
+ |
+ /** |
+ * Insert localized strings into the document and disable context menus. |
+ */ |
+ function initialize() { |
+ i18nTemplate.process(document, templateData); |
Evan Stade
2012/08/10 02:40:01
ah, you don't need this. Just include i18n_templat
newt (away)
2012/08/10 20:49:43
Done.
|
+ |
+ var anchors = document.getElementsByTagName('a'); |
+ for (var i = 0; i < anchors.length; i++) { |
Evan Stade
2012/08/10 02:40:01
why do this event canceling?
Also I think the no
newt (away)
2012/08/10 20:49:43
I'm guessing this was a design decision, but I'll
|
+ anchors[i].oncontextmenu = function() { return false; }; |
Evan Stade
2012/08/10 02:40:01
I hear e.preventDefault() is "better". Well, at le
|
+ } |
+ } |
+ |
+ // Return an object with all of the exports. |
+ return { |
+ initialize: initialize, |
+ }; |
+}); |
+ |
+document.addEventListener('DOMContentLoaded', about_welcome_android.initialize); |