Skip to content

Commit

Permalink
Merge pull request #33 from CCEM/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
cahudson94 authored Jun 18, 2017
2 parents 1af51e5 + 0ac4dda commit 197242a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions extension/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
settings.negative = items.showNegative;
settings.showall = items.showAll;
});
console.log(settings)
let $grabFromPage = $('div.commentarea div.md')
let $url = window.location.pathname;
let textToEval = {};
Expand All @@ -22,14 +21,13 @@
textToEval[$grabFromPage[index].className.split(' ')[1]] = $grabFromPage[index].innerText;
});
textToEval.url = $url.split('/')[2]
console.log(textToEval)
$.ajax({
url: 'https://reddex.herokuapp.com/inbound',
method: 'POST',
data: textToEval
})
.then(function(response){
console.log(response)
$grabFromPage.removeClass('neu neg1 neg2 pos1 pos2')
for(key in response){
$('.' + key).addClass(function(index){
if((response[key] <= -0.65) && (settings.showall === true || settings.negative === true)){
Expand Down
2 changes: 1 addition & 1 deletion extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"browser_action": {
"default_title": "Evaluate comments",
"default_icon": {
"default_icon": {
"16": "images/icon16.png",
"24": "images/icon24.png",
"32": "images/icon32.png",
Expand Down
1 change: 0 additions & 1 deletion extension/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ function save_options() {
var neutral = document.getElementById('neutral').checked;
var negative = document.getElementById('negative').checked;
var all = document.getElementById('all').checked;
console.log(positive, neutral, negative, all);
// var color = document.getElementById('color').value;
// var likesColor = document.getElementById('like').checked;
chrome.storage.sync.set({
Expand Down

0 comments on commit 197242a

Please sign in to comment.