Permalink
Browse files

Fixed #90

  • Loading branch information...
Kadauchi committed May 28, 2018
1 parent e5072c5 commit d61a526d3e1800053eebf1501b4314e3b9249cc4
Showing with 28 additions and 13 deletions.
  1. +28 −13 hit-finder/hit-finder.js
@@ -394,19 +394,34 @@ function includedAlert (il, hit) {
}
if (il.notification) {
chrome.notifications.create(hit.hit_set_id, {
type: `list`,
message: `Match`,
title: `Include list match found!`,
iconUrl: `/media/icon_128.png`,
items: [
{ title: `Title`, message: hit.title },
{ title: `Requester`, message: hit.requester_name },
{ title: `Reward`, message: toMoneyString(hit.monetary_reward.amount_in_dollars) },
{ title: `Available`, message: hit.assignable_hits_count.toString() }
],
...(window.chrome ? { buttons: [{ title: `Preview` }, { title: `Accept` }] } : null)
})
try {
chrome.notifications.create(hit.hit_set_id, {
type: `list`,
message: `Match`,
title: `Include list match found!`,
iconUrl: `/media/icon_128.png`,
items: [
{ title: `Title`, message: hit.title },
{ title: `Requester`, message: hit.requester_name },
{ title: `Reward`, message: toMoneyString(hit.monetary_reward.amount_in_dollars) },
{ title: `Available`, message: hit.assignable_hits_count.toString() }
],
...(window.chrome ? { buttons: [{ title: `Preview` }, { title: `Accept` }] } : null)
})
} catch (error) {
chrome.notifications.create(hit.hit_set_id, {
type: `list`,
message: `Match`,
title: `Include list match found!`,
iconUrl: `/media/icon_128.png`,
items: [
{ title: `Title`, message: hit.title },
{ title: `Requester`, message: hit.requester_name },
{ title: `Reward`, message: toMoneyString(hit.monetary_reward.amount_in_dollars) },
{ title: `Available`, message: hit.assignable_hits_count.toString() }
],
})
}
}
if (il.pushbullet && storage.hitFinder[`alert-pushbullet-state`] === `on` && pushbulleted === false) {

0 comments on commit d61a526

Please sign in to comment.