-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpopup.js
32 lines (27 loc) · 977 Bytes
/
popup.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
$(function () {
$('#countCourses').click(function (){
chrome.tabs.query({active: true, currentWindow: true}, function(tabs){
chrome.tabs.sendMessage(tabs[0].id, {action: "countCourses"});
});
});
$('#makeSortable').click(function (){
chrome.tabs.query({active: true, currentWindow: true}, function(tabs){
chrome.tabs.sendMessage(tabs[0].id, {action: "makeSortable"});
});
});
$('#revertChanges').click(function (){
chrome.tabs.query({active: true, currentWindow: true}, function(tabs){
chrome.tabs.reload(tabs[0].id);
});
});
$('#uncountCourses').click(function (){
chrome.tabs.query({active: true, currentWindow: true}, function(tabs){
chrome.tabs.sendMessage(tabs[0].id, {action: "uncountCourses"});
});
});
// $('#makeUnsortable').click(function (){
// chrome.tabs.query({active: true, currentWindow: true}, function(tabs){
// chrome.tabs.sendMessage(tabs[0].id, {action: "makeUnsortable"});
// });
// });
});