提交 | 用户 | age
|
a6a76f
|
1 |
<!DOCTYPE html> |
F |
2 |
<!-- saved from url=(0028)data:text/html,chromewebdata --> |
|
3 |
<html i18n-values="dir:textdirection" subframe="" dir="ltr"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
4 |
<meta charset="utf-8"> |
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, |
|
6 |
maximum-scale=1.0, user-scalable=no"> |
|
7 |
<title i18n-content="title">无法访问 http://s.cpro.baidu.com/s.htm?cproid=0612BF6C2DCE294BDE46EE136B314636&t=1397014439311</title> |
|
8 |
<style>/* Copyright 2013 The Chromium Authors. All rights reserved. |
|
9 |
* Use of this source code is governed by a BSD-style license that can be |
|
10 |
* found in the LICENSE file. */ |
|
11 |
|
|
12 |
body { |
|
13 |
background-color: #E6E6E6; |
|
14 |
font-family: Helvetica, Arial, sans-serif; |
|
15 |
font-size: 10pt; |
|
16 |
margin: 50px 40px 20px 40px; |
|
17 |
} |
|
18 |
|
|
19 |
#main-frame-error { |
|
20 |
margin: auto; |
|
21 |
max-width: 540px; |
|
22 |
min-width: 200px; |
|
23 |
} |
|
24 |
|
|
25 |
/* Don't use the main frame div when the error is in a subframe. */ |
|
26 |
html[subframe] #main-frame-error { |
|
27 |
display: none; |
|
28 |
} |
|
29 |
|
|
30 |
/* Don't use the subframe error div when the error is in a main frame. */ |
|
31 |
html:not([subframe]) #sub-frame-error { |
|
32 |
display: none; |
|
33 |
} |
|
34 |
|
|
35 |
#box { |
|
36 |
background-color: #fbfbfb; |
|
37 |
border: 1px solid #AAA; |
|
38 |
border-bottom: 1px solid #888; |
|
39 |
border-radius: 3px; |
|
40 |
color: black; |
|
41 |
/* Not done on mobile for performance reasons. */ |
|
42 |
box-shadow: 0px 2px 2px #AAA; |
|
43 |
} |
|
44 |
|
|
45 |
#diagnose-button { |
|
46 |
margin-top: 20px; |
|
47 |
margin-bottom: 10px; |
|
48 |
-webkit-margin-start: 0px; |
|
49 |
} |
|
50 |
|
|
51 |
#content-top #buttons, |
|
52 |
#content-top h1 { |
|
53 |
color: #666; |
|
54 |
margin: 10px 0px 25px 0px; |
|
55 |
font-weight: normal; |
|
56 |
font-size: 1.5em; |
|
57 |
text-align: center; |
|
58 |
} |
|
59 |
|
|
60 |
h2 { |
|
61 |
color: #666; |
|
62 |
font-size: 1.2em; |
|
63 |
font-weight: normal; |
|
64 |
margin: 10px 0; |
|
65 |
} |
|
66 |
|
|
67 |
a { |
|
68 |
color: #15c; |
|
69 |
text-decoration: none; |
|
70 |
} |
|
71 |
|
|
72 |
.icon { |
|
73 |
-webkit-user-select: none; |
|
74 |
} |
|
75 |
|
|
76 |
.icon-generic { |
|
77 |
/** |
|
78 |
* Can't access chrome://theme/IDR_ERROR_NETWORK_GENERIC from an untrusted |
|
79 |
* renderer process, so embed the resource manually. |
|
80 |
*/ |
|
81 |
content: -webkit-image-set( |
|
82 |
url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAQAAAD9sOO8AAAASUlEQVR4Xu3SMQoAIAzFUO/o/c+iY4fSSfgQyesgOESHrs9I0j7TEOL9pk5i/OmB/s9IvAYQH6DjxmtTWPEWBcS52zJPIJ4lSRfUZeB1c/cgSwAAAABJRU5ErkJggg==') 1x, |
|
83 |
url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcAQMAAADZIUAbAAAABlBMVEUAAABTU1OoaSf/AAAAAXRSTlMAQObYZgAAAD9JREFUeF7tzrEJACAQQ9EDB8j+2xy4UDaIDqBFDsTmfve6Hw/qhiQbGWQBOGPmHZKLjMBngD4IA/U37Uz4dQsbfVcrD6jzeAAAAABJRU5ErkJggg==') 2x); |
|
84 |
} |
|
85 |
|
|
86 |
.icon-offline { |
|
87 |
content: -webkit-image-set( |
|
88 |
url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAgMAAADXB5lNAAAACVBMVEVTU1P///9TU1P8g2f9AAAAAnRSTlMAAHaTzTgAAAB0SURBVHhe1dMxCgMxDAXRIaVOkXrvs/f79ZwyEGNITKwUgcBOZR4upEKcSxeCmSrAFko1r5Cv4J8A6EGzgwLQQAdHD5ljbUFU08Gz8AOwgWX1HlBNC6WyBVWMOBpq5C2pz3ALUIGsP1ZAKtznmxoAAtc5wgegV/QjpyQHeQAAAABJRU5ErkJggg==') 1x, |
|
89 |
url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACAAgMAAAC+UIlYAAAACVBMVEVTU1P///9TU1P8g2f9AAAAAnRSTlMAAHaTzTgAAACFSURBVHhe7dY9CoBADITRqfd+XnJOKco6EC32h4VRzFdEMK9II4it0fdAggT3WEPNAKjmAfxA2UEC7QzA/mHxcaMNFDoBz6k8gNqT8IAQ8FeAtQBTAG4QBWxAAgZALY5xPkNtoARiYwDAWlDYC+pl1FBNoFYBXqOMAF0ooPed4G2/7gkS7LQn0KpfZWb2AAAAAElFTkSuQmCC') 2x); |
|
90 |
} |
|
91 |
|
|
92 |
#content-top { |
|
93 |
margin: 20px 20px 20px 25px; |
|
94 |
} |
|
95 |
|
|
96 |
#help-box-outer { |
|
97 |
overflow: hidden; |
|
98 |
-webkit-transition: height ease-in 218ms; |
|
99 |
} |
|
100 |
|
|
101 |
#help-box-inner { |
|
102 |
background-color: #f9f9f9; |
|
103 |
border-top: 1px solid #EEE; |
|
104 |
color: #444; |
|
105 |
padding: 25px 20px; |
|
106 |
text-align: start; |
|
107 |
} |
|
108 |
|
|
109 |
#suggestions { |
|
110 |
margin-top: 15px; |
|
111 |
} |
|
112 |
|
|
113 |
#sub-frame-error-details { |
|
114 |
color: #8F8F8F; |
|
115 |
/* Not done on mobile for performance reasons. */ |
|
116 |
text-shadow: 0 1px 0 rgba(255,255,255,0.3); |
|
117 |
} |
|
118 |
|
|
119 |
[jscontent=failedUrl] { |
|
120 |
overflow-wrap: break-word; |
|
121 |
} |
|
122 |
|
|
123 |
button { |
|
124 |
border: 1px solid rgba(0, 0, 0, 0.25); |
|
125 |
border-radius: 2px; |
|
126 |
color: #444; |
|
127 |
margin: 0px 5px; |
|
128 |
min-height: 29px; |
|
129 |
min-width: 65px; |
|
130 |
-webkit-user-select: none; |
|
131 |
padding: 8px 13px; |
|
132 |
/* iOS does not support linear-gradient without a prefix. */ |
|
133 |
background-image: -webkit-linear-gradient(#ededed, #ededed 38%, #dedede); |
|
134 |
text-shadow: 0 1px 0 rgb(240, 240, 240); |
|
135 |
|
|
136 |
/* Not done on mobile for performance reasons. */ |
|
137 |
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75); |
|
138 |
} |
|
139 |
|
|
140 |
button:hover { |
|
141 |
border: 1px solid rgba(0, 0, 0, 0.3); |
|
142 |
color: #000; |
|
143 |
background-image: -webkit-linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0); |
|
144 |
|
|
145 |
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.95); |
|
146 |
} |
|
147 |
|
|
148 |
button:active { |
|
149 |
border: 1px solid rgba(0, 0, 0, 0.3); |
|
150 |
color: #444; |
|
151 |
background-image: -webkit-linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7); |
|
152 |
|
|
153 |
box-shadow: none; |
|
154 |
} |
|
155 |
|
|
156 |
#reload-button { |
|
157 |
color: #fff; |
|
158 |
background-image: -webkit-linear-gradient(#5d9aff, #5d9aff 38%, #5891f0); |
|
159 |
border: 1px solid rgba(45, 102, 195, 1); |
|
160 |
text-shadow: 0 1px 0 rgba(0,0,0,0.5); |
|
161 |
|
|
162 |
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.2); |
|
163 |
} |
|
164 |
|
|
165 |
#reload-button:hover { |
|
166 |
background-image: -webkit-linear-gradient(#659efd, #659efd 38%, #6097f1); |
|
167 |
border: 1px solid rgba(45, 102, 195, 1); |
|
168 |
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.2); |
|
169 |
} |
|
170 |
|
|
171 |
#reload-button:active { |
|
172 |
background-image: -webkit-linear-gradient(#6095ed, #6095ed 38%, #6095ed); |
|
173 |
border: 1px solid rgb(38, 84, 160); |
|
174 |
|
|
175 |
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); |
|
176 |
} |
|
177 |
|
|
178 |
.hidden { |
|
179 |
display: none; |
|
180 |
} |
|
181 |
|
|
182 |
.suggestions { |
|
183 |
margin-top: 18px; |
|
184 |
} |
|
185 |
|
|
186 |
.suggestion-header { |
|
187 |
font-weight: bold; |
|
188 |
margin-bottom: 4px; |
|
189 |
} |
|
190 |
|
|
191 |
.suggestion-body { |
|
192 |
color: #777; |
|
193 |
} |
|
194 |
|
|
195 |
.error-code { |
|
196 |
color: #A0A0A0; |
|
197 |
margin-top: 15px; |
|
198 |
} |
|
199 |
|
|
200 |
/* Increase line height at higher resolutions. */ |
|
201 |
@media (min-width: 641px) and (min-height: 641px) { |
|
202 |
#help-box-inner { |
|
203 |
line-height: 18px; |
|
204 |
} |
|
205 |
} |
|
206 |
|
|
207 |
/* Decrease padding at low sizes. */ |
|
208 |
@media (max-width: 640px), (max-height: 640px) { |
|
209 |
body { |
|
210 |
margin: 15px; |
|
211 |
} |
|
212 |
h1 { |
|
213 |
margin: 10px 0px 15px 0px; |
|
214 |
} |
|
215 |
#content-top { |
|
216 |
margin: 15px; |
|
217 |
} |
|
218 |
#help-box-inner { |
|
219 |
padding: 20px; |
|
220 |
} |
|
221 |
.suggestions { |
|
222 |
margin-top: 10px; |
|
223 |
} |
|
224 |
.suggestion-header { |
|
225 |
margin-bottom: 0px; |
|
226 |
} |
|
227 |
.error-code { |
|
228 |
margin-top: 10px; |
|
229 |
} |
|
230 |
} |
|
231 |
|
|
232 |
/* Don't allow overflow when in a subframe. */ |
|
233 |
html[subframe] body { |
|
234 |
overflow: hidden; |
|
235 |
} |
|
236 |
|
|
237 |
#sub-frame-error { |
|
238 |
-webkit-align-items: center; |
|
239 |
background-color: #DDD; |
|
240 |
display: -webkit-flex; |
|
241 |
-webkit-flex-flow: column; |
|
242 |
height: 100%; |
|
243 |
-webkit-justify-content: center; |
|
244 |
left: 0px; |
|
245 |
position: absolute; |
|
246 |
top: 0px; |
|
247 |
width: 100%; |
|
248 |
} |
|
249 |
|
|
250 |
#sub-frame-error:hover { |
|
251 |
background-color: #EEE; |
|
252 |
} |
|
253 |
|
|
254 |
#sub-frame-error-details { |
|
255 |
margin: 0 10px; |
|
256 |
visibility: hidden; |
|
257 |
} |
|
258 |
|
|
259 |
/* Show details only when hovering. */ |
|
260 |
#sub-frame-error:hover #sub-frame-error-details { |
|
261 |
visibility: visible; |
|
262 |
} |
|
263 |
|
|
264 |
/* If the iframe is too small, always hide the error code. */ |
|
265 |
/* TODO(mmenke): See if overflow: no-display works better, once supported. */ |
|
266 |
@media (max-width: 200px), (max-height: 95px) { |
|
267 |
#sub-frame-error-details { |
|
268 |
display: none; |
|
269 |
} |
|
270 |
} |
|
271 |
</style> |
|
272 |
<script>// Copyright 2013 The Chromium Authors. All rights reserved. |
|
273 |
// Use of this source code is governed by a BSD-style license that can be |
|
274 |
// found in the LICENSE file. |
|
275 |
|
|
276 |
function toggleHelpBox() { |
|
277 |
var helpBoxOuter = document.getElementById('help-box-outer'); |
|
278 |
helpBoxOuter.classList.toggle('hidden'); |
|
279 |
var moreLessButton = document.getElementById('more-less-button'); |
|
280 |
if (helpBoxOuter.classList.contains('hidden')) { |
|
281 |
moreLessButton.innerText = moreLessButton.moreText; |
|
282 |
} else { |
|
283 |
moreLessButton.innerText = moreLessButton.lessText; |
|
284 |
} |
|
285 |
} |
|
286 |
|
|
287 |
function diagnoseErrors() { |
|
288 |
var extension_id = "idddmepepmjcgiedknnmlbadcokidhoa"; |
|
289 |
var diagnose_frame = document.getElementById('diagnose-frame'); |
|
290 |
diagnose_frame.innerHTML = |
|
291 |
'<iframe src="chrome-extension://' + extension_id + |
|
292 |
'/index.html"></iframe>'; |
|
293 |
} |
|
294 |
|
|
295 |
// Subframes use a different layout but the same html file. This is to make it |
|
296 |
// easier to support platforms that load the error page via different |
|
297 |
// mechanisms (Currently just iOS). |
|
298 |
if (window.top.location != window.location) |
|
299 |
document.documentElement.setAttribute('subframe', ''); |
|
300 |
|
|
301 |
// Re-renders the error page using |strings| as the dictionary of values. |
|
302 |
// Used by NetErrorTabHelper to update DNS error pages with probe results. |
|
303 |
function updateForDnsProbe(strings) { |
|
304 |
i18nTemplate.process(document, strings); |
|
305 |
var context = new JsEvalContext(strings); |
|
306 |
jstProcess(context, document.getElementById('t')); |
|
307 |
} |
|
308 |
|
|
309 |
// Given the classList property of an element, adds an icon class to the list |
|
310 |
// and removes the previously- |
|
311 |
function updateIconClass(classList, newClass) { |
|
312 |
var oldClass; |
|
313 |
|
|
314 |
if (classList.hasOwnProperty('last_icon_class')) { |
|
315 |
oldClass = classList['last_icon_class'] |
|
316 |
if (oldClass == newClass) |
|
317 |
return; |
|
318 |
} |
|
319 |
|
|
320 |
classList.add(newClass); |
|
321 |
if (oldClass !== undefined) |
|
322 |
classList.remove(oldClass); |
|
323 |
|
|
324 |
classList['last_icon_class'] = newClass; |
|
325 |
} |
|
326 |
|
|
327 |
|
|
328 |
</script> |
|
329 |
</head> |
|
330 |
<body id="t" jstcache="0"> |
|
331 |
<div id="main-frame-error" jstcache="0"> |
|
332 |
<div id="box" jstcache="0"> |
|
333 |
<div id="content-top" jstcache="0"> |
|
334 |
<h1 jstcache="0"> |
|
335 |
<div jstcache="0"> |
|
336 |
<img class="icon icon-generic" jseval="updateIconClass(this.classList, iconClass)" jstcache="9"> |
|
337 |
</div> |
|
338 |
<span i18n-content="heading" jstcache="0">无法显示此网页</span> |
|
339 |
</h1> |
|
340 |
<div id="buttons" jstcache="0"> |
|
341 |
<button id="reload-button" onclick="location = this.url" jsselect="reload" jsvalues=".url:reloadUrl" jscontent="msg" jstcache="3">重新加载</button> |
|
342 |
<button id="more-less-button" onclick="toggleHelpBox()" jsdisplay="more" jsvalues=".moreText:more; .lessText:less;" jscontent="more" jstcache="4">更多</button> |
|
343 |
</div> |
|
344 |
</div> |
|
345 |
<!-- Outer and inner divs are needed both for margins and sizing. --> |
|
346 |
<div id="help-box-outer" class="hidden" jstcache="0"> |
|
347 |
<div id="help-box-inner" jstcache="0"> |
|
348 |
<div jsselect="summary" jstcache="5"> |
|
349 |
<span jsvalues=".innerHTML:msg" jstcache="10">与 <strong jscontent="hostName" jstcache="13">s.cpro.baidu.com</strong> 的连接已中断。</span> |
|
350 |
</div> |
|
351 |
<div class="suggestions" jsselect="suggestions" jstcache="6" jsinstance="0"> |
|
352 |
<div class="suggestion-header" jsvalues=".innerHTML:header" jstcache="11">检查您的互联网连接状况。</div> |
|
353 |
<div class="suggestion-body" jsvalues=".innerHTML:body" jstcache="12">请检查您的网线是否插好,并重新启动您在使用的任何路由器、调制解调器或其他网络设备。</div> |
|
354 |
</div><div class="suggestions" jsselect="suggestions" jstcache="6" jsinstance="1"> |
|
355 |
<div class="suggestion-header" jsvalues=".innerHTML:header" jstcache="11">对防火墙或防病毒软件进行设置,以允许 Chrome 访问该网络。</div> |
|
356 |
<div class="suggestion-body" jsvalues=".innerHTML:body" jstcache="12">如果它已被列为允许访问网络的程序,请尝试将其从列表中删除,然后再重新添加。</div> |
|
357 |
</div><div class="suggestions" jsselect="suggestions" jstcache="6" jsinstance="*2"> |
|
358 |
<div class="suggestion-header" jsvalues=".innerHTML:header" jstcache="11">如果您使用代理服务器…</div> |
|
359 |
<div class="suggestion-body" jsvalues=".innerHTML:body" jstcache="12">请检查您的代理设置,或与网络管理员联系以核实代理服务器是否运转正常。如果您认为自己使用的不是代理服务器,请执行以下操作: |
|
360 |
依次转到 Chrome 菜单 >“<span jscontent="settingsTitle" jstcache="14">设置</span>”>“<span jscontent="advancedTitle" jstcache="15">显示高级设置...</span>”>“<span jscontent="proxyTitle" jstcache="16">更改代理服务器设置...</span>”>“LAN 设置”,然后取消选中“为 LAN 使用代理服务器”。</div> |
|
361 |
</div> |
|
362 |
<button id="diagnose-button" onclick="diagnoseErrors()" jscontent="diagnose" jsdisplay="diagnose" jstcache="7" style="display: none;"></button> |
|
363 |
<div id="diagnose-frame" class="hidden" jstcache="0"></div> |
|
364 |
<div class="error-code" jscontent="errorCode" jstcache="8">错误代码:ERR_CONNECTION_RESET</div> |
|
365 |
</div> |
|
366 |
</div> |
|
367 |
</div> |
|
368 |
</div> |
|
369 |
<div id="sub-frame-error" jstcache="0"> |
|
370 |
<!-- Show details when hovering over the icon, in case the details are |
|
371 |
hidden because they're too large. --> |
|
372 |
<img class="icon icon-generic" jseval="updateIconClass(this.classList, iconClass)" jsvalues=".title:errorDetails" jstcache="1" title="连接已重置。"> |
|
373 |
<div id="sub-frame-error-details" jsvalues=".innerHTML:errorDetails" jstcache="2">连接已重置。</div> |
|
374 |
</div> |
|
375 |
|
|
376 |
|
|
377 |
<script jstcache="0">// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
|
378 |
// Use of this source code is governed by a BSD-style license that can be |
|
379 |
// found in the LICENSE file. |
|
380 |
|
|
381 |
/** |
|
382 |
* NOTE: The use of this file is deprecated. Use i18n_template2.js instead. |
|
383 |
* |
|
384 |
* @fileoverview This is a simple template engine inspired by JsTemplates |
|
385 |
* optimized for i18n. |
|
386 |
* |
|
387 |
* It currently supports two handlers: |
|
388 |
* |
|
389 |
* * i18n-content which sets the textContent of the element |
|
390 |
* |
|
391 |
* <span i18n-content="myContent"></span> |
|
392 |
* i18nTemplate.process(element, {'myContent': 'Content'}); |
|
393 |
* |
|
394 |
* * i18n-values is a list of attribute-value or property-value pairs. |
|
395 |
* Properties are prefixed with a '.' and can contain nested properties. |
|
396 |
* |
|
397 |
* <span i18n-values="title:myTitle;.style.fontSize:fontSize"></span> |
|
398 |
* i18nTemplate.process(element, { |
|
399 |
* 'myTitle': 'Title', |
|
400 |
* 'fontSize': '13px' |
|
401 |
* }); |
|
402 |
*/ |
|
403 |
|
|
404 |
var i18nTemplate = (function() { |
|
405 |
/** |
|
406 |
* This provides the handlers for the templating engine. The key is used as |
|
407 |
* the attribute name and the value is the function that gets called for every |
|
408 |
* single node that has this attribute. |
|
409 |
* @type {Object} |
|
410 |
*/ |
|
411 |
var handlers = { |
|
412 |
/** |
|
413 |
* This handler sets the textContent of the element. |
|
414 |
*/ |
|
415 |
'i18n-content': function(element, attributeValue, obj) { |
|
416 |
element.textContent = obj[attributeValue]; |
|
417 |
}, |
|
418 |
|
|
419 |
/** |
|
420 |
* This handler adds options to a select element. |
|
421 |
*/ |
|
422 |
'i18n-options': function(element, attributeValue, obj) { |
|
423 |
var options = obj[attributeValue]; |
|
424 |
options.forEach(function(values) { |
|
425 |
var option = typeof values == 'string' ? new Option(values) : |
|
426 |
new Option(values[1], values[0]); |
|
427 |
element.appendChild(option); |
|
428 |
}); |
|
429 |
}, |
|
430 |
|
|
431 |
/** |
|
432 |
* This is used to set HTML attributes and DOM properties,. The syntax is: |
|
433 |
* attributename:key; |
|
434 |
* .domProperty:key; |
|
435 |
* .nested.dom.property:key |
|
436 |
*/ |
|
437 |
'i18n-values': function(element, attributeValue, obj) { |
|
438 |
var parts = attributeValue.replace(/\s/g, '').split(/;/); |
|
439 |
for (var j = 0; j < parts.length; j++) { |
|
440 |
var a = parts[j].match(/^([^:]+):(.+)$/); |
|
441 |
if (a) { |
|
442 |
var propName = a[1]; |
|
443 |
var propExpr = a[2]; |
|
444 |
|
|
445 |
// Ignore missing properties |
|
446 |
if (propExpr in obj) { |
|
447 |
var value = obj[propExpr]; |
|
448 |
if (propName.charAt(0) == '.') { |
|
449 |
var path = propName.slice(1).split('.'); |
|
450 |
var object = element; |
|
451 |
while (object && path.length > 1) { |
|
452 |
object = object[path.shift()]; |
|
453 |
} |
|
454 |
if (object) { |
|
455 |
object[path] = value; |
|
456 |
// In case we set innerHTML (ignoring others) we need to |
|
457 |
// recursively check the content |
|
458 |
if (path == 'innerHTML') { |
|
459 |
process(element, obj); |
|
460 |
} |
|
461 |
} |
|
462 |
} else { |
|
463 |
element.setAttribute(propName, value); |
|
464 |
} |
|
465 |
} else { |
|
466 |
console.warn('i18n-values: Missing value for "' + propExpr + '"'); |
|
467 |
} |
|
468 |
} |
|
469 |
} |
|
470 |
} |
|
471 |
}; |
|
472 |
|
|
473 |
var attributeNames = []; |
|
474 |
for (var key in handlers) { |
|
475 |
attributeNames.push(key); |
|
476 |
} |
|
477 |
var selector = '[' + attributeNames.join('],[') + ']'; |
|
478 |
|
|
479 |
/** |
|
480 |
* Processes a DOM tree with the {@code obj} map. |
|
481 |
*/ |
|
482 |
function process(node, obj) { |
|
483 |
var elements = node.querySelectorAll(selector); |
|
484 |
for (var element, i = 0; element = elements[i]; i++) { |
|
485 |
for (var j = 0; j < attributeNames.length; j++) { |
|
486 |
var name = attributeNames[j]; |
|
487 |
var att = element.getAttribute(name); |
|
488 |
if (att != null) { |
|
489 |
handlers[name](element, att, obj); |
|
490 |
} |
|
491 |
} |
|
492 |
} |
|
493 |
} |
|
494 |
|
|
495 |
return { |
|
496 |
process: process |
|
497 |
}; |
|
498 |
})(); |
|
499 |
</script><script jstcache="0">// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
500 |
// Use of this source code is governed by a BSD-style license that can be |
|
501 |
// found in the LICENSE file. |
|
502 |
|
|
503 |
(function(){var i=null;function k(){return Function.prototype.call.apply(Array.prototype.slice,arguments)}function l(a,b){var c=k(arguments,2);return function(){return b.apply(a,c)}}function m(a,b){var c=new n(b);for(c.f=[a];c.f.length;){var e=c,d=c.f.shift();e.g(d);for(d=d.firstChild;d;d=d.nextSibling)d.nodeType==1&&e.f.push(d)}}function n(a){this.g=a}function o(a){a.style.display=""}function p(a){a.style.display="none"};var q=":",r=/\s*;\s*/;function s(){this.i.apply(this,arguments)}s.prototype.i=function(a,b){if(!this.a)this.a={};if(b){var c=this.a,e=b.a,d;for(d in e)c[d]=e[d]}else for(c in d=this.a,e=t,e)d[c]=e[c];this.a.$this=a;this.a.$context=this;this.d=typeof a!="undefined"&&a!=i?a:"";if(!b)this.a.$top=this.d};var t={$default:i},u=[];function v(a){for(var b in a.a)delete a.a[b];a.d=i;u.push(a)}function w(a,b,c){try{return b.call(c,a.a,a.d)}catch(e){return t.$default}} |
|
504 |
function x(a,b,c,e){if(u.length>0){var d=u.pop();s.call(d,b,a);a=d}else a=new s(b,a);a.a.$index=c;a.a.$count=e;return a}var y="a_",z="b_",A="with (a_) with (b_) return ",D={};function E(a){if(!D[a])try{D[a]=new Function(y,z,A+a)}catch(b){}return D[a]}function F(a){for(var b=[],a=a.split(r),c=0,e=a.length;c<e;++c){var d=a[c].indexOf(q);if(!(d<0)){var f;f=a[c].substr(0,d).replace(/^\s+/,"").replace(/\s+$/,"");d=E(a[c].substr(d+1));b.push(f,d)}}return b};var G="jsinstance",H="jsts",I="*",J="div",K="id";function L(){}var M=0,N={0:{}},P={},Q={},R=[];function S(a){a.__jstcache||m(a,function(a){T(a)})}var U=[["jsselect",E],["jsdisplay",E],["jsvalues",F],["jsvars",F],["jseval",function(a){for(var b=[],a=a.split(r),c=0,e=a.length;c<e;++c)if(a[c]){var d=E(a[c]);b.push(d)}return b}],["transclude",function(a){return a}],["jscontent",E],["jsskip",E]]; |
|
505 |
function T(a){if(a.__jstcache)return a.__jstcache;var b=a.getAttribute("jstcache");if(b!=i)return a.__jstcache=N[b];for(var b=R.length=0,c=U.length;b<c;++b){var e=U[b][0],d=a.getAttribute(e);Q[e]=d;d!=i&&R.push(e+"="+d)}if(R.length==0)return a.setAttribute("jstcache","0"),a.__jstcache=N[0];var f=R.join("&");if(b=P[f])return a.setAttribute("jstcache",b),a.__jstcache=N[b];for(var h={},b=0,c=U.length;b<c;++b){var d=U[b],e=d[0],g=d[1],d=Q[e];d!=i&&(h[e]=g(d))}b=""+ ++M;a.setAttribute("jstcache",b);N[b]= |
|
506 |
h;P[f]=b;return a.__jstcache=h}function V(a,b){a.h.push(b);a.k.push(0)}function W(a){return a.c.length?a.c.pop():[]} |
|
507 |
L.prototype.e=function(a,b){var c=X(b),e=c.transclude;if(e)(c=Y(e))?(b.parentNode.replaceChild(c,b),e=W(this),e.push(this.e,a,c),V(this,e)):b.parentNode.removeChild(b);else if(c=c.jsselect){var c=w(a,c,b),d=b.getAttribute(G),f=!1;d&&(d.charAt(0)==I?(d=parseInt(d.substr(1),10),f=!0):d=parseInt(d,10));var h=c!=i&&typeof c=="object"&&typeof c.length=="number",e=h?c.length:1,g=h&&e==0;if(h)if(g)d?b.parentNode.removeChild(b):(b.setAttribute(G,"*0"),p(b));else if(o(b),d===i||d===""||f&&d<e-1){f=W(this); |
|
508 |
d=d||0;for(h=e-1;d<h;++d){var j=b.cloneNode(!0);b.parentNode.insertBefore(j,b);Z(j,c,d);g=x(a,c[d],d,e);f.push(this.b,g,j,v,g,i)}Z(b,c,d);g=x(a,c[d],d,e);f.push(this.b,g,b,v,g,i);V(this,f)}else d<e?(f=c[d],Z(b,c,d),g=x(a,f,d,e),f=W(this),f.push(this.b,g,b,v,g,i),V(this,f)):b.parentNode.removeChild(b);else c==i?p(b):(o(b),g=x(a,c,0,1),f=W(this),f.push(this.b,g,b,v,g,i),V(this,f))}else this.b(a,b)}; |
|
509 |
L.prototype.b=function(a,b){var c=X(b),e=c.jsdisplay;if(e){if(!w(a,e,b)){p(b);return}o(b)}if(e=c.jsvars)for(var d=0,f=e.length;d<f;d+=2){var h=e[d],g=w(a,e[d+1],b);a.a[h]=g}if(e=c.jsvalues){d=0;for(f=e.length;d<f;d+=2)if(g=e[d],h=w(a,e[d+1],b),g.charAt(0)=="$")a.a[g]=h;else if(g.charAt(0)=="."){for(var g=g.substr(1).split("."),j=b,O=g.length,B=0,$=O-1;B<$;++B){var C=g[B];j[C]||(j[C]={});j=j[C]}j[g[O-1]]=h}else g&&(typeof h=="boolean"?h?b.setAttribute(g,g):b.removeAttribute(g):b.setAttribute(g,""+ |
|
510 |
h))}if(e=c.jseval){d=0;for(f=e.length;d<f;++d)w(a,e[d],b)}e=c.jsskip;if(!e||!w(a,e,b))if(c=c.jscontent){if(c=""+w(a,c,b),b.innerHTML!=c){for(;b.firstChild;)e=b.firstChild,e.parentNode.removeChild(e);b.appendChild(this.j.createTextNode(c))}}else{c=W(this);for(e=b.firstChild;e;e=e.nextSibling)e.nodeType==1&&c.push(this.e,a,e);c.length&&V(this,c)}};function X(a){if(a.__jstcache)return a.__jstcache;var b=a.getAttribute("jstcache");if(b)return a.__jstcache=N[b];return T(a)} |
|
511 |
function Y(a,b){var c=document;if(b){var e=c.getElementById(a);if(!e){var e=b(),d=H,f=c.getElementById(d);if(!f)f=c.createElement(J),f.id=d,p(f),f.style.position="absolute",c.body.appendChild(f);d=c.createElement(J);f.appendChild(d);d.innerHTML=e;e=c.getElementById(a)}c=e}else c=c.getElementById(a);return c?(S(c),c=c.cloneNode(!0),c.removeAttribute(K),c):i}function Z(a,b,c){c==b.length-1?a.setAttribute(G,I+c):a.setAttribute(G,""+c)};window.jstGetTemplate=Y;window.JsEvalContext=s;window.jstProcess=function(a,b){var c=new L;S(b);c.j=b?b.nodeType==9?b:b.ownerDocument||document:document;var e=l(c,c.e,a,b),d=c.h=[],f=c.k=[];c.c=[];e();for(var h,g,j;d.length;)h=d[d.length-1],e=f[f.length-1],e>=h.length?(e=c,g=d.pop(),g.length=0,e.c.push(g),f.pop()):(g=h[e++],j=h[e++],h=h[e++],f[f.length-1]=e,g.call(c,j,h))}; |
|
512 |
})() |
|
513 |
</script><script jstcache="0">var templateData = {"errorCode":"错误代码:ERR_CONNECTION_RESET","errorDetails":"连接已重置。","heading":"无法显示此网页","iconClass":"icon-generic","less":"收起","more":"更多","reload":{"msg":"重新加载","reloadUrl":"http://s.cpro.baidu.com/s.htm?cproid=0612BF6C2DCE294BDE46EE136B314636&t=1397014439311"},"suggestions":[{"body":"请检查您的网线是否插好,并重新启动您在使用的任何路由器、调制解调器或其他网络设备。","header":"检查您的互联网连接状况。"},{"body":"如果它已被列为允许访问网络的程序,请尝试将其从列表中删除,然后再重新添加。","header":"对防火墙或防病毒软件进行设置,以允许 Chrome 访问该网络。"},{"advancedTitle":"显示高级设置...","body":"请检查您的代理设置,或与网络管理员联系以核实代理服务器是否运转正常。如果您认为自己使用的不是代理服务器,请执行以下操作:\n 依次转到 Chrome 菜单 >“\u003Cspan jscontent=\"settingsTitle\">\u003C/span>”>“\u003Cspan jscontent=\"advancedTitle\">\u003C/span>”>“\u003Cspan jscontent=\"proxyTitle\">\u003C/span>”>“LAN 设置”,然后取消选中“为 LAN 使用代理服务器”。","header":"如果您使用代理服务器…","proxyTitle":"更改代理服务器设置...","settingsTitle":"设置"}],"summary":{"failedUrl":"http://s.cpro.baidu.com/s.htm?cproid=0612BF6C2DCE294BDE46EE136B314636&t=1397014439311","hostName":"s.cpro.baidu.com","msg":"与 \u003Cstrong jscontent=\"hostName\">\u003C/strong> 的连接已中断。","productName":"Google Chrome"},"textdirection":"ltr","title":"无法访问 http://s.cpro.baidu.com/s.htm?cproid=0612BF6C2DCE294BDE46EE136B314636&t=1397014439311"};</script><script jstcache="0">// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
|
514 |
// Use of this source code is governed by a BSD-style license that can be |
|
515 |
// found in the LICENSE file. |
|
516 |
|
|
517 |
// Invoke the template engine previously loaded from i18n_template.js |
|
518 |
i18nTemplate.process(document, templateData); |
|
519 |
</script><script jstcache="0">var tp = document.getElementById('t');jstProcess(new JsEvalContext(templateData), tp);</script></body></html> |