Files
browser-wakatime/assets/js/helpers/changeExtensionTooltip.js
2015-06-18 13:39:47 +02:00

22 lines
369 B
JavaScript

/* global chrome */
var config = require('../config');
/**
* It changes the extension title
*
* @param text
*/
function changeExtensionTooltip(text) {
if (text === '') {
text = config.name;
}
else {
text = config.name + ' - ' + text;
}
chrome.browserAction.setTitle({title: text});
}
module.exports = changeExtensionTooltip;