Merge pull request #32 from olinpin/fix/blocked

Blocked
This commit is contained in:
2022-11-03 17:27:42 +01:00
committed by GitHub
4 changed files with 8 additions and 2 deletions

View File

Binary file not shown.

View File

@@ -13,7 +13,7 @@ root_content_path = 'dashboard_static'
# the action will be called with the context and the event
@event('init')
def setup(ctx, e):
start_offline_tweets('sports1.txt', event_name="tweet", time_factor=0.01)
start_offline_tweets('sports1.txt', event_name="tweet", time_factor=0.1)
ctx.count = 0
# fire('sample', {'previous': 0.0})

View File

@@ -116,7 +116,7 @@
</div>
<div class="popchart column">
<span class="colheader chartheader">Sports Popularity Filter</span>
<span class="colheader chartheader">Sports Popularity Pie Chart</span>
<div id="pie" style="height:300px; background-color: white;"></div>
</div>

View File

@@ -58,6 +58,12 @@ function tweetCell(tweet) {
}
function filterTweets(tweets, bannedWords=[], searchWords=[], sorted, order) {
if(bannedWords.length == 1 && bannedWords[0] == ""){
bannedWords = []
}
if(searchWords.length == 1 && searchWords[0] == ""){
searchWords = []
}
if(bannedWords.length > 0){
tweets = filterBannedWords(bannedWords, tweets)
}