diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 15a9791f2..954ee7b57 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -12557,10 +12557,17 @@ Style.padding(); Style.iconPositions(); if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) { - return $.on(exLink, "click", function() { + $.on(exLink, "click", function() { return setTimeout(Rice.nodes, 100); }); } + if (g.VIEW === 'catalog') { + if (!$.id('threads').children.length) { + return setTimeout((function() { + return $.globalEval('fourcat.init(); fourcat.loadCatalog(catalog);'); + }), 1000); + } + } }, observe: function() { var onMutationObserver; diff --git a/builds/crx/script.js b/builds/crx/script.js index b86b0446f..eba3a8d17 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -12551,10 +12551,17 @@ Style.padding(); Style.iconPositions(); if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) { - return $.on(exLink, "click", function() { + $.on(exLink, "click", function() { return setTimeout(Rice.nodes, 100); }); } + if (g.VIEW === 'catalog') { + if (!$.id('threads').children.length) { + return setTimeout((function() { + return $.globalEval('fourcat.init(); fourcat.loadCatalog(catalog);'); + }), 1000); + } + } }, observe: function() { var onMutationObserver; diff --git a/src/Theming/Style.coffee b/src/Theming/Style.coffee index eea22fcfb..9f2a8fd48 100644 --- a/src/Theming/Style.coffee +++ b/src/Theming/Style.coffee @@ -67,6 +67,11 @@ Style = if exLink = $ "#navtopright .exlinksOptionsLink", d.body $.on exLink, "click", -> setTimeout Rice.nodes, 100 + + if g.VIEW is 'catalog' + unless $.id('threads').children.length + # Race conditions + setTimeout (-> $.globalEval 'fourcat.init(); fourcat.loadCatalog(catalog);'), 1000 observe: -> if window.MutationObserver