Skip to content

Commit

Permalink
Fix content editable issue in firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
edvordo authored Nov 14, 2022
1 parent 4c61265 commit ce0087e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions TabsOfAvabur.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name TabsOfAvabur
// @namespace Reltorakii.magic
// @version 4.5.6
// @version 4.5.7
// @description Tabs the channels it finds in chat, can be sorted, with notif for new messages
// @author Reltorakii
// @match https://*.avabur.com/game*
Expand Down Expand Up @@ -1299,7 +1299,11 @@
if (!options.scriptSettings.profile_tooltip_mention) {
return false;
}
$("#chatMessage").append(" @" + $("#profileOptionTooltip").attr("data-username")).focus();

const toAppend = " @" + $("#profileOptionTooltip").attr("data-username");
const originalMessage = $("#chatMessage").html().replace(/<br>$/, '');

$("#chatMessage").html(`${originalMessage}${toAppend}`).focus();
$("#profileOptionTooltip").hide();
}

Expand Down

0 comments on commit ce0087e

Please sign in to comment.