fix user script controller

This commit is contained in:
Dylan Knutson
2025-02-25 00:28:02 +00:00
parent 8ddad8258c
commit f0c8fc720f
9 changed files with 82 additions and 11 deletions

View File

@@ -17,8 +17,6 @@
// ==/UserScript==
'use strict';
// const HOST = 'https://refurrer.com';
const HOST = 'http://localhost:3001';
interface SimilarUserList {
name: string;
@@ -58,6 +56,8 @@ function urlNameFromUserHref(href: string) {
}
async function faUserRecs(): Promise<void> {
const HOST = 'https://refurrer.com';
if (!window.location.pathname.startsWith('/user/')) {
return null;
}

View File

@@ -70,15 +70,15 @@ interface LiveEntityStatTable {
}
async function faObjectStatuses() {
function isNotNull<T>(val: T | null | undefined): val is T {
return val != null;
}
const HOST = 'refurrer.com';
const LIGHT_BG_COLOR = '#353b45';
const DARK_BG_COLOR = '#20242a';
const LIGHT_BORDER_COLOR = '#69697d';
function isNotNull<T>(val: T | null | undefined): val is T {
return val != null;
}
function setupNavbar(): HTMLElement {
const navbarCssElem = document.createElement('style');
const navbarHeight = '60px';