Skip to content

Commit

Permalink
changed onClickEvent to ontouchend
Browse files Browse the repository at this point in the history
  • Loading branch information
Erallie committed Nov 28, 2024
1 parent ced9b36 commit 79172d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 79172d7

Please sign in to comment.