# כפה ניווט תחתון עם קוקי

**URL:** <https://meta.discourse.org/t/force-footer-nav-with-cookie/207687>\
**Category:** Feature\
**Created:** [31 באוקטובר,‏ 2021,‏ 12:17am UTC](https://meta.discourse.org/t/force-footer-nav-with-cookie/207687 "2021-10-31T00:17:00Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![alanost](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alanost/32/230952_2.png) [@alanost](https://meta.discourse.org/u/alanost)\
**Post date:** [31 באוקטובר,‏ 2021,‏ 9:14am UTC](https://meta.discourse.org/t/force-footer-nav-with-cookie/207687/5 "2021-10-31T09:14:33Z")

</div>

It works perfectly! Thank you very much 🙂

My final code:

```js
<script type="text/discourse-plugin" version="0.8">
function getCookie(cname) {
  let name = cname + "=";
  let decodedCookie = decodeURIComponent(document.cookie);
  let ca = decodedCookie.split(';');
  for(let i = 0; i <ca.length; i++) {
    let c = ca[i];
    while (c.charAt(0) == ' ') {
      c = c.substring(1);
    }
    if (c.indexOf(name) == 0) {
      return c.substring(name.length, c.length);
    }
  }
  return "";
}

if (getCookie("app-platform") != "") {
    const applicationController = api.container.lookup("controller:application");
    applicationController.set("showFooterNav", true);
}
</script>

```

---

_[View the full topic](https://meta.discourse.org/t/force-footer-nav-with-cookie/207687)._
