mirror of
https://github.com/NohamR/BetterYGG.git
synced 2026-01-10 08:18:19 +00:00
[1.0] First commit
This commit is contained in:
29
backgroundScripts/background.js
Normal file
29
backgroundScripts/background.js
Normal file
@@ -0,0 +1,29 @@
|
||||
var categories = [{
|
||||
name: "tv_show",
|
||||
season: true,
|
||||
urls: ["/filmvid%C3%A9o/s%C3%A9rie-tv/", "/filmvideo/serie-tv/"],
|
||||
}, {
|
||||
name: "anime",
|
||||
season: true,
|
||||
urls: ["/filmvid%C3%A9o/animation-s%C3%A9rie/", "/film-video/animation-serie/"],
|
||||
}, {
|
||||
name: "movie",
|
||||
season: false,
|
||||
urls: [
|
||||
"/filmvid%C3%A9o/film/",
|
||||
"/filmvideo/film/",
|
||||
"/filmvid%C3%A9o/animation/",
|
||||
"/filmvideo/animation/"
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
chrome.runtime.onInstalled.addListener(function(details){
|
||||
if(details.reason == "install"){
|
||||
chrome.storage.sync.set({ 'defaultCategories': categories});
|
||||
chrome.storage.sync.set({ 'categories': categories});
|
||||
}
|
||||
if(details.reason == "update"){
|
||||
chrome.storage.sync.set({ 'defaultCategories': categories});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user