removing from saved

This commit is contained in:
Sriram Hariharan
2018-07-13 16:35:52 -05:00
parent ffd84bbb69
commit 05c9aa9005
6 changed files with 74 additions and 28 deletions

View File

@@ -28,13 +28,17 @@ $(document).ready( function() {
$('table').find('tr').each(function(){
if(!($(this).find('td').hasClass("course_header")) && $(this).has('th').length == 0){
//if a course row, then add the extension button and do something if that course has been "saved"
var thisForm = this;
$(this).append('<td data-th="Plus"><input type="image" class="distButton" style="vertical-align: bottom; display:block;" width="25" height="25" src='+chrome.extension.getURL('disticon.png')+' /></td>');
chrome.runtime.sendMessage({command: "alreadyContains",unique: $(this).find('td[data-th="Unique"]').text()}, function(response) {
if(response.alreadyContains){
//DO SOMETHING IF ALREADY CONTAINS
console.log("ALREADY CONTAINS IN THIS ROW");
}
});
// chrome.runtime.sendMessage({command: "alreadyContains",unique: $(this).find('td[data-th="Unique"]').text()}, function(response) {
// if(response.alreadyContains){
// //DO SOMETHING IF ALREADY CONTAINS
// $(thisForm).find('td').each(function(){
// // $(this).css('font-weight','bold');
// $(this).css('color','#4CAF50');
// });
// }
// });
}
});