mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
Refactored mixins into utils ES2015 module exports ES2015-style imports WIP Fixing tests Fixes tests after es2015 code migrations. We we're require()ing an ES2015 module[1]. Have to make sure you account for the .default in this case. [1] We had to use ES5 `require` in Jest: (https://github.com/babel/babel-jest/issues/16)
16 lines
282 B
JavaScript
16 lines
282 B
JavaScript
|
|
const PREFIX = 'Weave Scope';
|
|
const SEPARATOR = ' - ';
|
|
|
|
export function setDocumentTitle(title) {
|
|
if (title) {
|
|
document.title = [PREFIX, title].join(SEPARATOR);
|
|
} else {
|
|
document.title = PREFIX;
|
|
}
|
|
}
|
|
|
|
export function resetDocumentTitle() {
|
|
setDocumentTitle(null);
|
|
}
|