Created
April 20, 2015 05:48
-
-
Save codewithpassion/a55497daf217c9ed82e1 to your computer and use it in GitHub Desktop.
PluginFinderConfig.js with namespace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
window.Cockpit.SystemPlugins = window.Cockpit.SystemPlugins || { PluginFinder: {} } | |
window.Cockpit.SystemPlugins.PluginFinder.PluginFinderConfig = function PluginFinderConfig() { | |
var self = this; | |
self.get = function (pluginName, callback) { | |
$.get('/system-plugin/plugin-finder/config/' + pluginName, function (config) { | |
if (callback !== undefined) | |
callback(config); | |
}); | |
}; | |
self.set = function (pluginName, config) { | |
$.post('/system-plugin/plugin-finder/config/' + pluginName, config); | |
}; | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment