summaryrefslogtreecommitdiff
path: root/js/post-filter.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/post-filter.js')
-rw-r--r--js/post-filter.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/js/post-filter.js b/js/post-filter.js
index aaab4d0e..023b54e4 100644
--- a/js/post-filter.js
+++ b/js/post-filter.js
@@ -1,6 +1,7 @@
if (active_page === 'thread' || active_page === 'index' || active_page === 'catalog') {
- $(document).ready(function () {
+ $(document).on('menu_ready', function () {
'use strict';
+
// returns blacklist object from storage
function getList() {
return JSON.parse(localStorage.postFilter);
@@ -200,7 +201,7 @@ if (active_page === 'thread' || active_page === 'index' || active_page === 'cata
* create filter menu when the button is clicked
*/
function initPostMenu(pageData) {
-
+ var Menu = window.Menu;
var submenu;
Menu.add_item('filter-menu-hide', _('Hide post'));
Menu.add_item('filter-menu-unhide', _('Unhide post'));
@@ -836,4 +837,8 @@ if (active_page === 'thread' || active_page === 'index' || active_page === 'cata
}
init();
});
+
+ if (typeof window.Menu !== "undefined") {
+ $(document).trigger('menu_ready');
+ }
}