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

dom_utils.js « utils « lib « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6f42382246d5055ca38b594ed14815ff0d62f5e3 (plain)
1
2
3
4
5
6
7
8
9
import { isInIssuePage, isInMRPage, isInEpicPage } from './common_utils';

export const addClassIfElementExists = (element, className) => {
  if (element) {
    element.classList.add(className);
  }
};

export const isInVueNoteablePage = () => isInIssuePage() || isInEpicPage() || isInMRPage();