From 79172d7be4043fa0a886311687be407f0f2568b6 Mon Sep 17 00:00:00 2001 From: Erallie <31375589+Erallie@users.noreply.github.com> Date: Thu, 28 Nov 2024 08:11:30 -0700 Subject: [PATCH] changed onClickEvent to ontouchend --- main.ts | 8 +++----- manifest.json | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/main.ts b/main.ts index dfd03ef..aa97b01 100644 --- a/main.ts +++ b/main.ts @@ -81,11 +81,9 @@ export default class DiscordTimestamps extends Plugin { if (i < timestampSlices.length && i < timestampHover.length) { let timestampEl = newEl.createEl('span', { text: timestampSlices[i], cls: 'discord-timestamps' }); timestampEl.ariaLabel = timestampHover[i]; - timestampEl.onClickEvent((ev) => { - if (Platform.isMobile) { - new Notice(timestampHover[i]); - } - }) + timestampEl.ontouchend = (ev) => { + new Notice(timestampHover[i]); + } } else if (timestampSlices.length !== timestampHover.length) { console.error("The lengths of timestampSlices and timestampHover are NOT EQUAL!"); diff --git a/manifest.json b/manifest.json index 3a56f07..cb2f902 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "discord-timestamps", "name": "Discord Timestamps", - "version": "1.0.5", + "version": "1.0.6", "minAppVersion": "1.7.7", "description": "Displays discord timestamps in read mode as they would appear in Discord.", "author": "Erika Gozar",