diff options
| author | 8n-tech <8n-tech@users.noreply.github.com> | 2015-04-21 01:39:44 +1000 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-05-05 13:22:11 +0200 |
| commit | e64b01b6903c5b1f1498627db919a50c4e0ff88c (patch) | |
| tree | f71fe38fe07666f5dcaa75d1ae89a246a0d37c6f /js/post-filter.js | |
| parent | 6b04b3c671fdcaa85be97c14336219217b193cc5 (diff) | |
Javascript ammendments, dio_ on Windows.
Signed-off-by: 8n-tech <8n-tech@users.noreply.github.com>
Diffstat (limited to 'js/post-filter.js')
| -rw-r--r-- | js/post-filter.js | 9 |
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'); + } } |
