-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.js
39 lines (25 loc) · 879 Bytes
/
content.js
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
<<<<<<< Updated upstream
var firstHref = $("a[href^='http']").eq(0).attr("href");
console.log(firstHref);
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
if( request.message === "clicked_browser_action" ) {
var firstHref = $("a[href^='http']").eq(0).attr("href");
console.log(firstHref);
chrome.runtime.sendMessage({"message":"open_new_tab","url":firstHref});
}
}
);
=======
var firstHref = $("a[href^='http']").eq(0).attr("href");
console.log(firstHref);
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
if( request.message === "clicked_browser_action" ) {
var firstHref = $("a[href^='http']").eq(0).attr("href");
console.log(firstHref);
chrome.runtime.sendMessage({"message":"open_new_tab","url":firstHref});
}
}
);
>>>>>>> Stashed changes