Skip to content

Commit 6ffcebc

Browse files
committed
fix: make view source smarter
1 parent 6a5b4e4 commit 6ffcebc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/h5utils.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ addEvent(window, 'click', function (event) {
4848

4949
document.body.appendChild(pre);
5050
// really need to be sync? - I like to think so
51-
xhr.open("GET", window.location, true);
51+
xhr.open("GET", location.origin + '/demo' + window.location.pathname + '.html', true);
5252
xhr.send();
5353
}
5454
document.body.className = 'view-source';
55-
55+
5656
var sourceTimer = setInterval(function () {
5757
if (window.location.hash != '#view-source') {
5858
clearInterval(sourceTimer);
@@ -61,5 +61,5 @@ addEvent(window, 'click', function (event) {
6161
}, 200);
6262
}
6363
});
64-
64+
6565
})();

0 commit comments

Comments
 (0)