Skip to content
Permalink
Browse files
fix: ./ link does not work ad expected when open html as local file.
  • Loading branch information
h13i32maru committed May 24, 2015
1 parent 6068774 commit 97f47cf8a8e90cdd6066417fbe9ce835e8a370c8
@@ -41,5 +41,6 @@
<script src="script/inherited-summary.js"></script>
<script src="script/test-summary.js"></script>
<script src="script/inner-link.js"></script>
<script src="script/patch-for-local.js"></script>
</body>
</html>
@@ -0,0 +1,8 @@
(function(){
if (location.protocol === 'file:') {
var elms = document.querySelectorAll('a[href="./"]');
for (var i = 0; i < elms.length; i++) {
elms[i].href = './index.html';
}
}
})();

0 comments on commit 97f47cf

Please sign in to comment.