From 8199d7f67bf1fb90ca5f10eac2352d9a8e092666 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 13 Apr 2022 22:34:16 +0200 Subject: [PATCH] also hide markdown frames on mobile if the setting is enabled --- src/main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.ts b/src/main.ts index 7081267..fa37071 100644 --- a/src/main.ts +++ b/src/main.ts @@ -50,6 +50,10 @@ export default class CustomFramesPlugin extends Plugin { e.createSpan({ text: `Couldn't find a frame with name ${frameName}` }); return; } + if (Platform.isMobileApp && data.hideOnMobile) { + e.createSpan({ text: `${frameName} is hidden on mobile` }); + return; + } let styleMatch = /style:([^\n]+)/gi.exec(s); let style = styleMatch && styleMatch[1].trim();