The Straight Dope

Go Back   Straight Dope Message Board > Main > The Game Room

Reply
 
Thread Tools Display Modes
  #1  
Old 12-03-2011, 11:36 PM
fubbleskag fubbleskag is offline
Guest
 
Join Date: Feb 2004
Mafia players: SD Mafia Tools (Chrome extension)

During the last few Mafia games I've played, I found myself wanting to be able to quickly filter the posts on the current page for various reasons. Today, I decided to package a few of these filters into a Chrome extension (sorry FF/Greasemonkey users, no love for you [yet?]).

Version 1.0 is available here and contains the following filters:
  • By Username
  • Online Players
  • (Un)Voters
I'm looking for ideas for more filters or other functionality to add, so please give it a tumble and let me know what you think.

Note: if you wish to inspect the code before installing the extension, download the file from the link above, change the file extension to .zip and then view the contents with your favourite archive program.
Reply With Quote
Advertisements  
  #2  
Old 12-04-2011, 08:28 AM
fubbleskag fubbleskag is offline
Guest
 
Join Date: Feb 2004
So, I already have some ideas for stuff to add to the next version:

- the ability to give each player in a game a town/scum rating; I'm thinking a scale of +5 through -5 with 0 being the default (neutral) and the extremes being for confirmed/dead players
- filters to only show posts from players with certain ratings/ranges
- right now the toolbar is shown on any SDMB thread; it's fairly unobtrusive, but I think I can find a way to only have a small icon appear in the address bar on threads with 'mafia' in the title; clicking the icon would then display the toolbar and add that thread to a list of threads to automatically display the toolbar when reading (a close button would be added to the toolbar which would remove a thread from this list)
- I'd also like to add a toolbar button that will retrieve all posts from all pages in the thread via an ajax call and display them in the current page; this would make the filters a lot more useful, I think, being able to filter the entire game instead of just a single page, which even when set to 200 posts per page is usually not an entire Day
- also considering changing the filter setup from being single filter buttons to a set of checkboxes to allow the use of multiple filters; this is lower priority unless I get the page consolidation function working and add more filters first
Reply With Quote
  #3  
Old 12-04-2011, 02:55 PM
Chronos Chronos is offline
Charter Member
 
Join Date: Jan 2000
Location: The Land of Cleves
Posts: 47,968
How does your script recognize voters/unvoters? Does it assume a color scheme, or does it look for the word "vote" (or "unvote") followed by a username? Does it correctly deal with quoted votes?
Reply With Quote
  #4  
Old 12-04-2011, 03:09 PM
fubbleskag fubbleskag is offline
Guest
 
Join Date: Feb 2004
Quote:
Originally Posted by Chronos View Post
How does your script recognize voters/unvoters? Does it assume a color scheme, or does it look for the word "vote" (or "unvote") followed by a username? Does it correctly deal with quoted votes?
The vote filter looks for any coloured text, excluding green, containing the word "vote"; assuming quoters bleach the votes like they're supposed to, this should suffice. I'll look into automatically excluding quoted votes, it should be doable, I think.
Reply With Quote
  #5  
Old 12-06-2011, 04:14 PM
fubbleskag fubbleskag is offline
Guest
 
Join Date: Feb 2004
Quote:
Originally Posted by fubbleskag View Post
- I'd also like to add a toolbar button that will retrieve all posts from all pages in the thread via an ajax call and display them in the current page; this would make the filters a lot more useful, I think, being able to filter the entire game instead of just a single page, which even when set to 200 posts per page is usually not an entire Day
I was able to get this sorted for the most part; just need to figure out why it seems to be breaking the vBulletin multi-quote function...
Reply With Quote
  #6  
Old 12-06-2011, 08:53 PM
Meeko Meeko is offline
Charter Member
 
Join Date: Dec 2001
Location: Marietta, GA
Posts: 7,699
Quote:
Originally Posted by Chronos View Post
How does your script recognize voters/unvoters? Does it assume a color scheme, or does it look for the word "vote" (or "unvote") followed by a username? Does it correctly deal with quoted votes?

OH HELL NO.


Chronos wrote this......


Double Hell no.



But hey, can you make an extension that makes me sound coherent? I think Big T might be bothered to help you.
Reply With Quote
  #7  
Old 12-06-2011, 08:54 PM
Meeko Meeko is offline
Charter Member
 
Join Date: Dec 2001
Location: Marietta, GA
Posts: 7,699
NETA : Or at least a mafia extension that gives me 25 hours in the day, so that I can re-join you guys.
Reply With Quote
  #8  
Old 12-06-2011, 10:30 PM
Suburban Plankton Suburban Plankton is offline
Guest
 
Join Date: Jul 2003
The "By Username" filter doesn't seem to be doing anything...what am I doing wrong?

I'm using version 16.0.912.59 beta

Last edited by Suburban Plankton; 12-06-2011 at 10:31 PM.
Reply With Quote
  #9  
Old 12-08-2011, 06:39 AM
fubbleskag fubbleskag is offline
Guest
 
Join Date: Feb 2004
Quote:
Originally Posted by Suburban Plankton View Post
The "By Username" filter doesn't seem to be doing anything...what am I doing wrong?

I'm using version 16.0.912.59 beta
that version is currently unsupported and is likely deleting files from your hard drive as we speak.
Reply With Quote
  #10  
Old 12-08-2011, 09:07 PM
Suburban Plankton Suburban Plankton is offline
Guest
 
Join Date: Jul 2003
Well, lucky for me that it's now updated to 16.0.912.63.

Whew! I really dodged a bullet there, didn't I?
Reply With Quote
  #11  
Old 12-09-2011, 11:58 AM
Suburban Plankton Suburban Plankton is offline
Guest
 
Join Date: Jul 2003
And it works now
Reply With Quote
  #12  
Old 12-09-2011, 01:29 PM
fubbleskag fubbleskag is offline
Guest
 
Join Date: Feb 2004
Quote:
Originally Posted by Suburban Plankton View Post
And it works now
I am planning to eventually update that filter so that players can be chosen from a list rather manually entered...
Reply With Quote
  #13  
Old 04-17-2012, 01:00 PM
fubbleskag fubbleskag is offline
Guest
 
Join Date: Feb 2004
Quote:
Originally Posted by fubbleskag View Post
I am planning to eventually update that filter so that players can be chosen from a list rather manually entered...
I did this eons ago but apparently didn't upload the change, which I've just done.
Reply With Quote
  #14  
Old 04-18-2012, 11:49 PM
BigT BigT is offline
Guest
 
Join Date: Aug 2008
May I ask what the trouble is in getting it to work in GreaseMonkey on Firefox?
Reply With Quote
  #15  
Old 01-25-2013, 06:48 AM
fubbleskag fubbleskag is offline
Guest
 
Join Date: Feb 2004
The link in the OP has now been updated to version 2.0 which is just a fancy way of saying that the manifest.json file has been updated to the new format required by Chrome.

It seems the little icon I included in the toolbar has been broken by the update, I'll get around to fixing that soon(tm).

Just to re-cap, these are the functions that this extension provides for in it's current state:

- Page consolidation: at a button click, all pages of the current thread will be consolidated and loaded into the browser; on really long game threads this can take a few seconds, but I find that it makes the filters below more useful

- Filters: at a button click, or via drop-down, the posts on the page can be filtered to show only a specific player or all posts containing un-bleached votes

Edit: a known bug - after page consolidation, multi-quote toggling is broken (and possibly some other cookie-related features)

Last edited by fubbleskag; 01-25-2013 at 06:49 AM.
Reply With Quote
  #16  
Old 01-25-2013, 10:57 AM
Chronos Chronos is offline
Charter Member
 
Join Date: Jan 2000
Location: The Land of Cleves
Posts: 47,968
Quote:
- Filters: at a button click, or via drop-down, the posts on the page can be filtered to show ... all posts containing un-bleached votes
Hm, that could be really useful. Now all we need is a fuzzy-matching routine to correct misspelled or nicknamed usernames and count up the totals.

Actually, one other more realistic request: Would it be possible to add a filter for end-of-Day/Night posts? Or at least, posts by the moderator of the game? It's useful when looking at vote posts to be able to see at a glance which Day they were made on.
Reply With Quote
  #17  
Old 01-25-2013, 01:19 PM
Dizzymrslizzy Dizzymrslizzy is offline
Guest
 
Join Date: Jan 2013
I'm dumb, I can't figure out how to install a chome extension......


<---Ex- IT consultant at her finest right now! LMAO
Reply With Quote
  #18  
Old 01-25-2013, 03:05 PM
Mahaloth Mahaloth is offline
Charter Member
 
Join Date: Apr 2000
Location: 地球
Posts: 19,344
My chrome said it will not install extensions from this web site. How do I change that?
Reply With Quote
  #19  
Old 01-25-2013, 03:31 PM
Dizzymrslizzy Dizzymrslizzy is offline
Guest
 
Join Date: Jan 2013
That's where I'm at too Mahaloth!
Reply With Quote
  #20  
Old 01-26-2013, 10:55 AM
Mahaloth Mahaloth is offline
Charter Member
 
Join Date: Apr 2000
Location: 地球
Posts: 19,344
Quote:
Originally Posted by Mahaloth View Post
My chrome said it will not install extensions from this web site. How do I change that?
Anyone?
Reply With Quote
  #21  
Old 01-26-2013, 03:44 PM
Suburban Plankton Suburban Plankton is offline
Guest
 
Join Date: Jul 2003
1) Right click on the link and download the file (SDMB Mafia Tools.crx) to your hard drive.

2) Open the extensions page in Chrome (chrome://extensions/).

3) Open the folder where you save the extension, then click and drag the file onto the Chrome Extensions page. It will then install.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:10 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Send questions for Cecil Adams to: cecil@chicagoreader.com

Send comments about this website to: webmaster@straightdope.com

Terms of Use / Privacy Policy

Advertise on the Straight Dope!
(Your direct line to thousands of the smartest, hippest people on the planet, plus a few total dipsticks.)

Publishers - interested in subscribing to the Straight Dope?
Write to: sdsubscriptions@chicagoreader.com.

Copyright © 2013 Sun-Times Media, LLC.