mirror of
https://bitbucket.org/skobkin/chrome_point_plus.git
synced 2024-11-23 18:56:04 +00:00
Fix codestyle in background.js
This commit is contained in:
parent
82b88b2146
commit
98982c6145
|
@ -42,6 +42,7 @@ function injectFiles(files, injectOne, onAllInjected, results) {
|
||||||
* @constructor Менеджер сообщений
|
* @constructor Менеджер сообщений
|
||||||
*/
|
*/
|
||||||
function MessageListener() {
|
function MessageListener() {
|
||||||
|
/* jshint unused:false */
|
||||||
chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
|
chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
|
||||||
if (this.isMethodAvailable(message)) {
|
if (this.isMethodAvailable(message)) {
|
||||||
console.info('Call #%s() method for tab #%s', message.type, this.getTabId(sender));
|
console.info('Call #%s() method for tab #%s', message.type, this.getTabId(sender));
|
||||||
|
@ -54,6 +55,7 @@ function MessageListener() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
/* jshint unused:true */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -147,7 +149,7 @@ MessageListener.prototype.executeJSFiles = function(message, sender, sendRespons
|
||||||
injectFiles(
|
injectFiles(
|
||||||
this.getFiles(message, 'document_end'),
|
this.getFiles(message, 'document_end'),
|
||||||
function(file, callback) {
|
function(file, callback) {
|
||||||
chrome.tabs.executeScript(tabId, file, callback)
|
chrome.tabs.executeScript(tabId, file, callback);
|
||||||
},
|
},
|
||||||
sendResponse
|
sendResponse
|
||||||
);
|
);
|
||||||
|
@ -169,7 +171,6 @@ MessageListener.prototype.injectCSSFiles = function(message, sender, sendRespons
|
||||||
},
|
},
|
||||||
sendResponse
|
sendResponse
|
||||||
);
|
);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
new MessageListener();
|
new MessageListener();
|
||||||
|
@ -185,6 +186,8 @@ chrome.storage.sync.get('options_version', function(data) {
|
||||||
|
|
||||||
// Adding notification click event listener
|
// Adding notification click event listener
|
||||||
chrome.notifications.onClicked.addListener(function(notificationId) {
|
chrome.notifications.onClicked.addListener(function(notificationId) {
|
||||||
|
var tab_url;
|
||||||
|
|
||||||
// Detecting notification type
|
// Detecting notification type
|
||||||
if (notificationId.indexOf('comment_') === 0) {
|
if (notificationId.indexOf('comment_') === 0) {
|
||||||
tab_url = 'https://point.im/' + notificationId.replace(/comment_/g, '');
|
tab_url = 'https://point.im/' + notificationId.replace(/comment_/g, '');
|
||||||
|
|
Loading…
Reference in a new issue