Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/jsxc.nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ts
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2020-12-28 14:16:44 +0300
committersualko <klaus@jsxc.org>2020-12-28 14:16:44 +0300
commitde73180cea53471accd593d84283ada8bf307cd8 (patch)
tree0915b875248c9fc53478aa7cd4d76623506578c2 /ts
parent8dac9e6dd1fbe7e4a4ca7eb1d61e5b59f228ab3e (diff)
fix: chat icon injection
Diffstat (limited to 'ts')
-rw-r--r--ts/ChatIconInjector.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/ts/ChatIconInjector.ts b/ts/ChatIconInjector.ts
index 8b321ca..ad4be68 100644
--- a/ts/ChatIconInjector.ts
+++ b/ts/ChatIconInjector.ts
@@ -3,9 +3,13 @@ export default function injectChatIcon(toggleRoster: () => void) {
let div = $('<div/>');
div.addClass('ojsxc-chat-icon');
- div.click(function() {
+ div.on('click', function() {
toggleRoster();
});
- $('#header form.searchbox').after(div);
+ if ($('#header .header-right').length > 0) {
+ $('#header .header-right').prepend(div);
+ } else {
+ $('#header form.searchbox').after(div);
+ }
}