Major optimizations. Added a function for extension state. Tooltip is now being change also.
This commit is contained in:
20
assets/js/helpers/changeExtensionTooltip.js
Normal file
20
assets/js/helpers/changeExtensionTooltip.js
Normal file
@@ -0,0 +1,20 @@
|
||||
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});
|
||||
}
|
||||
|
||||
export default changeExtensionTooltip;
|
||||
Reference in New Issue
Block a user