mirror of
https://bitbucket.org/skobkin/chrome_point_plus.git
synced 2024-11-14 23:03:05 +00:00
21 lines
494 B
JavaScript
21 lines
494 B
JavaScript
function MessageSender() {}
|
|
function stub() {}
|
|
|
|
MessageSender.prototype.css = function(files, callback) {
|
|
this.sendMessage({
|
|
type: 'injectCSSFiles',
|
|
files: files
|
|
}, callback || stub);
|
|
};
|
|
|
|
MessageSender.prototype.js = function(files, callback) {
|
|
this.sendMessage({
|
|
type: 'executeJSFiles',
|
|
files: files
|
|
}, callback || stub);
|
|
};
|
|
|
|
MessageSender.prototype.sendMessage = function() {
|
|
chrome.runtime.sendMessage.apply(chrome.runtime, arguments);
|
|
};
|