Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
Cashback rewards now displayed. Updated manifest version number
Browse files Browse the repository at this point in the history
  • Loading branch information
nareddyt committed Feb 19, 2018
1 parent 5712a6d commit 12093ce
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Discover Deals Notifier",
"version": "2.0",
"name": "Discover Deals and Cashback Rewards Notifier",
"version": "3.2",
"description": "Alerts you when you visit a website that qualifies for a Discover Deal.",
"background": {
"scripts": [
Expand Down
18 changes: 12 additions & 6 deletions src/templates.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['cashback'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
templates['cashback'] = template({"1":function(container,depth0,helpers,partials,data) {
return "<li>"
+ container.escapeExpression(container.lambda(depth0, depth0))
+ "</li>";
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;

return "<h1>"
+ alias4(((helper = (helper = helpers.site_name || (depth0 != null ? depth0.site_name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"site_name","hash":{},"data":data}) : helper)))
+ " Cashback Reward</h1>\r\n<a href="
+ " Cashback Reward</h1>\r\n\r\n<h4>Reward Options:</h4>\r\n<ul>\r\n "
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.offers : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ "\r\n</ul>\r\n\r\n<a href="
+ alias4(((helper = (helper = helpers.cashback_url || (depth0 != null ? depth0.cashback_url : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"cashback_url","hash":{},"data":data}) : helper)))
+ " target=\"_blank\">Click here to view cashback (you must login to Discover first)</a>";
+ " target=\"_blank\">Click here to view cashback (you must login to Discover first)</a>\r\n\r\n<br/>\r\n<br/>";
},"useData":true});
templates['deal'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;

return "<h1>"
+ alias4(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data}) : helper)))
+ "</h1>\r\n<a href="
+ "</h1>\r\n\r\n<a href="
+ alias4(((helper = (helper = helpers.deal_url || (depth0 != null ? depth0.deal_url : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"deal_url","hash":{},"data":data}) : helper)))
+ " target=\"_blank\">Click here to view deal (you must login to Discover first)</a>\r\n";
+ " target=\"_blank\">Click here to view deal (you must login to Discover first)</a>\r\n\r\n<br/>\r\n<br/>";
},"useData":true});
})();
11 changes: 10 additions & 1 deletion templates/cashback.handlebars
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
<h1>{{site_name}} Cashback Reward</h1>
<a href={{cashback_url}} target="_blank">Click here to view cashback (you must login to Discover first)</a>

<h4>Reward Options:</h4>
<ul>
{{#each offers}}<li>{{this}}</li>{{/each}}
</ul>

<a href={{cashback_url}} target="_blank">Click here to view cashback (you must login to Discover first)</a>

<br/>
<br/>
4 changes: 4 additions & 0 deletions templates/deal.handlebars
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
<h1>{{title}}</h1>

<a href={{deal_url}} target="_blank">Click here to view deal (you must login to Discover first)</a>

<br/>
<br/>

0 comments on commit 12093ce

Please sign in to comment.