Foursquare SU powertools

Update for Chrome Users (1 July 2011): The Chrome version of this extension has now been superseeded and is no longer being maintained. This is due to a new plugin being developed by Netherlands-based developer Paul van Eijden, with far greater features and inspired by my initial work. The significantly revised and overhauled version of this plugin is known as Foursquare Extension tools for SU, and can now be found at:
https://chrome.google.com/webstore/detail/fhaodkdhmbgaogggcaaihcpinapofffk

It is hoped that the newer version of this plugin will be ported to Firefox and Safari in due course.


Sadly, the Foursquare site isn’t designed to make the life of those performing super user (SU) duties easily.

This script/browser extension (available for Firefox, Chrome and Safari) is a workaround to assist users in performing these duties with venues, and avoid clicking multiple links to perform functions.

At this stage, the script functions are applied only to the Foursquare search page, which is where if you’re an SU1 out hunting for bad venues you should be spending most of your time.

As the script is expanded, further work will be done to enhance the links and features on other pages as appropriate.

Current features

  • Foursquare search page
    • Display venue ID – Extracts and displays the venue ID of each item in the search results. This allows you to easily extract the venue ID to assist with merges, without having to open the page or copy then edit the URL.
    • Manage venue link – Go straight to the Manage venue page, allowing you to close venues, request deletions, and lodge merge details.
    • Edit venue link – Go straight to the edit venue page to update venue details and show larger map view for marker repositioning.

Example

Example of the Foursquare search results page shown without the SU powertools script running

Search page without SU powertools running (click to view larger)

Example of how additional links are inserted onto the search results page

Search page with SU powertools running (click to view larger image)

Future features

A number of features for this script are planned in the future, including:

  • Search: Enable search for venue information on Google Maps from edit venue screen (similar to the address corrections screen)
  • Actions: Provide direct links to venue close, delete and merge options without having to open a new screen.

Prerequisites

  • Firefox: Greasemonkey plugin installed (Firefox), able to access the Google Ajax API website (necessary for jQuery library access).
  • Chrome: None (jQuery is baked into the extension thanks to Google not providing support for the @import function in user scripts)
  • Safari 5+: None (jQuery is baked into the extension thanks to your Apple overlords)

Download

And if you find this script useful, then please consider a small donation to the author. Donations can be made by Paypal.

Changelog

0.1.2 – 16 June 2011

  • Chrome release.

0.1.1 – 12 June 2011

  • Displays venue ID next to venue name to enable easy copying for use with merges.
  • Released as a Safari extension

0.1 – 11 June 2011

  • Initial release
Comments
  1. Mike Solin says:

    Thanks for this! Spotted your post on the Foursquare Superuser forums (the link on the forums includes the parenthesis, but I found it when I got here). This looks like it’ll be quite helpful.

    I can’t get it to work with NinjaKit in Safari, though. I ran it through JSLint, which looks like an error checker – here’s the result:

    11:20: Mixed spaces and tabs.
    12:20: Mixed spaces and tabs.
    13:20: Mixed spaces and tabs.
    34:16: Expected an identifier and instead saw ‘<'.
    34:16: Stopping, unable to continue. (85% scanned).

    Is this an issue with NinjaKit? I've used Greasemonkey a little bit in Firefox, but I keep coming back to Safari (for better or for worse – I like WebKit, but don't like Chrome).

    • Michael H says:

      It’s not been tested with Ninjakit, Greasemonkey/Chrome only at the moment. So yes, I’d suggest a Ninjakit-specific issue ;)

      When I can get round to installing Safari next week, I’ll take a look and see how it handles under Ninkakit and if it can be easily modified to work with it.

    • Michael H says:

      Have just had a look at Ninjakit, and it’s a non-starter. I’ve looked through it’s limited documentation, and It has not implemented enough of the key Greasemonkey functions to be of any use, and it doesn’t even support functions.

      So yeah, while Ninjakit is a nice idea it’s not going to fly as a Greasemonkey replacement for Safari users. The only other option for Safari 5+ is to create an extension that can run a script. The extension also has to be signed. For Safari 4 are earlier, there is a SIMBL plugin called Greasekit which will do the job.

      So for the moment, Mac Safari users are on the sidelines for this one. Nothing I can do for the moment sadly.

  2. Mike Solin says:

    Ah, nuts. Thanks for taking a look, though. I guess I’ll remove NinjaKit, as it’s not a real replacement for Greasemonkey.

    • Michael H says:

      Check your email, I’ve sent you the SU powertools as a Safari Extension to test for me. Fine on my WIn7 Safari 5 install, but best tested on a mac to be on the safe side.

  3. [...] switching between them and digging 2-3 pages deep to get to the proper page for editing. A new Greasemonkey plugin from Michael Harris aims to make the process a little [...]

  4. Any plans for making it compatible with Opera too?

    • Michael H says:

      Sorry, but that’s a big no to Opera compatibility – and there’s a couple of reasons for that.

      1) Opera simply doesn’t have the market penetration (Admit it, Opera is a fringe browser). On the w3schools data, Opera only has 2.4% market penetration. Firefox, Chrome and Safari account for 72% of the market, and combined these provide enough cross-platform to ensure access across all OS platforms.
      2) Converting the script to Opera is too hard, as they don’t support the basic Greasemonkey @require function (necessary for the jQuery support this script requires), and their documentation for making a Greasemonkey script work as intended is non-existent. Sorry, but if they want developers to make products for their platform, they need to get their documentation house in order.
      3) Writing it as a native Opera extension or userscript is also too hard, as you have to use their own API’s to achieve this.
      4) Time – to do it would require an inordinate amount of time to achieve, and the payoff for such a small fringe market segment just isn’t there.

      Taking the script from Greasemonkey and converting to both Safari and Chrome was easy and was not a major strain on my time. This is because both of these browsers allow the use of scripts in the method intended, don’t need custom functions, and the only difference is that jQuery had to be packaged up as part of the extension. It was a no-brainier to provide support for them.

      And as a sidepoint, I also refuse to support IE – as to use a Greasemonkey script or similar the user will have to install a BHO (browser helper object) which can be notoriously dangerous. Doing it as a native extension is too hard, as it requires learning a whole new language. And let’s be honest, real friends don’t let friends use IE.

  5. Hi Michael,

    I’ve published a Chrome extension with a lot more features, I took the liberty of including yours. Please let me know if you would like your name credited.

    https://chrome.google.com/webstore/detail/fhaodkdhmbgaogggcaaihcpinapofffk

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s