mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
21 lines
354 B
JavaScript
21 lines
354 B
JavaScript
|
|
const PREFIX = 'Weave Scope';
|
|
const SEPARATOR = ' - ';
|
|
|
|
function setDocumentTitle(title) {
|
|
if (title) {
|
|
document.title = [PREFIX, title].join(SEPARATOR);
|
|
} else {
|
|
document.title = PREFIX;
|
|
}
|
|
}
|
|
|
|
function resetDocumentTitle() {
|
|
setDocumentTitle(null);
|
|
}
|
|
|
|
module.exports = {
|
|
resetTitle: resetDocumentTitle,
|
|
setTitle: setDocumentTitle
|
|
};
|