Attachment #506113: WIP 2 for bug #627301

View | Details | Raw Unified | Return to bug 627301
Collapse All | Expand All

(-)a/browser/base/content/aboutHome.css (-48 / +161 lines)
Line     Link Here 
 Lines 17-32    Link Here 
17
 * The Original Code is aboutHome.xhtml.
17
 * The Original Code is aboutHome.xhtml.
18
 *
18
 *
19
 * The Initial Developer of the Original Code is the Mozilla Foundation.
19
 * The Initial Developer of the Original Code is the Mozilla Foundation.
20
 * Portions created by the Initial Developer are Copyright (C) 2010
20
 * Portions created by the Initial Developer are Copyright (C) 2010
21
 * the Initial Developer. All Rights Reserved.
21
 * the Initial Developer. All Rights Reserved.
22
 *
22
 *
23
 * Contributor(s):
23
 * Contributor(s):
24
 *   Marco Bonardo <mak77@bonardo.net> (original author)
24
 *   Marco Bonardo <mak77@bonardo.net> (original author)
25
 *   Mihai Sucan <mihai.sucan@gmail.com>
26
 *   Stephen Horlander <shorlander@mozilla.com>
25
 *
27
 *
26
 * Alternatively, the contents of this file may be used under the terms of
28
 * Alternatively, the contents of this file may be used under the terms of
27
 * either the GNU General Public License Version 2 or later (the "GPL"), or
29
 * either the GNU General Public License Version 2 or later (the "GPL"), or
28
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29
 * in which case the provisions of the GPL or the LGPL are applicable instead
31
 * in which case the provisions of the GPL or the LGPL are applicable instead
30
 * of those above. If you wish to allow use of your version of this file only
32
 * of those above. If you wish to allow use of your version of this file only
31
 * under the terms of either the GPL or the LGPL, and not to allow others to
33
 * under the terms of either the GPL or the LGPL, and not to allow others to
32
 * use your version of this file under the terms of the MPL, indicate your
34
 * use your version of this file under the terms of the MPL, indicate your
 Lines 37-117    Link Here 
37
 *
39
 *
38
 * ***** END LICENSE BLOCK ***** */
40
 * ***** END LICENSE BLOCK ***** */
39
%endif
41
%endif
40
42
41
html {
43
html {
42
  font: message-box;
44
  font: message-box;
43
  background: -moz-Field;
45
  background: -moz-Field;
44
  color: -moz-FieldText;
46
  color: -moz-FieldText;
47
  height: 100%;
45
}
48
}
46
49
47
#topSection,
50
body {
48
#bottomSection {
51
  display: inline-block;
49
  position: relative;
52
  position: relative;
50
  margin: 1em auto;
53
  margin: 0;
51
  padding: 25px;
54
  width: 100%;
52
  width: 560px;
55
  height: 100%;
56
}
57
58
#pageContainer {
59
  padding-top: 5%;
60
  height: 89%;
53
}
61
}
54
62
55
#brandStart {
63
#brandStart {
56
  background: -moz-linear-gradient(top, #42607C, #1E4262 30%, #1E4262 80%, #143552 98%, #244665);
64
  background: url("chrome://branding/content/about-logo.png") top center no-repeat;
57
  border-radius: 5.6px;
65
  background-size: auto 100%;
58
  padding-top: 0.1em;
66
  text-align: center;
59
  padding-bottom: 0.1em;
67
  height: 0;
60
  -moz-padding-start: 0.5em;
68
  padding-top: 13.8%;
61
  font-size: 250%;
69
  overflow-y: hidden;
62
  font-weight: bold;
63
  color: #688196;
64
  margin-top: 18px;
65
  margin-bottom: 6px;
66
}
67
#brandStart > span {
68
  color: white;
69
}
70
71
#brandStart:before {
72
  content: url("chrome://branding/content/icon128.png");
73
  position: absolute;
74
  top: 0;
75
}
76
77
body[dir="ltr"] #brandStart:before {
78
  right: 0;
79
}
80
body[dir="rtl"] #brandStart:before {
81
  left: -15px;
82
}
70
}
83
71
84
#searchContainer {
72
#searchContainer {
85
  border: 1px solid ThreeDShadow;
73
  padding-top: 1.5%;
86
  border-radius: 5.6px;
74
  padding-bottom: 6%;
87
  padding: 3em;
88
}
75
}
89
#searchEngineLinks {
76
90
  font-size: 80%;
77
#searchContainer:after {
78
  content: ".";
79
  display: block;
80
  clear: both;
81
  height: 0;
82
  visibility: hidden;
83
  font-size: 1px;
84
  overflow: hidden;
91
}
85
}
92
#searchEngineLinks > a {
86
93
  -moz-margin-start: 1em;
87
#searchLogoContainer {
88
  float: left;
89
  width: 30%;
90
  text-align: right;
91
  line-height: 32px;
94
}
92
}
95
body[dir="ltr"] #searchEngineLinks {
93
94
body[dir="rtl"] #searchLogoContainer {
96
  float: right;
95
  float: right;
97
}
96
  text-align: left;
98
body[dir="rtl"] #searchEngineLinks {
99
  float: left;
100
}
97
}
101
98
102
#searchEngineLogo {
99
#searchEngineLogo {
103
  margin: 5px;
100
  margin-right: 10px;
101
  vertical-align: middle;
102
}
103
104
body[dir="rtl"] #searchEngineLogo {
105
  margin-left: 10px;
106
  margin-right: 0;
107
}
108
109
#searchInputContainer {
110
  float: left;
111
  width: 40%;
112
  text-align: center;
113
}
114
115
body[dir="rtl"] #searchInputContainer {
116
  float: right;
104
}
117
}
105
118
106
#searchText {
119
#searchText {
107
  margin-bottom: 10px;
108
  width: 100%;
120
  width: 100%;
121
  height: 28px;
122
  border-radius: 2px;
123
  border: 1px solid rgb(150,150,150);
124
  border-top-color: rgb(100,100,100);
125
  box-shadow: 0 1px 0 rgba(255,255,255,0.5);
126
}
127
128
#searchButtons {
129
  float: left;
130
  width: 30%;
131
}
132
133
body[dir="rtl"] #searchButtons {
134
  float: right;
135
  text-align: right;
136
}
137
138
#searchSubmit {
139
  background: -moz-linear-gradient(#f1f1f1, #dfdfdf);
140
  padding: 4px 8px;
141
  height: 32px;
142
  border: 1px solid #ccc;
143
  border-color: #ccc #999 #999 #afafaf;
144
  box-shadow: 1px 1px 0 #e7e7e7,
145
              0 1px 0 #fcfcfc inset,
146
              0 -1px 0 #d7d7d7 inset;
147
  font-size: 13px;
148
  color: #000;
149
}
150
151
#searchSubmit:active {
152
  background: -moz-linear-gradient(#c5c5c5, #c5c5c5);
153
  box-shadow: 1px 1px 0 #e7e7e7;
154
}
155
156
#searchEngineLinks {
157
  font-size: 11px;
158
  margin-left: 10px;
159
}
160
161
body[dir="rtl"] #searchEngineLinks {
162
  margin-left: 0;
163
  margin-right: 10px;
164
}
165
166
#searchEngineLinks a {
167
  white-space: nowrap;
168
}
169
170
#contentContainer {
171
  min-height: 19%;
172
  background-image: -moz-radial-gradient(center top, ellipse farthest-side, rgba(16,83,130,.5), rgba(16,83,130,0) 75%),
173
                    -moz-radial-gradient(center top, ellipse farthest-side, rgba(180,218,244,.5), rgba(180,218,244,0)),
174
                    -moz-radial-gradient(center top, ellipse farthest-side, rgba(180,218,244,.3), rgba(180,218,244,0));
175
  background-size: 100% 5px,
176
                   100% 50px,
177
                   100% 100%;
178
  background-repeat: no-repeat;
179
}
180
181
#snippetContainer {
182
  position: relative;
183
  top: -24px;
184
  text-align: center;
185
}
186
187
#defaultSnippets {
188
  display: inline-block;
189
  padding: 14px;
190
  background-image: -moz-linear-gradient(rgba(255,255,255,.8), rgba(255,255,255,.1));
191
  background-color: rgb(250,250,250);
192
  border-radius: 4px;
193
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset,
194
              0 -2px 0 rgba(0,0,0,.1) inset,
195
              0 0 10px rgba(255,255,255,.5) inset,
196
              0 0 0 1px rgba(0,0,0,.1),
197
              0 2px 4px rgba(0,0,0,.2);
198
  color: rgb(60,60,60);
199
  font-size: 11px;
200
  cursor: pointer;
201
}
202
203
#defaultSnippets:hover {
204
  background-color: rgb(255,255,255);
205
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset,
206
              0 -2px 0 rgba(0,0,0,.1) inset,
207
              0 0 10px rgba(255,255,255,.5) inset,
208
              0 0 5px rgba(0,0,0,.1),
209
              0 0 0 1px rgba(0,0,0,.1),
210
              0 2px 4px rgba(0,0,0,.2);
211
}
212
213
#defaultSnippets:hover:active {
214
  background-color: rgb(210,210,210);
215
  box-shadow: 0 2px 3px rgba(0,0,0,.3) inset;
216
              0 1px 0 rgba(255,255,255,.5);
217
}
218
219
#bottomSection {
220
  position: absolute;
221
  color: rgb(150,150,150);
222
  font-size: 10px;
223
  width: 100%;
224
  text-align: center;
225
  bottom: 2%;
109
}
226
}
110
227
111
#aboutMozilla {
228
#aboutMozilla {
112
  text-align: center;
229
  text-align: center;
113
}
230
}
114
115
#defaultSnippets {
116
  text-align: center;
117
}
(-)a/browser/base/content/aboutHome.js (-1 / +51 lines)
Line     Link Here 
 Lines 35-51    Link Here 
35
 * the terms of any one of the MPL, the GPL or the LGPL.
35
 * the terms of any one of the MPL, the GPL or the LGPL.
36
 *
36
 *
37
 * ***** END LICENSE BLOCK ***** */
37
 * ***** END LICENSE BLOCK ***** */
38
38
39
// If a definition requires additional params, check that the final search url
39
// If a definition requires additional params, check that the final search url
40
// is handled correctly by the engine.
40
// is handled correctly by the engine.
41
const SEARCH_ENGINES = {
41
const SEARCH_ENGINES = {
42
  "Google": {
42
  "Google": {
43
    image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAYCAMAAABwdHsxAAADAFBMVEVogZYwjM9NtOspS2u0KAfYZBb3rRTiurCMjYrUWhIaPlzDNgfVRgjaVgvoizTI9f2ta17/9Wzrs0v46M/+7VOW6vrJQAsBLochdr+nmF/++o+UDQK88vzaYQarq6scarXT+f68vLzjdRrjewp5d3WqGATkUwaTq9uk7PnUaydkICTJSBD4uCDgZAz9+LiK6PjRZFH33Xv01qbrlxznhgvwx5gCBCbOUhLjfCzhaxHztXG8RhX93UP5yTRGl9QhRGT5wigkRmXniRj70zoKWrT2yUdqjs3UhzXvl0JwU0teu+EBElGD2fH83FZo1vTPilT0vDmd0Z3dbhrWrHLhcQir8PzTTDfPrVGrajv03cf5+vkwUG6z8PrSUw571uzvpCGPTzBsPDMxMEcHagXrkg7voBHf/P8FGHHhzrbyryOQZAeDNCudnZyTJBL2zlT+xByoUCG1wspyY1nRiH7STA3yiB7Jjx/pqT/Pz8/7lhDvfBxTUkl95PY/RE0DI2SQbT7LzJjxdg1OMTzutynnm2v+5DWsNBX+/tVDqOa7tnX57OPGYSHysziEo5a3XBe3l3j+0SXCoaCsjTL++fMgQmLmxXdv0ezsv0ycQxf8p0X1hwrenDU/Tnj9//tkyNj3+fX89fDv22QXHEWQydee7/xEdKG84uRWi5bwaxyK3/L++/iU5PMWM2Q6GS7UXg81l9gmSGgXOVewsKO3x+ECK8h8x3j7/fs5bMBke6kuTmwoRV/SbArKeSrB1snY373x5aSIRz85YIvragDD5+lnorUvSWF80PCQr6o4KGKysrIeQmIgXJ1Vb4j///8+XXjs7ewaUZSutsKFkqY4T3IhXqgYSHtwiJwUNVLExcbk5eU4SGcrcLEsP1wPKV77+/vy8/NBkcBmrN+drLklNGIONHQ5WXVxyuk0VXHHz9dmxuonZahTrNqPobEcP19CVXMURIljzvE/odz29vYcP3VieZHo6OhCYHxOW29y2vNYwe79/f33+PnU2eExgcLX2Nje397NKLzjAAACjElEQVR42q2UMWvbQBTHPRgro6CDKIJOPQSeVH+CDuZ2E3BIVmNkBB5agTF0NYV00y7jdMji0XqxvNljAzmEPASrQ0Vwhk41tPZiC6l3OjmNXYeYujfo3nF3v/fe/+le5hX5HyOTzv1Of88bnXelq0q8C9NRHMcpFrHd3gPTD0qV17uisWeDqE269gyguU88pcrRDowNXrqYTt1/xkQwXi8mZ2Q/TO9vDNa2FVkJLUPocDsYDoe1lB6EURzZ4RrDThHi0RF7mRh+bFGirCEYCJnMLpzUase5XI2aZxhjKM6wS64YJlDZqWxAPEq6ztjFm01KEzGdTxGirgoNFpRfrU7IEg8IiQFoqRlmqYp0p4VGDEO8zB1sYoLyKJlFVCdxjotwntNpISJqYfjKMQKi1fDVvJlqg2G6gWmh98l8iuRoWL1O7Bc53b2TJoSFc88xquwKqig8SGyDFvxRMGyriEdDUF140+DR9HN6hGHOBJIsjinLpvHoV84EIPGCL/ClAzOiojzfKeejz9WX3H6ru98Td6GWaqOi3lbBQQsTlyzzOU1ajjimTgpUkxRDN7Uvtl1kmTGMgT5+28BcAAC/SBSJBl7mWS1kkwRVnpWvs8n1HP6nMswFQmJyp71+DK4mgZ0ssEarFsiyQe0sg9V03acnG2luClgcQx+DKaOyTwTjAUNiS5OKWFGwZbGYw5GsiqKYNI6erp8XTo7TGigAToecVSofjvrEzMuyPBIe9xvXux2MvXCZZroQhNU6a7/mJ5VsK87l+FaD2TLpTvTTbTbj7bb13PiJZ0zAT+u6PtH9nhuKxD270s0hGAfSBOCgaJLHxDrlffcQzOoXSKyYjksOwdDWOLcG2H5i8zf27La6kVLrqwAAAABJRU5ErkJggg=="
43
    image: "data:image/png;base64," +
44
           "iVBORw0KGgoAAAANSUhEUgAAAEYAAAAcCAIAAABTWV5CAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ" +
45
           "bWFnZVJlYWR5ccllPAAACbtJREFUeNrsWHtwVOUV/+777jv7THY32SXPTZCADhiCAgEfVK3ig9pa" +
46
           "hbHVVqaOdey04zi1thSnnWpHKDI66NiqU6tCFaoDoYo8DBhIAiEkhJjHbh67yb537+7dvXvv3lfv" +
47
           "BkoSgzOkf8Do9Px5H9/5fuf8zu+c74NkWQbfLoPBt87+D+mbYOjsR1kOTMTFaFJg8xIMQXotYjcj" +
48
           "Ji1MYFdhfwk2sT944IxwLpyNWeNFTy18vNTqnAMkEYAur9TSSUUiCVjOw5Ccy8PZPIartDXzVMvq" +
49
           "yDo3ocKvKCRe4Hmaa0kf6xk69Sj2iHmpaQ5ZitLgnc+yre1jnuL0DQs0brtWRaI5ThoeZz/vDL+/" +
50
           "F925X7WoTHjiAaunwnjFIFk11ns9977fvYeJpOYv8Ki0qsuF5I2BF99NRHwDG9dqVi2tJjVTwVg4" +
51
           "H6y5kf60NfnbbV+OsllYbgDgykGCIRglUBhGlaoXEelyaymWkbd/lO3pHHr+YeLm1XWzC0yl1i27" +
52
           "Dtl4n2rl9eXVlSVXuJzEgklABrJ4WS0UVTrtp2f4ltbwXfX8TSvnX1IwFDPq8cfWL0GxS+U9GpVT" +
53
           "aQhFgNkMdLqvcSQBdgwIWYBpAG4HEHHpyplMAwYr+wd5AYgCKGgSJBcAXTJD0YicpCACBzabEvgL" +
54
           "kFKMfOgUi7DU8sVGCNF+HXQMQy+BNhrJNe+LDXjzkqSKJnQAJlY3obetgc0zmcn1M77dyXBAkRwd" +
55
           "EtAWFQPHA8B8K4CQi59QDGjvzYxOpBkRJ1QkgcrZJK1FmTtXOFVWWJImtWt6kjI027w31nOWZ/Pa" +
56
           "YEhjtuH3fw9dvqwAaTgsjAVYs1Z0lxrmRgj/SHrLS8M8INatK7LbxWg8seNN/MlnibuO6TY/g7n+" +
57
           "K7WZ41Tn5vFMrbrqYZVGQ8c65JHNWv8+UPULqPpXAC4I6Ggc/G1vFGT8jfMJfxzbcwAJJqAV1YkH" +
58
           "1+g0WkSQCjYDEp3Kbd82PBqAf/CAweHk+/pzW19hmo+gf9psuO8OtN/PsyxvIxGNmpgDHjqVf+Xl" +
59
           "wEiwaOtLpfPcSrTlWkC7Xckwxb39DkNqS/6yCSUJkPdxPb8JhY2mpudKbCYIAMF5DaMqyp9+EO7Y" +
60
           "JMousnZ9hgOv7UtPDAeff8Ra5ipRCsasi25+mw6nDOXzylQqPCVyknieeOcxydK/PggdbsGe/2NF" +
61
           "Y0Mh0bWeRFv36ReeE998e9Vtq+E4JQJJFiSYF6A5QDpxlPrkkNS4wjGJRzHlZ72rVP/oQxJuiL67" +
62
           "J9ZysvA0vDM7fBJ33Fs8iee8HGkq7gCOtSDD5zpfA3yiOwCOnkrXOtAyl10hOITgt95oW1qvO+vj" +
63
           "2rsTk0tDsjitlqIhbu8+3uF2LFmMCILc1U1teWXw3JfJDY8ZfvwQhKGwBpcUhaBZJEbxl4snz4kt" +
64
           "XzBRGrNYkJlv1IvrCU81R0dCJ3okkAPJLwRGJDXW6XMXguKY82ZYDYTxLnai1xsGqbQkyVOziV6L" +
65
           "XevRCnkuEklOBksuHBeUDEGTy/i8SqmghIZt6wi9/Grf9h2DVFL3y5/d/Pq2xnV34ziO1jgRRWAS" +
66
           "WbRnkFuycJZOSSBCCb7xvJLuIgOqSJCiBJVESu+fkDN5kKa/IquYvRivKud72phwnBdjRD4IiyzE" +
67
           "p+XJNE51m6JaWaXjUhk0HlGjssiDc2Nwgsqbii4oEIrCQKBtRrLAs4s+JpcQ45ScZBRUsXAYuF2a" +
68
           "W1a76jxabGqoQT0uwq4Xg2H04CnutpWM3aqevsV0lj/YOjY0nEBwbIQyDHmzi6q4X3/fKiEkQjNy" +
69
           "v1cURASdShWs0cAmPa10RZMegbUgD5GwyFM9krQOgaeBwrWyrMtk8jAwLa0E17lyx7rYNz6iN96v" +
70
           "NqhBIC4fbZ9YXZ+7YUnxFCQZnOeepDNKAoz0+zQldusNDcjs7mwyoE2LEETO94zIuw5QojQj7iQO" +
71
           "rVpsfOKH7ofuKEtTwtmzITPBWZwl2doFypdwWxc3HpyxniyzoVgM1pga56OQkZMWoCIgqMMCk5zp" +
72
           "lmNCFI0vQp0LSs3Q0+sNy2vpD5uHtr0X2N2W2/JesFgTfvbxWovFcgHNJB7o/NaqKtlSNzEyBv6x" +
73
           "G+L5Sw0cEHT3KuP1VXyKYnYdYj48lJqOSWkQTrvJbLEV28x6DUZiMolCCIZja2+n6+qZrhPM3z+Y" +
74
           "QdTjnQMnWpG7b69saiy0Tsf6NG9Cxo+CwJ4Zbr17/QMM0vBTo806OXMVb31m/p+fNOqJ9PZd8dM9" +
75
           "sQ13ulzu8gtEgjEYRQECCIKY5HaJeM/aJMDzb+3KbX0dZHNT8aSzEpdHNm3apNPi7hJocDDU52W6" +
76
           "hkRWhOc5SK1qhgCyAth9INLVOdpwDdq0zIVbLayr1N96it5/UI2riDInyHFs+5neZ18YcVqWbPl9" +
77
           "qcNRUALDPJrTpbqPoeEjpL0cIosAn+S9b40174iVbay65+da8rwqQBqNyu2yOooNB1qZaFI2m3R1" +
78
           "FSoCK+zBnw2+1vpGvG8CV2scJkeRxqStqwvGqVD7Ce6zY9KXQxBF8z5/dP+R6MiYuqaiAEn5zV6s" +
79
           "ra/CWTrSPxT9vCPVdjbrj4pURopT/HiY6xvOfHww2NE2YMRDa5rs19a7IAjWeyqRxiVhOhM8eDR9" +
80
           "sjvR0TV6vD2zyLNw89OVVVUXOUCUNTD6RbHAeHawmYt2pnwtE15frvwnFXc9ZdKRF0M2GpF7h3N9" +
81
           "3vRAf3A0wHT55FRWvM5Dkjjsi/gS54I1eA0CsBSd8thqrNZi7fKGhMk0Eo2Nn+uZaDnpP92bUOPG" +
82
           "NSstFW5o+nUKTafbO/3HOsK9XpZmYVKFFelRgwbWqCCDWlLCVuk2Op02g14/NZfwfLxvIDcRhhFE" +
83
           "7XKYPNXqWeRWHKRSGTpwRmATMKkjzbXGkpKLCpVgwD8P0x2nxizqjKsYsehkr5//4HM5zmif+ZHt" +
84
           "sftLeD4v5gQEQfN8XpAFvV6HoAVhVMooMjJKBUJiPq8y6i01lUZNYaCDZt8QCXwuTTNZhmUVCiIw" +
85
           "QeBqkjDocAQjZ0rxnE2e9X8yK2/5kDreOvjoGnDTjW6j4obE8pzQfCTwh7/GdWrk9d9VVZXP8Swj" +
86
           "Xz1T+uuuFmbhht4XXj0uS9mvvNyxc7T+uwf+fXhorstezesUxX3vYCaV5M1mC4C+Qlio1G4oNgqW" +
87
           "ojnz4mpCgmCoziHCPPveZ3xrd276q5GQ9PHBkVsa1Qvq7HNe9uretqbp3Kvv9O/8JGmxGpsaLdVu" +
88
           "lQqDEymu+1xQj1GPb7jGppztvlmQJs/E1L5Dvo6eHAfUOh2pJiQCyZVaxe+sKHU6Hf+DIP1HgAEA" +
89
           "eZRRni04zkkAAAAASUVORK5CYII="
44
  , params: "source=hp&channel=np"
90
  , params: "source=hp&channel=np"
45
  , links: {
91
  , links: {
46
      advanced: "http://www.google.com/advanced_search"
92
      advanced: "http://www.google.com/advanced_search"
47
    , preferences: "http://www.google.com/preferences"
93
    , preferences: "http://www.google.com/preferences"
48
    }
94
    }
49
  }
95
  }
50
96
51
, "Яндекс":
97
, "Яндекс":
 Lines 193-203   function showSnippets() Link Here 
193
  let randIndex = Math.round(Math.random() * (entries.length - 1));
239
  let randIndex = Math.round(Math.random() * (entries.length - 1));
194
  let entry = entries[randIndex];
240
  let entry = entries[randIndex];
195
  // Inject url in the eventual link.
241
  // Inject url in the eventual link.
196
  if (DEFAULT_SNIPPETS_URLS[randIndex]) {
242
  if (DEFAULT_SNIPPETS_URLS[randIndex]) {
197
    let links = entry.getElementsByTagName("a");
243
    let links = entry.getElementsByTagName("a");
198
    if (links.length != 1)
244
    if (links.length != 1)
199
      return; // Something is messed up in this entry, we support just 1 link.
245
      return; // Something is messed up in this entry, we support just 1 link.
200
    links[0].href = DEFAULT_SNIPPETS_URLS[randIndex];
246
    links[0].href = DEFAULT_SNIPPETS_URLS[randIndex];
247
    defaultSnippetsElt.addEventListener("click", function(aEvent) {
248
      if (aEvent.target.nodeName != "a")
249
        window.location = links[0].href;
250
    }, false);
201
  }
251
  }
202
  entry.hidden = false;
252
  entry.hidden = false;
203
}
253
}
(-)a/browser/base/content/aboutHome.xhtml (-15 / +27 lines)
Line     Link Here 
 Lines 18-33    Link Here 
18
# The Original Code is aboutHome.xhtml.
18
# The Original Code is aboutHome.xhtml.
19
#
19
#
20
# The Initial Developer of the Original Code is the Mozilla Foundation.
20
# The Initial Developer of the Original Code is the Mozilla Foundation.
21
# Portions created by the Initial Developer are Copyright (C) 2010
21
# Portions created by the Initial Developer are Copyright (C) 2010
22
# the Initial Developer. All Rights Reserved.
22
# the Initial Developer. All Rights Reserved.
23
#
23
#
24
# Contributor(s):
24
# Contributor(s):
25
#   Marco Bonardo <mak77@bonardo.net> (original author)
25
#   Marco Bonardo <mak77@bonardo.net> (original author)
26
#   Mihai Sucan <mihai.sucan@gmail.com>
27
#   Stephen Horlander <shorlander@mozilla.com>
26
#
28
#
27
# Alternatively, the contents of this file may be used under the terms of
29
# Alternatively, the contents of this file may be used under the terms of
28
# either the GNU General Public License Version 2 or later (the "GPL"), or
30
# either the GNU General Public License Version 2 or later (the "GPL"), or
29
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30
# in which case the provisions of the GPL or the LGPL are applicable instead
32
# in which case the provisions of the GPL or the LGPL are applicable instead
31
# of those above. If you wish to allow use of your version of this file only
33
# of those above. If you wish to allow use of your version of this file only
32
# under the terms of either the GPL or the LGPL, and not to allow others to
34
# under the terms of either the GPL or the LGPL, and not to allow others to
33
# use your version of this file under the terms of the MPL, indicate your
35
# use your version of this file under the terms of the MPL, indicate your
 Lines 59-95    Link Here 
59
          href="chrome://browser/content/aboutHome.css"/>
61
          href="chrome://browser/content/aboutHome.css"/>
60
62
61
    <script type="text/javascript;version=1.8"
63
    <script type="text/javascript;version=1.8"
62
            src="chrome://browser/content/aboutHome.js"/>
64
            src="chrome://browser/content/aboutHome.js"/>
63
  </head>
65
  </head>
64
66
65
  <body dir="&locale.dir;" onload="onLoad(event)">
67
  <body dir="&locale.dir;" onload="onLoad(event)">
66
    <div id="pageContainer">
68
    <div id="pageContainer">
67
      <div id="topSection">
69
      <div id="brandStart">
68
        <div id="brandStart">
70
        &abouthome.brandStart;
69
          &abouthome.brandStart;
71
      </div>
70
        </div>
72
71
        <div id ="searchContainer">
73
      <div id="searchContainer">
72
          <img id="searchEngineLogo"/>
74
        <form name="searchForm" id="searchForm" onsubmit="onSearchSubmit(event)">
73
          <form name="searchForm" onsubmit="onSearchSubmit(event)">
75
          <div id="searchLogoContainer"><img id="searchEngineLogo" /></div>
74
            <input type="text" name="searchText" value="" id="searchText" maxLength="256"/>
76
          <div id="searchInputContainer">
75
            <input type="submit" value="&abouthome.searchEngineButton.label;"/>
77
            <input type="text" name="searchText" value="" id="searchText" maxLength="256" />
78
          </div>
79
          <div id="searchButtons">
80
            <input id="searchSubmit" type="submit" value="&abouthome.searchEngineButton.label;" />
76
            <span id="searchEngineLinks">
81
            <span id="searchEngineLinks">
77
              <a hidden="true" id="searchEngineAdvancedLink">&abouthome.searchEngineLinks.advanced;</a>
82
              <a hidden="true" id="searchEngineAdvancedLink">&abouthome.searchEngineLinks.advanced;</a>
78
              <a hidden="true" id="searchEngineAdvancedPreferences">&abouthome.searchEngineLinks.preferences;</a>
83
              <a hidden="true" id="searchEngineAdvancedPreferences">&abouthome.searchEngineLinks.preferences;</a>
79
            </span>
84
            </span>
80
          </form>
85
          </div>
86
        </form>
87
      </div>
88
89
      <div id="contentContainer">
90
        <div id="snippetContainer">
91
          <div id="defaultSnippets">
92
            <span hidden="true">&abouthome.defaultSnippet1.v1;</span>
93
            <span hidden="true">&abouthome.defaultSnippet2.v1;</span>
94
          </div>
95
96
          <div id="snippets" hidden="true"/>
81
        </div>
97
        </div>
82
      </div>
98
      </div>
83
      <div id="defaultSnippets">
99
84
        <span hidden="true">&abouthome.defaultSnippet1.v1;</span>
85
        <span hidden="true">&abouthome.defaultSnippet2.v1;</span>
86
      </div>
87
      <div id="snippets" hidden="true"/>
88
      <div id="bottomSection">
100
      <div id="bottomSection">
89
        <div id="aboutMozilla">
101
        <div id="aboutMozilla">
90
          <a href="http://www.mozilla.com/about/">&abouthome.aboutMozilla;</a>
102
          <a href="http://www.mozilla.com/about/">&abouthome.aboutMozilla;</a>
91
        </div>
103
        </div>
92
      </div>
104
      </div>
93
    </div>
105
    </div>
94
  </body>
106
  </body>
95
</html>
107
</html>

Return to bug 627301