Skip to content

Commit

Permalink
Fix #803 - Exit out of survey banner
Browse files Browse the repository at this point in the history
  • Loading branch information
codemist committed Aug 4, 2021
1 parent f0ccc09 commit f5bc019
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions privaterelay/templates/includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
{% endif %}
{% if not request.user.is_anonymous %}
<div id="micro-survey-banner" class="micro-survey-banner hidden">
<button id="survey-dismiss" class="flx center-value dismiss">
<svg class="x-close-icon fill-current text-gray" role="button" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M14.348 14.849a1.2 1.2 0 0 1-1.697 0L10 11.819l-2.651 3.029a1.2 1.2 0 1 1-1.697-1.697l2.758-3.15-2.759-3.152a1.2 1.2 0 1 1 1.697-1.697L10 8.183l2.651-3.031a1.2 1.2 0 1 1 1.697 1.697l-2.758 3.152 2.758 3.15a1.2 1.2 0 0 1 0 1.698z"/></svg>
</button>
{% comment %}
{% now "U" as now_second %}
{% if now_second|last == "1" or now_second|last == "6" %}
Expand Down
9 changes: 9 additions & 0 deletions static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,3 +525,12 @@ function vpnBannerLogic() {

vpnPromoFunctions.init();
}

//Micro Survey Banner
function dismissSurvey() {
var survey_banner = document.getElementById("micro-survey-banner");
survey_banner.classList.toggle("hidden");
};

document.getElementById("survey-dismiss").addEventListener("click", dismissSurvey, false);

0 comments on commit f5bc019

Please sign in to comment.