Commit 2cd20bd8c96f234ae6f25a27674ece234ec0f01b
1 parent
b7525ac9
cookie
Showing
1 changed file
with
10 additions
and
1 deletions
Show diff stats
src/app/frontend/views/index.php
... | ... | @@ -268,7 +268,16 @@ $page_title = isset( $page_title ) && !empty( $page_title ) ? $page_title : ''; |
268 | 268 | |
269 | 269 | <script> |
270 | 270 | $(document).ready(function(){ |
271 | - setTimeout(function(){$(".open-delivery-modal").show();},1000); | |
271 | + function getCookie(name) { | |
272 | + var matches = document.cookie.match(new RegExp( | |
273 | + "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" | |
274 | + )); | |
275 | + return matches ? decodeURIComponent(matches[1]) : undefined; | |
276 | + } | |
277 | + var cookie = getCookie('popup'); | |
278 | + if (cookie !== '1') { | |
279 | + setTimeout(function(){$(".open-delivery-modal").show();},1000); | |
280 | + } | |
272 | 281 | }); |
273 | 282 | $(".open-delivery-modal div img").click(function(){ |
274 | 283 | $(".delivery-form-par").show(); | ... | ... |