I am once again asking for the quote of the month to be changed as it is now a new month - Mjmd

Create an account  

 
Mafia Helper: User script for filtering posts and making tallies

Below is a useful tool for Mafia players and mods.
First, here's another useful tool: Greasemonkey script to avoid spoiler threads

OK, I wrote a script for filtering posts based on poster, aimed at making forum mafia games easier to play.

The scripts installs a small menu in every post's header that lets you expand and collapse it, and lets you collapse all posts by that poster. By collapsing posts from posters you're not currently interested in reading, you can read through a thread focussing on just a select set of posters.

Here's what it looks like in action:


To install it, you need to install the Greasemonkey add-in for Firefox or the Tampermonkey add-in for chrome. Then click this link.

I also got it to work on Android using the Tampermonkey app, but I couldn't get it to work natively in Android's chrome browser.

In Safari (also on iPhone and iPad) you can get it to run as a bookmarklet:
1: Create a bookmark to any page, name it Mafia Helper.
2: Edit the bookmark, delete the bookmark url, and instead paste this code:
Code:
javascript:(function(){document.body.appendChild(document.createElement('script')).src='https://dl.dropboxusercontent.com/u/15215428/mafiahelper/Realms%20Beyond%20Mafia%20Helper.user.js';})();
This modifies your bookmark so that it runs a script that loads the Mafia Helper script when you click the bookmark.
3: To use Mafia Helper, navigate to a mafia thread, then select your Mafia Helper bookmark. The Mafia Helper script will load and the Mafia Helper functionality will appear.
4: When you switch pages the page reloads and you unfortunately have to reselect the Mafia Helper bookmark to reload the script. It's a bit clunky, but you get used to it. Also, you can modify your forum profile settings to display 200 posts per page to mitigate the problem.
I have to run.
Reply

Well ... it could also be used to ignore certain posters if you find them annoying tongue

Shouldn't it rather be posted in 'Off Topic' through?
Reply

(September 1st, 2013, 13:32)Sian Wrote: Well ... it could also be used to ignore certain posters if you find them annoying tongue

Shouldn't it rather be posted in 'Off Topic' through?

Haha. smile It works on a thread by thread basis though. You actually have an option in your control panel I think for ignoring users completely.

If somebody wants to move this thread to Off Topic I won't object, I just posted it here as it's targeting Mafia games. I hope to extend the script with functionality for compiling vote tallies as well.
I have to run.
Reply

I just installed this and it works great. Thank you for putting the work into this Novice.thumbsup If you can make it do tallies as well that would be great, since Rowain doesn't play in every game.
Reply

Maybe just limit it to recognizing votes in posts and displaying them in the headers of the posts, for much easier (manual) tallying.

Otherwise you probably need to use GM_XMLHttpRequest to fetch the entire thread. Possible, but a bit messy.
If you know what I mean.
Reply

zakalwe Wrote:Maybe just limit it to recognizing votes in posts and displaying them in the headers of the posts, for much easier (manual) tallying.

Otherwise you probably need to use GM_XMLHttpRequest to fetch the entire thread. Possible, but a bit messy.

Yeah I'm going to display votes and quotes in the post headers.

For tallying I was thinking I could add a button for tagging a post as a day start. Store in local storage what votes have been found for a thread, and for posts where I know about all votes from a day start and up to that current post, I'll display a tally. So by navigating through the thread from start to finish and tagging off day starts, you get tallies for all posts.

I could also add support for recognizing day and night starts from special codes in the mod's posts. E.g. post MafiaHelper: Day start to start a day.
I have to run.
Reply

Everyone, read the EULA for this script! It says that whoever uses it can't vote to lynch Novice in any werewolf game he participates in! Everyone, be careful!!

lol

Thanks, Novice. This is a very useful tool. The only thing left for me now is actually to learn how to find wolves.
Reply

(September 1st, 2013, 18:51)Ichabod Wrote: The only thing left for me now is actually to learn how to find wolves.

Easy, just do this.

Ichabod
Reply

Suggestion: Add a filter option to show only posts by this poster.

Edit: Also, an option somewhere to clear all filters.
If you know what I mean.
Reply

I updated the script to include votes and quotes in the post headers. I think you simply click the link in the first post again to update your installation.
I have to run.
Reply



Forum Jump: