From 5cde9f9a654b3fdc9b474a0f7cd2219874ad0ecc Mon Sep 17 00:00:00 2001 From: Sirius B <87911136+SiriusBYT@users.noreply.github.com> Date: Sun, 28 Apr 2024 17:05:06 +0200 Subject: [PATCH] Flashcord Store Update --- .vscode/extensions.json | 7 - .vscode/settings.json | 4 - FlashCFG.json | 20 -- FlashCFG.py | 338 +++++++++--------- README.md | 2 + description.html | 6 + .../siriusbyt/themehooker-files/embed.html | 53 ++- .../store/plugins/siriusbyt/themehooker.html | 280 +++++++-------- .../default/default-embed_template.html | 65 ++-- .../default/default-plugin_template.html | 264 +++++++------- manifest.json | 21 +- 11 files changed, 501 insertions(+), 559 deletions(-) delete mode 100644 .vscode/extensions.json delete mode 100644 .vscode/settings.json delete mode 100644 FlashCFG.json create mode 100644 description.html diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 23d8e87..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "recommendations": [ - "dbaeumer.vscode-eslint", - "EditorConfig.EditorConfig", - "esbenp.prettier-vscode" - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 9bf4d12..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true -} diff --git a/FlashCFG.json b/FlashCFG.json deleted file mode 100644 index 5b1e7a8..0000000 --- a/FlashCFG.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "ThemeHooker", - "long_description": "

Fine. I'll fucking do it myself. Adds Discord's custom themes' name inside the html and body tag so that Theme Developers can do funny shenanigans.\n This is made mostly only for Flashcord, no support for other themes may be provided unless I feel like it.

\n

This plugins add a new attribute to the html and body tag named 'theme-hooker'.

\n

When no custom nitro themes are detected, the attribute's default value is 'theme-null'.

\n

When ThemeHooker detects a theme, it simply adds 'theme-[name of nitro theme]'.

\n

Please note that the Candyfloss theme is actually named 'theme-cotton-candy' and the Memory Lane theme is actually named 'theme-easter-egg'.

", - "short_description": "This store page was created using the Flashcord Store Quick Config Python Script!", - "version": "v1.1.0", - "author": "SiriusBYT", - "contributors": "Catalyst4222, Tharki-God", - "github_repo": "https://github.com/SiriusBYT/ThemeHooker", - "img_store": "store-banner.png", - "img_embed": "embed-banner.png", - "license": "CC-BY-ND-NC 4.0", - "license_year": "2023-2024", - "is_rpplugin": true, - "is_rptheme": false, - "images_are_full_links": false, - "internal_name": "themehooker", - "discord_link": "https://sirio-network.com/redirect/discord", - "sndl_theme": "Light", - "embed_color": "#FF69FF" -} \ No newline at end of file diff --git a/FlashCFG.py b/FlashCFG.py index 61f2620..749f681 100644 --- a/FlashCFG.py +++ b/FlashCFG.py @@ -1,190 +1,178 @@ from Flashcord_API_Client import * -import json +import json, time """ This tool lets you quickly configure your page in a hurry. Read https://github.com/SiriusBYT/Flashcord/wiki/The-Flashcord-Store-Template for how this file works. -WARNING: If you are quickly generating a page from a Replugged Addon's manifest JSON, -Make SURE to first run "ManifestHooker.py" and then manually verify the information inside the generated "FlashCFG_ManifestHooker.json" file. -Then you can rename the generated JSON file to simply "FlashCFG.json" and THEN you can ultimately finally run this script. +This allows the script to connect to the SGN servers in order to make your store page more complete without user input +It's now probably not a good idea to disable this. """ +AllowAPI = True; Debug = True + +# Logging System + Getting current time and date in preferred format +def GetTime(): + CTime = time.localtime() + Time = f"{CTime.tm_hour:02d}:{CTime.tm_min:02d}:{CTime.tm_sec:02d}" + Date = f"{CTime.tm_mday:02d}-{CTime.tm_mon:02d}-{CTime.tm_year}" + return Time,Date +def WriteLog(Log): + Time,Date = GetTime() + PrintLog = f"[{Time} - {Date}] {Log}" + print(PrintLog) + -# Edit the following things -AllowAPI = True # Allows the script to connect to the SGN servers in order to make your store page more complete without user input - -with open("FlashCFG.json", "r", encoding="utf-8") as FlashCFG: - FlashCFG_JSON = json.load(FlashCFG) - Name = FlashCFG_JSON["name"] - Long_Description = FlashCFG_JSON["long_description"] - Short_Description = FlashCFG_JSON["short_description"] - Version = FlashCFG_JSON["version"] - GitHub_Profile = FlashCFG_JSON["author"] - GitHub_Contributors = FlashCFG_JSON["contributors"] - GitHub_Repo = FlashCFG_JSON["github_repo"] - Store_Embed_FileName = FlashCFG_JSON["img_store"] - Embed_FileName = FlashCFG_JSON["img_embed"] - License = FlashCFG_JSON["license"] - License_Year = FlashCFG_JSON["license_year"] - - isRepluggedPlugin = FlashCFG_JSON["is_rpplugin"] - isFlashcordCompetitor = FlashCFG_JSON["is_rptheme"] - areIMGsFullLinks = FlashCFG_JSON["images_are_full_links"] - - Folder_Name = f"{FlashCFG_JSON["internal_name"]}-files" - Store_Page_Name = f"{FlashCFG_JSON["internal_name"]}.html" - Discord = FlashCFG_JSON["discord_link"] - SNDL_Theme = FlashCFG_JSON["sndl_theme"] - Embed_Color = FlashCFG_JSON["embed_color"] - - GitHub_RepoID = GitHub_Repo.split("/") - GitHub_RepoID = GitHub_RepoID[-1] - - #print(f"DATA LOADED: {Name} \n{Long_Description}\n {Short_Description} {Version} {GitHub_Profile} {GitHub_Contributors} {GitHub_Repo} {Store_Embed_FileName} {Embed_FileName} {License} {License_Year} {isRepluggedPlugin} {isFlashcordCompetitor} {areIMGsFullLinks} {Folder_Name} {Store_Page_Name} {Discord} {SNDL_Theme} {Embed_Color}") - - - -# NOT recommended to modify, do this only if you know what you're doing! -if isRepluggedPlugin == True: StoreTemplate = "flashcord/store/templates/default/default-plugin_template.html" -elif isFlashcordCompetitor == True: StoreTemplate = "flashcord/store/templates/default/default-theme_template.html" -else: StoreTemplate = "flashcord/store/templates/default/default-module_template.html" - -if areIMGsFullLinks == False: - Store_Banner = f"{Folder_Name}/{Store_Embed_FileName}" - -EmbedTemplate = "flashcord/store/templates/default/default-embed_template.html" -# Don't touch this, it will get overwritten anyways but still. Don't touch just in case. -HTMLFile = "" -# Don't touch this either. This will cause problems if your store page is for a Flashcord Module! -UserFolderName = GitHub_Profile.lower() - -def GetEmbedCode(): - HTMLCode = '' - API_Folders = [] - def CallAPI(): - if isRepluggedPlugin == True: API_Request = "GET/" + "PLUGINS/" + GitHub_Profile.upper() - elif isFlashcordCompetitor == True: API_Request = "GET/" + "THEMES/" + GitHub_Profile.upper() - else: API_Request = "GET/" + "MODULES/" + GitHub_Profile.upper() - RequestResults = Flashcord_API_Client(API_Request) - return RequestResults - API_Folders = CallAPI() - #print("TYPE:",type(API_Folders)) - #print("DATA:",API_Folders) +def ConfigLoader(): + global Addon_Name, Addon_DescriptionShort, Addon_Version, Addon_Repository, Addon_Author, Addon_License, Addon_Type, Addon_Contributors, Addon_Discord, Addon_Year, Addon_Theme, Addon_Color, Addon_Tags, Addon_Folder, Addon_ImageStore, Addon_ImageEmbed, Addon_Backup, Addon_DescriptionLong, Addon_LicenseString, Store_Template, Embed_Template, Username, Store_File, Embed_File, Type_Folder, Addon_Other, Addon_RepositoryName, Addon_TagsString + WriteLog("Fetching all informations required for the Addon Page...") + with open("manifest.json", "r", encoding="utf8") as Manifest_File: Manifest_JSON = json.load(Manifest_File) + # Collect all the information from the Vanilla Replugged Manifest + Addon_Name = Manifest_JSON["name"] + Addon_DescriptionShort = Manifest_JSON["description"] + Addon_Version = Manifest_JSON["version"] + Addon_Repository = Manifest_JSON["source"] + Temporary = Addon_Repository.split("/") + Addon_Author = Temporary[-2] # This looks janky but this is the best way to get the author name like I want it. + Addon_RepositoryName = Temporary[-1] + Addon_License = Manifest_JSON["license"] + Addon_Type = Manifest_JSON["type"] + + # Collect all the information from the Flashcord Store Manifest + Flashcord_Key = Manifest_JSON["flashcord"] + Flashcord_General = Flashcord_Key["general_information"] + Flashcord_Internal = Flashcord_Key["internal_structure"] + # General Information + Addon_Contributors = Flashcord_General["contributors"] + Addon_Discord = Flashcord_General["discord_link"] + Addon_Year = Flashcord_General["license_year"] + Addon_Theme = Flashcord_General["sndl_theme"] + Addon_Color = Flashcord_General["embed_color"] + Addon_Tags = Flashcord_General["tags"] + # Internal Information + Addon_Folder = Flashcord_Internal["internal_name"] + Addon_ImageStore = Flashcord_Internal["image_store"] + Addon_ImageEmbed = Flashcord_Internal["image_embed"] + Addon_Backup = Flashcord_Internal["backup_files"] + + # Get the HTML for the Long Description + with open("description.html") as Description_File: Addon_DescriptionLong = Description_File.read() + + WriteLog("Processing Information...") + Addon_TagsString = str(Addon_Tags).replace("[","").replace("]","").replace('"','').replace("'","") + Addon_LicenseString = f"{Addon_Author} © {Addon_Year} - {Addon_Name} | {Addon_License}" + Username = Addon_Author.lower() + match Addon_Type: + case "replugged-plugin": + Store_Template = "flashcord/store/templates/default/default-plugin_template.html" + Type_Folder = "plugins" + case "replugged-theme": + Store_Template = "flashcord/store/templates/default/default-theme_template.html" + Type_Folder = "themes" + case _: + Store_Template = "flashcord/store/templates/default/default-module_template.html" + Type_Folder = "modules" + Embed_Template = "flashcord/store/templates/default/default-embed_template.html" + Store_File = f"flashcord/store/{Type_Folder}/{Username}/{Addon_Folder}.html" + Embed_File = f"flashcord/store/{Type_Folder}/{Username}/{Addon_Folder}-files/embed.html" + + # Call the Flashcord API to get all other addons made by the author (Warning: code is bad and ugly) + API_Folders = Flashcord_API_Client(f"GET/{Type_Folder.upper()}/{Username.upper()}"); Addon_Other = "" if API_Folders != None: API_Folders = API_Folders.replace("[","").replace("]","").replace('"','').replace("'","").replace(' ','').split(",") for cycle in range (len(API_Folders)): API_Folders[cycle] = API_Folders[cycle] + "-files" - if Folder_Name in API_Folders: - API_Folders.remove(Folder_Name) - for cycle in range (len(API_Folders)): - HTMLCode = HTMLCode + f'\n' - else: - HTMLCode = HTMLCode + f'\n' - return HTMLCode - -# This code is disgusting but it works, will optimize when I feel like it. -# NOTICE: this has ZERO error handling (or very little)! This is fucking horrible but I don't know yet how to do those and at the time of writing it's fucking 23h28 -def GetHTMLFile(FileConcerned): - if FileConcerned == "Store Page": - if isRepluggedPlugin == True: - File = "flashcord/store/plugins/" + GitHub_Profile.lower() + "/" + Store_Page_Name + if Addon_Folder in API_Folders: API_Folders.remove(Addon_Folder) # We don't want duplicates! + if API_Folders == []: Addon_Other = "

It's bloody empty in here!

" # Nor an empty div! else: - File = "flashcord/store/modules/" + GitHub_Profile.lower() + "/" + Store_Page_Name - elif FileConcerned == "Embed": - if isRepluggedPlugin == True: - File = "flashcord/store/plugins/" + GitHub_Profile.lower() + "/" + Folder_Name + "/embed.html" - else: - File = "flashcord/store/modules/" + GitHub_Profile.lower() + "/" + Folder_Name + "/embed.html" - else: - print('[FlashCFG // GetHTMLFile] ERROR: Sirius A was here and pissed on the moon. (What the fuck is a "', FileConcerned, '"?!)') - return "FUCK" - return File - -def FileBackup(FileToBackup): - print("[FlashCFG // Backup] The", FileToBackup, "will now be backed up...") - HTMLFile = GetHTMLFile(FileToBackup) - HTMLFile_Backup = HTMLFile.replace(".html",".bak-html") + for cycle in API_Folders: + Addon_Other = Addon_Other + f'\n' + else: Addon_Other = "

It's bloody empty in here!

" + + ShowConfig() + + +def ShowConfig(): # Prints all the config loaded, debug information + if Debug == True: + print("") + WriteLog(f"Name: {Addon_Name} // Author: {Addon_Author} // Version: {Addon_Version}") + WriteLog(f"Contributors: {Addon_Contributors} // License: {Addon_LicenseString}") + WriteLog(f"Repository: {Addon_Repository}") + WriteLog(f"Description (Short): {Addon_DescriptionShort}") + WriteLog(f"Description (Long): \n{Addon_DescriptionLong}") + WriteLog(f"Tags: {Addon_Tags}") + WriteLog(f"Theme: {Addon_Theme} // Embed Color: {Addon_Color}") + WriteLog(f"Internal Name: {Addon_Folder} // Discord Link: {Addon_Discord}") + WriteLog(f"Store Image: {Addon_ImageStore}") + WriteLog(f"Embed Image: {Addon_ImageStore}") + WriteLog(f"Store Template: {Store_Template}") + WriteLog(f"Embed Template: {Embed_Template}") + WriteLog(f"Store File: {Store_File}") + WriteLog(f"Embed File: {Embed_File}") + WriteLog(f"'Also made by' Code: \n {Addon_Other}") + print("") + +def Backup_Files(): + WriteLog("Backing up files...") try: - with open(HTMLFile, 'r', encoding='utf-8') as HTMLFile_File: - with open(HTMLFile_Backup, 'w', encoding='utf-8') as HTMLFile_Backup_File: - HTMLFile_Backup_File.write((HTMLFile_File.read())) - print("[FlashCFG // Backup] ", HTMLFile_Backup, "has been created and is now backed up.") + with open(Store_File, 'r', encoding='utf-8') as Store_FileOriginal: + with open(f"{Store_File}.bak", 'w', encoding='utf-8') as Store_FileBackup: + Store_FileBackup.write((Store_FileOriginal.read())) + with open(Embed_File, 'r', encoding='utf-8') as Embed_FileOriginal: + with open(f"{Embed_File}.bak", 'w', encoding='utf-8') as Embed_FileBackup: + Embed_FileBackup.write((Embed_FileOriginal.read())) except: - print("[FlashCFG // Backup] ", HTMLFile_Backup, "doesn't exist! Creating empty file instead...") - with open(HTMLFile, 'w', encoding='utf-8') as EditHTML_File: - EditHTML_File.write("") - -def HTMLConfigurator(Step): - # We're doing this the MarkSNDL way, I can't fucking figure out how to do this the objectively better way - # This is surprisingly way better than the current version of MarkSNDL though LMFAO - HTMLArray = [] - if Step == 0: - print("[FlashCFG // HTML-CFG] Now building the Store Page...") - HTMLFile = GetHTMLFile("Store Page") - StepFile = "// Store Page" - elif Step == 1: - print("[FlashCFG // HTML-CFG] Now building the Embed...") - HTMLFile = GetHTMLFile("Embed") - StepFile = "// Embed" - else: - print("[FlashCFG // HTML-CFG] ERROR: Sirius A was here and replaced Sirius B's Yae wallpaper with a Kirara one.", '(What the fuck is Step "', Step, '"?!)') - return "FUCK" - - if AllowAPI == True: - print('[FlashCFG // HTML-CFG] Connecting to SGN servers to fill the "More by" section...') - MoreByCode = GetEmbedCode() # NOTICE: Will phone to the SGN servers! - print(f'[FlashCFG // HTML-CFG] The "More by" section will have:\n{MoreByCode}') - else: - MoreByCode = f'\n' - - - with open(StoreTemplate, 'r', encoding='utf-8') as StoreTemplate_File: - with open(EmbedTemplate, 'r', encoding='utf-8') as EmbedTemplate_File: - with open(HTMLFile, 'w', encoding='utf-8') as EditHTML_File: - EditHTML_File.write("") - with open(HTMLFile, 'a', encoding='utf-8') as EditHTML_File: - if Step == 0: - HTMLArray = StoreTemplate_File.readlines() - elif Step == 1: - HTMLArray = EmbedTemplate_File.readlines() - else: - print("[FlashCFG // HTML-CFG] WARNING: Sirius A was here and caused another Big Bang", '(What the fuck is Step "', Step, '"?!)') - print("[FlashCFG // HTML-CFG] Also how in the LIVING FUCK DID YOU TRIGGER THIS ERROR without triggering the previous one?") - return "FUCK" - - for line in range (len(HTMLArray)): - # print('[FlashCGG] Processing Line"', line, '" which is "', HTMLArray[line], '".') - HTMLArray[line] = HTMLArray[line].replace("[NAME]", Name) - HTMLArray[line] = HTMLArray[line].replace("[SHORT_DESC]", Short_Description) - HTMLArray[line] = HTMLArray[line].replace("[LONG_DESC]", Long_Description) - HTMLArray[line] = HTMLArray[line].replace("[VERSION]", Version) - HTMLArray[line] = HTMLArray[line].replace("[LICENSE_YEAR]", License_Year) - HTMLArray[line] = HTMLArray[line].replace("[LICENSE]", License) - HTMLArray[line] = HTMLArray[line].replace("[GITHUB_PROFILE]", GitHub_Profile) - HTMLArray[line] = HTMLArray[line].replace("[GITHUB_REPO]", GitHub_Repo) - HTMLArray[line] = HTMLArray[line].replace("[GITHUB_REPO-ID]", GitHub_RepoID) - HTMLArray[line] = HTMLArray[line].replace("[GITHUB_CONTRIBUTORS]", GitHub_Contributors) - HTMLArray[line] = HTMLArray[line].replace("[DISCORD_LINK]", Discord) - HTMLArray[line] = HTMLArray[line].replace("[THEME]", SNDL_Theme) - HTMLArray[line] = HTMLArray[line].replace("[EMBED_COLOR]", Embed_Color) - HTMLArray[line] = HTMLArray[line].replace("../[STORE_PAGE_FILENAME]", f"../{Store_Page_Name}") - HTMLArray[line] = HTMLArray[line].replace("[FOLDER_NAME]", Folder_Name) - HTMLArray[line] = HTMLArray[line].replace("[EMBED_FILENAME]", Embed_FileName) - HTMLArray[line] = HTMLArray[line].replace("[STORE_BANNER]", Store_Banner) - HTMLArray[line] = HTMLArray[line].replace("[STORE_USER_FOLDER]", UserFolderName) - HTMLArray[line] = HTMLArray[line].replace("[FLASHSTORE_API-EMBEDS]", MoreByCode) - EditHTML_File.write(HTMLArray[line]) - ProcessingProgress = ((line+1)/len(HTMLArray))*100 - print('[FlashCFG // HTML-CFG] Processed Line', line+1, '/', len(HTMLArray), '(', ProcessingProgress, '%).', StepFile) - # print('[FlashCGG] Processed Line is now "', HTMLArray[line], '".') - -def FlashcordStoreConfig(): - print("[FlashCFG] Script initiated.") - FileBackup("Store Page") - HTMLConfigurator(0) - FileBackup("Embed") - HTMLConfigurator(1) - print("[FlashCFG] Script complete.") - return - -FlashcordStoreConfig() \ No newline at end of file + WriteLog("Files not found! Creating empty files instead...") + with open(Store_File, 'w', encoding='utf-8') as Store_FileOriginal: Store_FileOriginal.write("") + with open(Embed_File, 'w', encoding='utf-8') as Embed_FileOriginal: Embed_FileOriginal.write("") + WriteLog("Backup complete.\n") + +def Build(File, Template): + WriteLog(f"Building {File}..."); print("") + with open(Template, "r", encoding="utf-8") as Template_File: + with open(File, "w", encoding="utf-8") as Final_File: print("Emptying Final File...", end="\r"); Final_File.write("") + with open(File, "a", encoding="utf-8") as Final_File: + print("Reading Template...", end="\r") + Template_HTML = Template_File.readlines() + Template_Lines = len(Template_HTML) + Processing_Percent = Current_Line = 0 + for line in Template_HTML: + print(f"Processing Line {Current_Line}/{Template_Lines} // {Processing_Percent}%", end="\r") + line = line.replace("[Addon_Name]", Addon_Name) + line = line.replace("[Addon_DescriptionShort]", Addon_DescriptionShort) + line = line.replace("[Addon_Version]", Addon_Version) + line = line.replace("[Addon_Repository]", Addon_Repository) + line = line.replace("[Addon_Author]", Addon_Author) + line = line.replace("[Addon_RepositoryName]", Addon_RepositoryName) + line = line.replace("[Addon_License]", Addon_License) + line = line.replace("[Addon_Type]", Addon_Type) + line = line.replace("[Addon_Contributors]", Addon_Contributors) + line = line.replace("[Addon_Discord]", Addon_Discord) + line = line.replace("[Addon_Year]", Addon_Year) + line = line.replace("[Addon_Theme]", Addon_Theme) + line = line.replace("[Addon_Color]", Addon_Color) + line = line.replace("[Addon_Folder]", Addon_Folder) + line = line.replace("[Addon_ImageStore]", Addon_ImageStore) + line = line.replace("[Addon_ImageEmbed]", Addon_ImageEmbed) + line = line.replace("[Addon_DescriptionLong]", Addon_DescriptionLong) + line = line.replace("[Addon_Other]", Addon_Other) + line = line.replace("[Addon_LicenseString]", Addon_LicenseString) + line = line.replace("[Username]", Username) + line = line.replace("[Addon_TagsString]", Addon_TagsString) + print(f"Writing Line {Current_Line}/{Template_Lines} // {Processing_Percent}%", end="\r") + Final_File.write(line) + Current_Line+=1 + Processing_Percent = (Current_Line/Template_Lines)*100 + print(f"Finished Writing Line {Current_Line}/{Template_Lines} // {Processing_Percent}%", end="\r") + WriteLog("Finished Building File") + + + +def FlashCFG(): + ConfigLoader() + if Addon_Backup == True: + Backup_Files() + Build(Store_File, Store_Template) + Build(Embed_File, Embed_Template) + WriteLog("Script Complete.") + +FlashCFG() \ No newline at end of file diff --git a/README.md b/README.md index 0daf44a..406ceba 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,7 @@

+
+ Fine. I'll fucking do it myself. Adds Discord's custom themes' name inside the and tag so that Theme Developers can do funny shenanigans. This is made mostly only for Flashcord, no support for other themes may be provided unless I feel like it. diff --git a/description.html b/description.html new file mode 100644 index 0000000..b11da52 --- /dev/null +++ b/description.html @@ -0,0 +1,6 @@ +

Fine. I'll fucking do it myself. Adds Discord's custom themes' name inside the html and body tag so that Theme Developers can do funny shenanigans. + This is made mostly only for Flashcord, no support for other themes may be provided unless I feel like it.

+

This plugins add a new attribute to the html and body tag named 'theme-hooker'.

+

When no custom nitro themes are detected, the attribute's default value is 'theme-null'.

+

When ThemeHooker detects a theme, it simply adds 'theme-[name of nitro theme]'.

+

Please note that the Candyfloss theme is actually named 'theme-cotton-candy' and the Memory Lane theme is actually named 'theme-easter-egg'.

\ No newline at end of file diff --git a/flashcord/store/plugins/siriusbyt/themehooker-files/embed.html b/flashcord/store/plugins/siriusbyt/themehooker-files/embed.html index f5f09e2..e1fb79a 100644 --- a/flashcord/store/plugins/siriusbyt/themehooker-files/embed.html +++ b/flashcord/store/plugins/siriusbyt/themehooker-files/embed.html @@ -1,39 +1,30 @@ - + ThemeHooker - Flashcord Store - + @@ -46,21 +37,21 @@ -
+
-
Contributors: Catalyst4222, Tharki-God
-

Version: v1.1.0

-

This store page was created using the Flashcord Store Quick Config Python Script!

- +
Contributors: Catalyst4222, Nanakusa
+

Version: 1.1.0

+

Fine. I'll fucking do it myself, because nobody else did. Adds Discord's custom themes' name inside the and tag so that Theme Developers can do funny shenanigans. This is made mostly only for Flashcord, no support for other themes may be provided unless I feel like it.

+
diff --git a/flashcord/store/plugins/siriusbyt/themehooker.html b/flashcord/store/plugins/siriusbyt/themehooker.html index 33b0115..058e7e4 100644 --- a/flashcord/store/plugins/siriusbyt/themehooker.html +++ b/flashcord/store/plugins/siriusbyt/themehooker.html @@ -1,153 +1,139 @@ - - - - - ThemeHooker - Flashcord Store - - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
- -

Fine. I'll fucking do it myself. Adds Discord's custom themes' name inside the html and body tag so that Theme Developers can do funny shenanigans. - This is made mostly only for Flashcord, no support for other themes may be provided unless I feel like it.

-

This plugins add a new attribute to the html and body tag named 'theme-hooker'.

-

When no custom nitro themes are detected, the attribute's default value is 'theme-null'.

-

When ThemeHooker detects a theme, it simply adds 'theme-[name of nitro theme]'.

-

Please note that the Candyfloss theme is actually named 'theme-cotton-candy' and the Memory Lane theme is actually named 'theme-easter-egg'.

-
-
-
-

ThemeHooker

-

💿

-
-
-

SiriusBYT

-

💬

-
-
Contributors: Catalyst4222, Tharki-God
-

Version: v1.1.0

-

This store page was created using the Flashcord Store Quick Config Python Script!

- -

- -

🔌 Replugged

-

IMPORTANT DISCLAIMER

-

- -
-
-

Theses plugins are NOT APPROVED ON THE REPLUGGED STORE, the Flashcord Store does NOT CONTROL the code being ran from these plugins.

-

In other words, these plugins have not been confirmed if they are malicious or not. Even if they do work as intended one day, it doesn't mean that after an update it will be still sunshines and roses.

-
-
-

If you acknowledge theses risks, press the button below to reveal the download link.

+ +ThemeHooker +Fine. I'll fucking do it myself, because nobody else did. Adds Discord's custom themes' name inside the and tag so that Theme Developers can do funny shenanigans. This is made mostly only for Flashcord, no support for other themes may be provided unless I feel like it. +1.1.0 +SiriusBYT © 2023-2024 - ThemeHooker | CC BY-NC-ND 4.0 + +SiriusBYT +https://github.com/SiriusBYT/ThemeHooker +Catalyst4222, Nanakusa + +https://sirio-network.com/redirect/discord +Light +#FF69FF + +themehooker +themehooker +embed-banner.png -
-

I understand that this plugin may put my data at risk.

- +--> + + + + + ThemeHooker - Flashcord Store + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ +

Fine. I'll fucking do it myself. Adds Discord's custom themes' name inside the html and body tag so that Theme Developers can do funny shenanigans. + This is made mostly only for Flashcord, no support for other themes may be provided unless I feel like it.

+

This plugins add a new attribute to the html and body tag named 'theme-hooker'.

+

When no custom nitro themes are detected, the attribute's default value is 'theme-null'.

+

When ThemeHooker detects a theme, it simply adds 'theme-[name of nitro theme]'.

+

Please note that the Candyfloss theme is actually named 'theme-cotton-candy' and the Memory Lane theme is actually named 'theme-easter-egg'.

+
+
+
+

ThemeHooker

+

💿

+
+ +
Contributors: Catalyst4222, Nanakusa
+

Version: 1.1.0

+

Fine. I'll fucking do it myself, because nobody else did. Adds Discord's custom themes' name inside the and tag so that Theme Developers can do funny shenanigans. This is made mostly only for Flashcord, no support for other themes may be provided unless I feel like it.

- - -
-

- - - - +

+ +

🔌 Replugged

+

IMPORTANT DISCLAIMER

+

+ +
+
+

Theses plugins are NOT APPROVED ON THE REPLUGGED STORE, the Flashcord Store does NOT CONTROL the code being ran from these plugins.

+

In other words, these plugins have not been confirmed if they are malicious or not. Even if they do work as intended one day, it doesn't mean that after an update it will be still sunshines and roses.

+
+

If you acknowledge theses risks, press the button below to reveal the download link.

+ +
+

I understand that this plugin may put my data at risk.

+ +
+ + + +
+

+ + + + +
+ +

+ + +
+
+ + +

+

More Replugged Plugins by SiriusBYT

+

+ + +
+ + +
+

-

- - -
-
- - -

-

More Replugged Plugins by SiriusBYT

-

- - -
- -
-

- - -
-
- - \ No newline at end of file + +
+
+ + \ No newline at end of file diff --git a/flashcord/store/templates/default/default-embed_template.html b/flashcord/store/templates/default/default-embed_template.html index 70208c7..e8400d7 100644 --- a/flashcord/store/templates/default/default-embed_template.html +++ b/flashcord/store/templates/default/default-embed_template.html @@ -1,40 +1,31 @@ - + - [NAME] - Flashcord Store + [Addon_Name] - Flashcord Store - - + + @@ -46,21 +37,21 @@ -
- +
+
-
Contributors: [GITHUB_CONTRIBUTORS]
-

Version: [VERSION]

-

[SHORT_DESC]

- +
Contributors: [Addon_Contributors]
+

Version: [Addon_Version]

+

[Addon_DescriptionShort]

+
diff --git a/flashcord/store/templates/default/default-plugin_template.html b/flashcord/store/templates/default/default-plugin_template.html index 1573bed..7e0d9fa 100644 --- a/flashcord/store/templates/default/default-plugin_template.html +++ b/flashcord/store/templates/default/default-plugin_template.html @@ -1,143 +1,133 @@ - - - - - [NAME] - Flashcord Store - - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
- -

[LONG_DESC]

-
-
-
-

[NAME]

-

💿

-
- -
Contributors: [GITHUB_CONTRIBUTORS]
-

Version: [VERSION]

-

[SHORT_DESC]

- -

- -

🔌 Replugged

-

IMPORTANT DISCLAIMER

-

- -
-
-

Theses plugins are NOT APPROVED ON THE REPLUGGED STORE, the Flashcord Store does NOT CONTROL the code being ran from these plugins.

-

In other words, these plugins have not been confirmed if they are malicious or not. Even if they do work as intended one day, it doesn't mean that after an update it will be still sunshines and roses.

-
-
-

If you acknowledge theses risks, press the button below to reveal the download link.

+ +[Addon_Name] +[Addon_DescriptionShort] +[Addon_Version] +[Addon_LicenseString] + +[Addon_Author] +[Addon_Repository] +[Addon_Contributors] + +[Addon_Discord] +[Addon_Theme] +[Addon_Color] + +[Addon_Folder] +[Addon_Folder] +[Addon_ImageEmbed] -
-

I understand that this plugin may put my data at risk.

- +--> + + + + + [Addon_Name] - Flashcord Store + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ +

[Addon_DescriptionLong]

+
+
+
+

[Addon_Name]

+

💿

+
+ +
Contributors: [Addon_Contributors]
+

Version: [Addon_Version]

+

[Addon_DescriptionShort]

- - -
-

- - - - +

+ +

🔌 Replugged

+

IMPORTANT DISCLAIMER

+

+ +
+
+

Theses plugins are NOT APPROVED ON THE REPLUGGED STORE, the Flashcord Store does NOT CONTROL the code being ran from these plugins.

+

In other words, these plugins have not been confirmed if they are malicious or not. Even if they do work as intended one day, it doesn't mean that after an update it will be still sunshines and roses.

+
+

If you acknowledge theses risks, press the button below to reveal the download link.

+ +
+

I understand that this plugin may put my data at risk.

+ +
+ + + +
+

+ + + + +
+ +

+ + +
+
+ + +

+

More Replugged Plugins by [Addon_Author]

+

+ + +
+ [Addon_Other] +
+

-

- - -
-
- - -

-

More Replugged Plugins by [GITHUB_PROFILE]

-

- - -
- [FLASHSTORE_API-EMBEDS] -
-

- - -
-
- - \ No newline at end of file + +
+
+ + \ No newline at end of file diff --git a/manifest.json b/manifest.json index de4e5a8..3b1549d 100644 --- a/manifest.json +++ b/manifest.json @@ -16,5 +16,24 @@ "type": "replugged-plugin", "renderer": "src/index.ts", "source": "https://github.com/SiriusBYT/ThemeHooker", - "image": ["https://i.imgur.com/14CNs3a.png?CHANGE-THIS-URL"] + "image": ["https://sirio-network.com/flashcord/store/plugins/siriusbyt/themehooker-files/embed-banner.png"], + "flashcord": { + "general_information": { + "contributors": "Catalyst4222, Nanakusa", + "discord_link": "https://sirio-network.com/redirect/discord", + "license_year": "2023-2024", + "sndl_theme": "Light", + "embed_color": "#FF69FF", + "tags": [ + "Theming Dependency", + "Companion Plugin" + ] + }, + "internal_structure": { + "internal_name": "themehooker", + "image_store": "store-banner.png", + "image_embed": "embed-banner.png", + "backup_files": false + } + } }