From b80c9221b48784692a7f454ca173c4a267c9f4c0 Mon Sep 17 00:00:00 2001 From: tschilling Date: Tue, 15 Jul 2014 21:30:25 -0400 Subject: Making a basic javascript API for the toolbar. --- debug_toolbar/static/debug_toolbar/js/toolbar.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'debug_toolbar') diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.js b/debug_toolbar/static/debug_toolbar/js/toolbar.js index 2a6df02..9f8523c 100644 --- a/debug_toolbar/static/debug_toolbar/js/toolbar.js +++ b/debug_toolbar/static/debug_toolbar/js/toolbar.js @@ -1,4 +1,4 @@ -(function ($) { +(function ($, publicAPI) { var djdt = { handleDragged: false, events: { @@ -280,5 +280,11 @@ } } }; + $.extend(publicAPI, { + show_toolbar: djdt.show_toolbar, + hide_toolbar: djdt.hide_toolbar, + close: djdt.close, + cookie: djdt.cookie + }); $(document).ready(djdt.init); -})(djdt.jQuery); +})(djdt.jQuery, djdt); -- cgit v1.2.3