Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a39d3bb0 authored by Scott Main's avatar Scott Main
Browse files

docs: fix resizeAll script for IE6 so that the resizeWidth function

is only called when the side navigation is actually resizable

This stops 'width' cookies from being written for the SDK docs
(and any other page that doesn't have resizable nav) and also adds
some security to the init() function to be sure we properly read
cookie names.
parent 1e43c510
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -136,12 +136,13 @@ function init() {
  sidenav = $("#side-nav");
  devdocNav = $("#devdoc-nav");

  var cookiePath = "";
  if (location.href.indexOf("/reference/") != -1) {
    var cookiePath = "reference_";
    cookiePath = "reference_";
  } else if (location.href.indexOf("/guide/") != -1) {
    var cookiePath = "guide_";
    cookiePath = "guide_";
  } else if (location.href.indexOf("/resources/") != -1) {
    var cookiePath = "resources_";
    cookiePath = "resources_";
  }

  if (!isMobile) {
@@ -269,8 +270,10 @@ function resizeWidth() {
 * avoiding this for all browsers provides better performance */
function resizeAll() {
  resizeHeight();
  if ($(".side-nav-resizable").length) {
    resizeWidth();
  }
}

function getBaseUri(uri) {
  var intlUrl = (uri.substring(0,6) == "/intl/");