Fixed links when running on another host
This commit is contained in:
parent
a8c64767e3
commit
e7063c221f
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
|
@ -46,7 +46,7 @@ func HandleIndex(w http.ResponseWriter, r *http.Request) {
|
|||
<script type="text/javascript">
|
||||
window.goto = (event, fname, search) => {
|
||||
const instance = document.getElementById('instance').value
|
||||
fetch(`+"`http://localhost:13700/jumpto?instance=${instance}&file=${fname}&search=${search}&split=${event.shiftKey ? 'yes' : 'no'}`"+`)
|
||||
fetch(`+"`${location.protocol}//${location.host}/jumpto?instance=${instance}&file=${fname}&search=${search}&split=${event.shiftKey ? 'yes' : 'no'}`"+`)
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue