diff --git a/public/src/utils.js b/public/src/utils.js index fce4d0ecdd..b3d3f756f4 100644 --- a/public/src/utils.js +++ b/public/src/utils.js @@ -153,6 +153,11 @@ .addClass('badge-inverse') } }); + }, + + isRelativeUrl: function(url) { + var firstChar = url.slice(0, 1); + return (firstChar === '.' || firstChar === '/'); } } diff --git a/src/plugins.js b/src/plugins.js index 62de6dc741..4bad96d7e1 100644 --- a/src/plugins.js +++ b/src/plugins.js @@ -20,28 +20,14 @@ var fs = require('fs'), function(plugins, next) { async.each(plugins, function(plugin) { // TODO: Update this check to also check node_modules - var pluginPath = path.join(__dirname, '../plugins/', plugin); - fs.exists(pluginPath, function(exists) { - if (exists) { - fs.readFile(path.join(pluginPath, 'plugin.json'), function(err, data) { - if (err) return next(err); - - var pluginData = JSON.parse(data); - _self.libraries[pluginData.id] = require(path.join(pluginPath, pluginData.library)); - if (pluginData.hooks) { - for(var x=0,numHooks=pluginData.hooks.length;x'); }