This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { definePluginSettings, Settings } from "@api/Settings"; | |
import definePlugin, { OptionType } from "@utils/types"; | |
import { Devs } from "@utils/constants"; | |
// Keep a reference so we can cleanup later if needed | |
let observer: MutationObserver | null = null; | |
let reinsertionObserver: MutationObserver | null = null; | |
let button: HTMLElement | null = null; | |
function startMutationObserver() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const { URL, URLSearchParams } = require('url'); | |
let apiURL = process.env.JACKETT_API_URL || ''; | |
let apiKey = process.env.JACKETT_API_KEY || ''; | |
function toLowerCaseKeys(obj) { | |
if (Array.isArray(obj)) { | |
return obj.map(toLowerCaseKeys); | |
} else if (obj !== null && typeof obj === 'object') { |