OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // File Description: | |
6 // Contains all the necessary functions for rendering the Welcome page on | |
7 // Android. | |
8 | |
9 cr.define('about_welcome_android', function() { | |
10 'use strict'; | |
11 | |
12 /** | |
13 * Object for accessing localized strings. | |
14 * @type {!LocalStrings} | |
15 */ | |
16 var localStrings = new LocalStrings; | |
17 | |
18 /** | |
19 * Insert localized strings into the document and disable context menus. | |
20 */ | |
21 function initialize() { | |
22 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.
| |
23 | |
24 var anchors = document.getElementsByTagName('a'); | |
25 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
| |
26 anchors[i].oncontextmenu = function() { return false; }; | |
Evan Stade
2012/08/10 02:40:01
I hear e.preventDefault() is "better". Well, at le
| |
27 } | |
28 } | |
29 | |
30 // Return an object with all of the exports. | |
31 return { | |
32 initialize: initialize, | |
33 }; | |
34 }); | |
35 | |
36 document.addEventListener('DOMContentLoaded', about_welcome_android.initialize); | |
OLD | NEW |