From 41edb66dc14334be842263148ad67b2536f9337e Mon Sep 17 00:00:00 2001 From: CK <69121180+TfTHacker@users.noreply.github.com> Date: Mon, 4 Oct 2021 21:54:59 +0200 Subject: [PATCH] 0.12 Beta release - slightly smarter handling of new repository paths --- manifest.json | 4 ++-- src/AddNewPluginModal.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index e55d8fb..a098146 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,9 @@ { "id": "obsidian42-brat", "name": "Obsidian42 - BRAT", - "version": "0.11", + "version": "0.12", "minAppVersion": "0.9.12", - "description": "Easiy install a beta version of a plugin for testing.", + "description": "Easi.y install a beta version of a plugin for testing.", "author": "TfTHacker", "authorUrl": "https://github.com/TfTHacker/obsidian42-brat", "isDesktopOnly": false diff --git a/src/AddNewPluginModal.ts b/src/AddNewPluginModal.ts index 83e8f51..4f0fe06 100644 --- a/src/AddNewPluginModal.ts +++ b/src/AddNewPluginModal.ts @@ -20,11 +20,12 @@ export default class AddNewPluginModal extends Modal { async submitForm(): Promise { if (this.address === "") return; - if (await existBetaPluginInList(this.plugin, this.address)) { + const scrubbedAddress = this.address.replace("https://github.com/",""); + if (await existBetaPluginInList(this.plugin, scrubbedAddress)) { new Notice(`BRAT\nThis plugin is already in the list for beta testing`, 20000); return; } - const result = await this.betaPlugins.addPlugin(this.address); + const result = await this.betaPlugins.addPlugin(scrubbedAddress); if (result) this.close(); }