瀏覽代碼

attributes contain strings, not booleans

El RIDO 8 年之前
父節點
當前提交
0938b59b90
共有 3 個文件被更改,包括 4 次插入5 次删除
  1. 2 3
      js/privatebin.js
  2. 1 1
      tpl/bootstrap.php
  3. 1 1
      tpl/page.php

+ 2 - 3
js/privatebin.js

@@ -2730,15 +2730,14 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) {
         };
         };
 
 
         /**
         /**
-         * collapses the navigation bar if nedded
+         * collapses the navigation bar, only if expanded
          *
          *
          * @name   TopNav.collapseBar
          * @name   TopNav.collapseBar
          * @function
          * @function
          */
          */
         me.collapseBar = function()
         me.collapseBar = function()
         {
         {
-            if ($('#navbar').attr('aria-expanded')) {
-                // if so, toggle it
+            if ($('#navbar').attr('aria-expanded') == 'true') {
                 $('.navbar-toggle').click();
                 $('.navbar-toggle').click();
             }
             }
         };
         };

+ 1 - 1
tpl/bootstrap.php

@@ -75,7 +75,7 @@ if ($MARKDOWN):
 <?php
 <?php
 endif;
 endif;
 ?>
 ?>
-		<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-4UWESerlTU/BJPR9ew+ILaiLunjhQa+9asT2/1MY2zQ2dSxnJ3orDUFOq4CU+KrnkK/9sWwmUobshOUGkVMygQ==" crossorigin="anonymous"></script>
+		<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-4FhlV3SGdZZDDRIrK5D2Puk62mehFojDOjm0wvOlhuHBxSKSXw5erCi869ZDa/cz6j27b9KidKBnB5XlF+EAkA==" crossorigin="anonymous"></script>
 		<!--[if lt IE 10]>
 		<!--[if lt IE 10]>
 		<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
 		<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
 		<![endif]-->
 		<![endif]-->

+ 1 - 1
tpl/page.php

@@ -54,7 +54,7 @@ if ($QRCODE):
 <?php
 <?php
 endif;
 endif;
 ?>
 ?>
-		<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-4UWESerlTU/BJPR9ew+ILaiLunjhQa+9asT2/1MY2zQ2dSxnJ3orDUFOq4CU+KrnkK/9sWwmUobshOUGkVMygQ==" crossorigin="anonymous"></script>
+		<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-4FhlV3SGdZZDDRIrK5D2Puk62mehFojDOjm0wvOlhuHBxSKSXw5erCi869ZDa/cz6j27b9KidKBnB5XlF+EAkA==" crossorigin="anonymous"></script>
 		<!--[if lt IE 10]>
 		<!--[if lt IE 10]>
 		<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
 		<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
 		<![endif]-->
 		<![endif]-->