From e7744c79bf6c207749f5d754be3cb8708f80a1f8 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Wed, 7 Mar 2018 15:57:03 +0100 Subject: [PATCH] Updated scripts to check for PRO status --- scripts/Actions/Upload.ts | 5 +++++ scripts/AnimeNotifier.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/Actions/Upload.ts b/scripts/Actions/Upload.ts index 65562d86..1f4874c8 100644 --- a/scripts/Actions/Upload.ts +++ b/scripts/Actions/Upload.ts @@ -3,6 +3,11 @@ import { StatusMessage } from "../StatusMessage" // Select file export function selectFile(arn: AnimeNotifier, button: HTMLButtonElement) { + if(arn.user.dataset.pro !== "true") { + alert("Please buy a PRO account to use this feature.") + return + } + let preview = document.getElementById(button.dataset.previewImageId) as HTMLImageElement let endpoint = button.dataset.endpoint diff --git a/scripts/AnimeNotifier.ts b/scripts/AnimeNotifier.ts index 9134e437..63dd6e1f 100644 --- a/scripts/AnimeNotifier.ts +++ b/scripts/AnimeNotifier.ts @@ -120,7 +120,7 @@ export class AnimeNotifier { this.app.loading = this.app.find("loading") // Theme - if(this.user && this.user.dataset.theme !== "light") { + if(this.user && this.user.dataset.pro === "true" && this.user.dataset.theme !== "light") { darkTheme() }