-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackground.js
More file actions
28 lines (20 loc) · 1.06 KB
/
background.js
File metadata and controls
28 lines (20 loc) · 1.06 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
var random_titles1 = ["hot", "steamy", "cold", "icy", "greasy", "big fat", "extravagant", "flamboyant", "diet", "dirty", "exceptional"]
var random_titles2 = ["hamburger", "bal", "patat", "bamihap", "spaghetti", "milkshake", "frikadel", "tosti", "hotdog", "icecream", "boerenkool", "andijvie", "spinazie", "rookworst", "risotto", "curry", "pudding", "rijst"]
var random_prefix = random_titles1[Math.floor(Math.random()*random_titles1.length)];
var random_suffix = random_titles2[Math.floor(Math.random()*random_titles2.length)];
chrome.bookmarks.onCreated.addListener(function(id, bookmark) {
var new_title = random_prefix + "-" + random_suffix;
chrome.bookmarks.update(id, {title : new_title});
});
// CREATE A BOOKMARK //////////////////////////////////////
//
// chrome.browserAction.onClicked.addListener(function() {
// chrome.bookmarks.create({
// title: "Epic",
// url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
// });
// });
///////////////////////////////////////////////////////////
chrome.tabs.executeScript({
"file": 'hamburger.js'
});