Skip to content

Commit

Permalink
fix(slack): Fix toggl button disappeared on channel toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
with-shrey committed May 24, 2024
1 parent 19805fc commit d0a4ebe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/content/slack.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
/**
* @name Slack
* @urlAlias slack.com
* @urlRegex *://*.slack.com/*
*/
'use strict';
/* global togglbutton, $ */

const getTextContent = (element) => element ? element.textContent.trim() : '';

const getWorkspaceName = () => getTextContent($('.p-ia__sidebar_header__team_name_text'));

togglbutton.render('.p-ia__view_header:not(.toggl)', { observe: true }, (elem) => {
togglbutton.render('.p-view_header:not(.toggl)', { observe: true }, (elem) => {
const description = $('[data-qa="channel_name"]');
const isRendered = $('.toggl-button', elem) != null;

Expand Down

0 comments on commit d0a4ebe

Please sign in to comment.