X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/56df64063dcf46166e366ddf7e292b21a07e1003..refs/pull/232/head:/resources/assets/js/global.js diff --git a/resources/assets/js/global.js b/resources/assets/js/global.js index cc868a0ea..9ca335ee7 100644 --- a/resources/assets/js/global.js +++ b/resources/assets/js/global.js @@ -134,6 +134,23 @@ $(function () { $('.popup-close').click(function() { $(this).closest('.overlay').fadeOut(240); }); + $('.overlay').click(function(event) { + if (!$(event.target).hasClass('overlay')) return; + $(this).fadeOut(240); + }); + + // Prevent markdown display link click redirect + $('.markdown-display').on('click', 'a', function(event) { + event.preventDefault(); + window.open($(this).attr('href')); + }); + + // Detect IE for css + if(navigator.userAgent.indexOf('MSIE')!==-1 + || navigator.appVersion.indexOf('Trident/') > 0 + || navigator.userAgent.indexOf('Safari') !== -1){ + $('body').addClass('flexbox-support'); + } });