Javascript ammendments, dio_ on Windows.

Signed-off-by: 8n-tech <8n-tech@users.noreply.github.com>
This commit is contained in:
8n-tech
2015-04-21 01:39:44 +10:00
committed by czaks
parent 6b04b3c671
commit e64b01b690
5 changed files with 72 additions and 57 deletions

View File

@@ -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');
}
}