X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/df341bdd09208d2b0f84060454cc0000df19deba..309ec8b919d57858254b78cd7ba3b4d84d90da9a:/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(); });