|
1 | | -var flexibility = require("flexibility"); |
| 1 | +require("flexibility#?./needs-flexibility"); |
2 | 2 | require("./canjs.less!"); |
3 | 3 | var LoadingBar = require('./loading-bar.js'); |
4 | 4 | $ = require("jquery"); |
@@ -32,8 +32,9 @@ var $articleContainer, |
32 | 32 | init(); |
33 | 33 |
|
34 | 34 | // flexbox for ie9/10 |
35 | | - flexibility(document.getElementById('everything')); |
36 | | - //flexibility(document.documentElement); |
| 35 | + if(typeof flexibility !== 'undefined'){ |
| 36 | + flexibility(document.getElementById('everything')); |
| 37 | + } |
37 | 38 |
|
38 | 39 | // prevent sidebar from changing width when header hides |
39 | 40 | $('#left').css('min-width', $('.top-left').width()); |
@@ -224,7 +225,7 @@ function navigate(href, updateLocation) { |
224 | 225 | }, |
225 | 226 | success: function(content) { |
226 | 227 |
|
227 | | - if(updateLocation !== false){ |
| 228 | + if(window.history.pushState && updateLocation !== false){ |
228 | 229 | window.history.pushState(null, null, href); |
229 | 230 | } |
230 | 231 |
|
@@ -284,7 +285,7 @@ function navigate(href, updateLocation) { |
284 | 285 | } |
285 | 286 | }, |
286 | 287 | error: function() { |
287 | | - if(updateLocation !== false){ |
| 288 | + if(window.history.pushState && updateLocation !== false){ |
288 | 289 | window.history.pushState(null, null, href); |
289 | 290 | } |
290 | 291 | // just reload the page if this fails |
|
0 commit comments