Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: html/static/js/firstRun.js

Issue 6025347820683264: Issue 1106 - Enable Acceptable Ads by default for new installs and updates from versions < 1.2 (Closed)
Patch Set: Discriminate first run page title for install/update Created Aug. 1, 2014, 3:08 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | html/static/js/ieFirstRun.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 .replace(/%LINK%/g, page) 98 .replace(/%LINK%/g, page)
99 .replace(/%LANG%/g, Utils.appLocale); 99 .replace(/%LANG%/g, Utils.appLocale);
100 } 100 }
101 101
102 function initTranslations() 102 function initTranslations()
103 { 103 {
104 // Map message ID to HTML element ID 104 // Map message ID to HTML element ID
105 var mapping = { 105 var mapping = {
106 "aa-title": "first-run-aa-title", 106 "aa-title": "first-run-aa-title",
107 "aa-text": "first-run-aa-text", 107 "aa-text": "first-run-aa-text",
108 "title-main": "first-run-title-install", 108 "title-main": AdblockPlus.isUpdate() ? "first-run-title-update" : "first-run -title-install",
109 "share-text1": "first-run-share1", 109 "share-text1": "first-run-share1",
110 "share-text2": "first-run-share2", 110 "share-text2": "first-run-share2",
111 "share-donate": "first-run-share2-donate", 111 "share-donate": "first-run-share2-donate",
112 "share2-connection": "first-run-share2-or" 112 "share2-connection": "first-run-share2-or"
113 }; 113 };
114 114
115 document.title = AdblockPlus.getMessage("first-run", "first-run-title-install" ); 115 document.title = AdblockPlus.getMessage("first-run", mapping['title-main']);
116 for (var i in mapping) 116 for (var i in mapping)
117 { 117 {
118 var element = document.getElementById(i); 118 var element = document.getElementById(i);
119 setElementText(element, AdblockPlus.getMessage("first-run", mapping[i])); 119 setElementText(element, AdblockPlus.getMessage("first-run", mapping[i]));
120 } 120 }
121 } 121 }
122 122
123 function init() 123 function init()
124 { 124 {
125 // Choose a share text variant randomly 125 // Choose a share text variant randomly
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 else if (typeof curArg == "function") 185 else if (typeof curArg == "function")
186 { 186 {
187 links[i].href = "javascript:void(0);"; 187 links[i].href = "javascript:void(0);";
188 links[i].addEventListener("click", curArg, false); 188 links[i].addEventListener("click", curArg, false);
189 } 189 }
190 } 190 }
191 } 191 }
192 192
193 window.addEventListener("load", init); 193 window.addEventListener("load", init);
OLDNEW
« no previous file with comments | « no previous file | html/static/js/ieFirstRun.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld