Filter log with JS(still broken)