X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/df341bdd09208d2b0f84060454cc0000df19deba..51c6366416694fe151fdcea3d9da7a06a08f7ef1:/src/redakcja/static/js/wiki/loader_readonly.js diff --git a/src/redakcja/static/js/wiki/loader_readonly.js b/src/redakcja/static/js/wiki/loader_readonly.js index 43b8c9b8..2d311239 100644 --- a/src/redakcja/static/js/wiki/loader_readonly.js +++ b/src/redakcja/static/js/wiki/loader_readonly.js @@ -72,22 +72,8 @@ $(function() /* Load configuration */ $.wiki.loadConfig(); - var initAll = function(a, f) { - if (a.length == 0) return f(); - - $.wiki.initTab({ - tab: a.pop(), - doc: CurrentDocument, - callback: function(){ - initAll(a, f); - } - }); - }; - - - /* - * Initialize all perspectives - */ - initAll( $.makeArray($('#tabs li')), initialize); - console.log(location.hash); + $('.tabs li').each((i, e) => { + $.wiki.initTab({tab: e, doc: CurrentDocument}); + }); + initialize(); });