mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Colab fix
This commit is contained in:
@@ -338,15 +338,13 @@
|
|||||||
});
|
});
|
||||||
if (response.ok === true) {
|
if (response.ok === true) {
|
||||||
const getData = await response.json();
|
const getData = await response.json();
|
||||||
is_colab = getData.is_colab;
|
if(getData.colaburl != false){
|
||||||
if(is_colab != false){
|
is_colab = true;
|
||||||
var currentUrl = window.location.href;
|
|
||||||
if (currentUrl.charAt(currentUrl.length - 1) === '/') {
|
$('#api_url_text').val(String(getData.colaburl).trim());
|
||||||
currentUrl = currentUrl.substring(0, currentUrl.length - 1);
|
setTimeout(function() {
|
||||||
currentUrl+=':80808';
|
$('#api_button').click();
|
||||||
}
|
}, 3000);
|
||||||
$('#api_url_text').val(currentUrl);
|
|
||||||
$('#api_button').click();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -503,10 +503,10 @@ app.post("/getbackgrounds", jsonParser, function(request, response){
|
|||||||
});
|
});
|
||||||
app.post("/iscolab", jsonParser, function(request, response){
|
app.post("/iscolab", jsonParser, function(request, response){
|
||||||
let send_data = false;
|
let send_data = false;
|
||||||
if(String(process.env.colaburl).trim() !== undefined){
|
if(process.env.colaburl !== undefined){
|
||||||
send_data = String(process.env.colaburl).trim();
|
send_data = String(process.env.colaburl).trim();
|
||||||
}
|
}
|
||||||
response.send({is_colab:send_data});
|
response.send({colaburl:send_data});
|
||||||
|
|
||||||
});
|
});
|
||||||
app.post("/getuseravatars", jsonParser, function(request, response){
|
app.post("/getuseravatars", jsonParser, function(request, response){
|
||||||
|
Reference in New Issue
Block a user