feat: child themes - disable features if it doesn't exist instead of erroring out

main
psychobunny 4 years ago
parent 13f621319b
commit f372c9c12d

@ -28,6 +28,10 @@ $(document).ready(function () {
}
function configureNavbarHiding() {
if (!$.fn.autoHidingNavbar) {
return;
}
var navbarEl = $(".navbar-fixed-top");
navbarEl.autoHidingNavbar('destroy');
navbarEl.css('top', '');
@ -41,6 +45,10 @@ $(document).ready(function () {
}
function setupNProgress() {
if (typeof NProgress === 'undefined') {
return;
}
$(window).on('action:ajaxify.start', function () {
NProgress.set(0.7);
});
@ -141,7 +149,6 @@ $(document).ready(function () {
return;
}
require(['pulling', 'storage'], function (Pulling, Storage) {
if (!Pulling) {
return;
@ -425,7 +432,9 @@ $(document).ready(function () {
$(window).on('action:ajaxify.end', function (ev, data) {
if (data.url && data.url.match('^topic/') && config.enableQuickReply) {
require(['persona/quickreply'], function (quickreply) {
quickreply.init();
if (quickreply) {
quickreply.init();
}
});
}
});

Loading…
Cancel
Save