add custom server support
This commit is contained in:
parent
ca385c3afe
commit
60b3e373a1
1 changed files with 4 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
||||||
var messages = document.getElementById('messages');
|
var messages = document.getElementById('messages');
|
||||||
var form = document.getElementById('form');
|
var form = document.getElementById('form');
|
||||||
var input = document.getElementById('input');
|
var input = document.getElementById('input');
|
||||||
|
const server = new URLSearchParams(document.location.search).get('server') || '/';
|
||||||
|
|
||||||
async function goPage(count) {
|
async function goPage(count) {
|
||||||
let counter = input.value.match(/[^\s]+$/g);
|
let counter = input.value.match(/[^\s]+$/g);
|
||||||
|
@ -42,7 +43,7 @@ async function main(e) {
|
||||||
|
|
||||||
if (!input.value) return false;
|
if (!input.value) return false;
|
||||||
|
|
||||||
let msg = await fetch("/", {
|
let msg = await fetch(server, {
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"headers": {
|
"headers": {
|
||||||
"content-type": "application/json",
|
"content-type": "application/json",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue