File tree 3 files changed +36
-5
lines changed
3 files changed +36
-5
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
+ < title > Failed to load page</ title >
7
+ < link rel ="stylesheet " href ="../styles.css ">
8
+ </ head >
9
+ < body >
10
+ < style >
11
+ * {
12
+ margin : 0 !important ;
13
+ }
14
+ div {
15
+ margin-left : 48pt !important ;
16
+ margin-top : 48pt !important ;
17
+ }
18
+ </ style >
19
+ < div id ="title ">
20
+ < h1 > This page could not be loaded.</ h1 >
21
+ < p > This could be caused by the following:</ p >
22
+ </ div >
23
+ < div id ="list ">
24
+ < ul >
25
+ < li > No internet connection.</ li >
26
+ < li > Bad network connection.</ li >
27
+ < li > The page is down.</ li >
28
+ < li > The URL was not typed correctly.</ li >
29
+ < li > Your computer has invalid DNS settings.</ li >
30
+ </ ul >
31
+ </ div >
32
+ </ body >
33
+ </ html >
Original file line number Diff line number Diff line change @@ -78,11 +78,6 @@ function loadURL(url, scheck='true') {
78
78
return ;
79
79
}
80
80
view . src = url ;
81
- view . addEventListener ( 'did-fail-load' , ( ) => {
82
- view . src = 'home.html' ;
83
- alert ( `Failed to load page ${ url } ` ) ;
84
- return ;
85
- } ) ;
86
81
}
87
82
removeChildren ( suggestionsEl ) ;
88
83
view . addEventListener ( 'did-finish-load' , ( ) => {
Original file line number Diff line number Diff line change @@ -144,6 +144,9 @@ function addListeners(view, hash) {
144
144
tab . getElementsByTagName ( 'img' ) [ 0 ] . style . display = 'none' ;
145
145
}
146
146
} ) ;
147
+ view . addEventListener ( 'did-fail-load' , ( e ) => {
148
+ view . src = './fail.html'
149
+ } ) ;
147
150
}
148
151
149
152
function removeTab ( ) {
You can’t perform that action at this time.
0 commit comments