Skip to content
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

Commit 7b24132

Browse files
committed
URL check
1 parent 5e1e81a commit 7b24132

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

build/_includes/header.html

+10-16
Original file line numberDiff line numberDiff line change
@@ -94,23 +94,17 @@
9494
if ((result.length > 0) && (event.target.id) && (result != event.target.id)) {
9595
targetURL = event.target.id;
9696
url = url.replace(result, targetURL);
97-
// debugger;
98-
// $.ajax({
99-
// type: 'HEAD',
100-
// url: url,
101-
// success: function(){
102-
// window.location.replace(url);
97+
$.ajax({
98+
type: 'HEAD',
99+
url: url,
100+
success: function(){
101+
window.location.replace(url);
103102
window.location.href = url;
104-
// },
105-
// error: function(err) {
106-
// console.log("request error");
107-
// console.log(err);
108-
// console.log("---------------");
109-
// console.log(err.toString());
110-
// debugger;
111-
// window.location.replace(targetURL);
112-
// }
113-
// });
103+
},
104+
error: function(err) {
105+
window.location.href=targetURL;
106+
}
107+
});
114108
} else {
115109
console.log("Error: no targetURL")
116110
}

0 commit comments

Comments
 (0)