fix fa api endpoint

This commit is contained in:
Dylan Knutson
2023-09-13 08:45:47 -07:00
parent 75c2969c5e
commit 6263660341
3 changed files with 56 additions and 41 deletions

View File

@@ -9,9 +9,12 @@
// @icon https://www.google.com/s2/favicons?sz=64&domain=furaffinity.net
// @grant GM_xmlhttpRequest
// @grant unsafeWindow
// @connect scraper.local
// @connect scraper
// @connect localhost
// ==/UserScript==
"use strict";
const HOST = "scraper:3000";
// const HOST = "localhost:3000";
function fa() {
function setupNavbar() {
@@ -520,7 +523,7 @@ function fa() {
let completedEnqueue = false;
GM_xmlhttpRequest({
url: "http://scraper.local:3000/api/fa/enqueue_objects",
url: `http://${HOST}/api/fa/enqueue_objects`,
method: "POST",
headers: {
Accept: "application/json",
@@ -562,7 +565,7 @@ function fa() {
function pollLiveStats() {
GM_xmlhttpRequest({
url: "http://scraper.local:3000/api/fa/object_statuses",
url: `http://${HOST}/api/fa/object_statuses`,
method: "POST",
headers: {
Accept: "application/json",
@@ -828,7 +831,7 @@ function twitter(mainNode) {
console.log("enqueue tweets: ", tweets);
GM_xmlhttpRequest({
url: "http://scraper.local:3000/api/twitter/enqueue_objects",
url: `http://${HOST}/api/twitter/enqueue_objects`,
method: "POST",
headers: {
Accept: "application/json",