mirror of
https://github.com/imgfloat/server.git
synced 2026-02-05 03:39:26 +00:00
Fix arg position bug
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
(function () {
|
||||
(function() {
|
||||
const CSRF_COOKIE_NAME = "XSRF-TOKEN";
|
||||
const DEFAULT_HEADER_NAME = "X-XSRF-TOKEN";
|
||||
const SAFE_METHODS = new Set(["GET", "HEAD", "OPTIONS", "TRACE"]);
|
||||
const originalFetch = window.fetch;
|
||||
const originalFetch = globalThis.fetch;
|
||||
|
||||
function getCookie(name) {
|
||||
return document.cookie
|
||||
@@ -13,16 +13,16 @@
|
||||
}
|
||||
|
||||
function isSameOrigin(url) {
|
||||
const parsed = new URL(url, window.location.href);
|
||||
return parsed.origin === window.location.origin;
|
||||
const parsed = new URL(url, globalThis.location.href);
|
||||
return parsed.origin === globalThis.location.origin;
|
||||
}
|
||||
|
||||
function getMeta(name) {
|
||||
const el = document.querySelector(`meta[name=\"${name}\"]`);
|
||||
const el = document.querySelector(`meta[name="${name}"]`);
|
||||
return el ? el.getAttribute("content") : null;
|
||||
}
|
||||
|
||||
window.fetch = function patchedFetch(input, init = {}) {
|
||||
globalThis.fetch = function patchedFetch(input, init = {}) {
|
||||
const request = new Request(input, init);
|
||||
const method = (request.method || "GET").toUpperCase();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div class="dashboard-shell">
|
||||
<header class="dashboard-topbar">
|
||||
<div class="brand">
|
||||
<img class="brand-mark" src="/img/brand.png" />
|
||||
<img class="brand-mark" alt="brand" src="/img/brand.png" />
|
||||
<div>
|
||||
<div class="brand-title">Imgfloat</div>
|
||||
<div class="brand-subtitle">Twitch overlay manager</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="landing">
|
||||
<header class="landing-header">
|
||||
<div class="brand">
|
||||
<img class="brand-mark" src="/img/brand.png" />
|
||||
<img class="brand-mark" alt="brand" src="/img/brand.png" />
|
||||
<div>
|
||||
<div class="brand-title">Imgfloat</div>
|
||||
<div class="brand-subtitle">Twitch overlay manager</div>
|
||||
|
||||
Reference in New Issue
Block a user