From 3c6f7b4539be7ac59f1782dc6585d25ebb1d4a8b Mon Sep 17 00:00:00 2001 From: marcjulianschwarz Date: Sat, 11 Sep 2021 12:50:24 +0200 Subject: [PATCH] [MOD] Working on mobile --- README.md | 2 ++ main.ts | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7dcbfcd..29f854b 100644 --- a/README.md +++ b/README.md @@ -97,5 +97,7 @@ The numbers in "[]" are the issue numbers associated with the fix or feature. - creates podcast note - replaces markdown link with link to podcast note +*1.2.0*: +- Podcast Note is now working on Obsidian mobile diff --git a/main.ts b/main.ts index 065f430..9d47c80 100644 --- a/main.ts +++ b/main.ts @@ -32,7 +32,6 @@ export default class PodcastNote extends Plugin { async onload() { console.log('loading plugin PodcastNote'); - await this.loadSettings(); this.addSettingTab(new PodcastNoteSettingTab(this.app, this)); @@ -75,6 +74,17 @@ export default class PodcastNote extends Plugin { await this.saveData(this.settings); } + async getAirrQuoteTranscript(url){ + let html = await this.getHtml(url); + let root = this.getParsedHtml(html); + let airrQuoteTranscript = root.querySelector(".quote_contextContainer__2afpx"); + console.log(root); + } + + async getHtml(url){ + return await request({url: url, method: "GET"}); + } + async addNotesFromList() { let editor = this.getEditor(); @@ -108,7 +118,7 @@ export default class PodcastNote extends Plugin { new Notice("Loading Podcast Info"); if (this.checkPodcastURL(url)){ try { - let html = await request({url: url, method: "GET"}); + let html = await this.getHtml(url); let root = this.getParsedHtml(html); return this.getMetaDataForPodcast(root, url); } catch (reason) {