diff --git a/src/static/js/pad_editbar.js b/src/static/js/pad_editbar.js index d39bfecd7..bdf2d5569 100644 --- a/src/static/js/pad_editbar.js +++ b/src/static/js/pad_editbar.js @@ -181,7 +181,7 @@ var padeditbar = (function() }, redrawHeight: function(){ var editbarHeight = $('.menu_left').height() + 2 + "px"; - var containerTop = $('.menu_left').height() + 5 + "px"; + var containerTop = $('.menu_left').height() + 7 + "px"; $('#editbar').css("height", editbarHeight); $('#editorcontainer').css("top", containerTop); }, diff --git a/src/static/js/pluginfw/installer.js b/src/static/js/pluginfw/installer.js index bf779d7ac..90bd9aa27 100644 --- a/src/static/js/pluginfw/installer.js +++ b/src/static/js/pluginfw/installer.js @@ -66,7 +66,12 @@ exports.getAvailablePlugins = function(maxCacheAge, cb) { if(exports.availablePlugins && maxCacheAge && Math.round(+new Date/1000)-cacheTimestamp <= maxCacheAge) { return cb && cb(null, exports.availablePlugins) } - plugins = JSON.parse(plugins); + try { + plugins = JSON.parse(plugins); + } catch (err) { + console.error('error parsing plugins.json:', err); + plugins = []; + } exports.availablePlugins = plugins; cacheTimestamp = Math.round(+new Date/1000); cb && cb(null, plugins) diff --git a/src/templates/pad.html b/src/templates/pad.html index b996ab6a5..f02670022 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -41,7 +41,11 @@ <% e.begin_block("styles"); %> + + <% e.begin_block("customStyles"); %> + <% e.end_block(); %> + <% e.end_block(); %> @@ -345,7 +349,9 @@ + <% e.begin_block("customScripts"); %> + <% e.end_block(); %>