forked from martinkadlec0/Smart-RSS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbgprocess.js
More file actions
69 lines (59 loc) · 1.45 KB
/
Copy pathbgprocess.js
File metadata and controls
69 lines (59 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
* Smart RSS extension
* COPYRIGHT by Martin Kadlec
* This extension is meant for Opera only. Do not reuse any of the code for any other browser.
* You are allowed to do any changes for personal use in Opera Browser.
* Ask before publishing modified versions.
* Do not upload any modified version of this extension to addons.opera.com!
*/
require.config({
baseUrl: 'scripts/bgprocess',
waitSeconds: 0,
paths: {
jquery: '../libs/jquery.min',
underscore: '../libs/underscore.min',
backbone: '../libs/backbone.min',
backboneDB: '../libs/backbone.indexDB',
locale: '../local/local',
md5: '../libs/md5',
text: '../text',
domReady: '../domReady'
},
shim: {
jquery: {
exports: '$'
},
backbone: {
deps: ['underscore', 'jquery'],
exports: 'Backbone'
},
backboneDB: {
deps: ['backbone']
},
underscore: {
exports: '_'
},
md5: {
exports: 'CryptoJS'
}
}
});
/**
* Events handlers that has to be set right on start
*/
chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
if (message.action == 'get-tab-id') {
sendResponse({
action: 'response-tab-id',
value: sender.tab.id
});
}
});
chrome.runtime.onConnect.addListener(function(port) {
port.onDisconnect.addListener(function(port) {
sources.trigger('clear-events', port.sender.tab.id);
});
});
requirejs(['bg'], function(bg) {
// bg started
});