mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
refine markdeep.html
This commit is contained in:
parent
8fde5df446
commit
b0147c8c85
4 changed files with 14 additions and 11 deletions
|
@ -1,7 +1,8 @@
|
|||
<style>a{color:inherit;text-decoration:inherit;}</style>
|
||||
<script>
|
||||
if(location.href.endsWith('/')){
|
||||
window.onload=function (){
|
||||
let as=document.getElementsByTagName('a');for(let i=as.length-1;i>=0;i--){let h=as[i].href;if(h.startsWith('file:')&&h.endsWith('.md'))as[i].href=h+'.search';}
|
||||
let as=document.getElementsByTagName('a');for(let i=as.length-1;i>=0;i--){let h=as[i].href;if(h.startsWith('file:')&&h.endsWith('.md'))as[i].onclick=function(){location.href=this.href+'.search';}}
|
||||
}
|
||||
}else{
|
||||
function loadJS(u){
|
||||
|
@ -9,7 +10,9 @@
|
|||
let e=d.createElement('script');e.src=u;
|
||||
d.head.appendChild(e);
|
||||
}
|
||||
window.markdeepOptions = {onload};
|
||||
loadJS("https://casual-effects.com/markdeep/latest/markdeep.min.js?");
|
||||
if(location.href.endsWith('.md.search')){
|
||||
window.markdeepOptions = {onload};
|
||||
loadJS("https://casual-effects.com/markdeep/latest/markdeep.min.js?");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue