diff --git a/css/popup.css b/css/popup.css index 06ac222..589e564 100644 --- a/css/popup.css +++ b/css/popup.css @@ -45,8 +45,6 @@ body { .support-statement { margin: 0 12px; text-align: center; - font-style: italic; - opacity: 0.5; } .footer-content:hover .support-statement { @@ -62,3 +60,47 @@ body { .emphasize { font-weight: bold; } + +.rating-stars a { + color: gold; + font-style: normal; + font-size: 20px; + letter-spacing: 4px; + display: inline; +} +.rating-stars a:hover { + text-decoration: none; +} + +.rating-stars a .on { + display: none; +} + +.rating-stars a.active .on, +.rating-stars a:hover .on { + display: inline; +} + +.rating-stars a.active .off, +.rating-stars a:hover .off { + display: none; +} + +.rate-statement { + margin-top: 12px; + border-top: 1px solid #0000000f; + padding-top: 12px; + vertical-align: middle; + line-height: 100%; + background-color: white; + padding-bottom: 12px; +} + +.rate-statement p { + margin-bottom: 4px; +} + +.rate-statement .caption { + vertical-align: top; + margin-right: 10px; +} diff --git a/data/shopify_apps.js b/data/shopify_apps.js index 64f7224..f70460c 100644 --- a/data/shopify_apps.js +++ b/data/shopify_apps.js @@ -126,7 +126,7 @@ var SHOPIFY_APPS = [ short_description: "Gamified pop‑up", app_store_url: "https://apps.shopify.com/wheelio-first-interactive-exit-intent-pop-up", website_url: "http://wheelio.conversionpirate.com", - script_pattern: "wheelio-a62f3.firebaseapp.com/scripttag.js", + script_pattern: "wheelio", category: "Marketing" }, { diff --git a/js/popup.js b/js/popup.js index 943a23f..d3942bb 100644 --- a/js/popup.js +++ b/js/popup.js @@ -28,6 +28,18 @@ SAD.Popup = function(opts) { var $table = $('#appsTable'); var $body = $table.find('tbody'); var $num = $('.num-detections'); + var $supportStatement = $('.footer-content .support-statement'); + var $rateStatement = $('.footer-content .rate-statement'); + + $rateStatement.find('a').on('click', function(e) { + localStorage.setItem("rated", true); + $rateStatement.hide(); + + var $link = $(this); + if ($link.data('value') < 5) { + alert("Please send an email to help@fera.ai with what you'd like to improve - it really helps us maintain this free extension!\n\nPlease mention the app detector in your email."); + } + }); updateDetectableCounts(); @@ -37,11 +49,18 @@ SAD.Popup = function(opts) { $num.html(self.apps.length + " app" + (self.apps.length == 1 ? '' : 's')); + if (self.apps.length < 1) { $table.hide(); + $rateStatement.hide(); } else { $table.css('opacity', 1); $table.show(); + + if (self.apps.length > 3) { + if (! localStorage.getItem("rated")) $rateStatement.show(); + + } } $platformName.text(self.platform); diff --git a/popup.html b/popup.html index feffded..ee56ba2 100644 --- a/popup.html +++ b/popup.html @@ -56,9 +56,29 @@