Spaz Desktop Custom JavaScript Guide
Spaz Desktop v 0.9.8 and higher supports user customization via
the user.js file. This file is loaded ad the end of
app initialization, and can be used to override almost any aspect
of Spaz behavior.
The user.js file is located in your preferences directory. This location varies on each OS, but you can open your Prefs folder by clicking the "Open Prefs Folder" button in the Preferences tab.
Spaz is a complex application, and wasn't initially designed with a plugin/customization system in mind. However, we've recently added a couple features to make customization easier:
Timeline FilterChains
Each item in a timeline in Spaz is passed through a "FilterChain" – basically a series of functions that modify the item before it is rendered. Built-in filter functions do things like add emoticon images, insert linebreak elements, and link URLs. Here's the set of default filters as of this writing:
Users can add their own filters in the user.js file. Below is an example of a couple filters that remove items that match certain criteria – if a message contains a Foursquare URL, or if the message is posted from TweetDeck.
Here, we've only applied these filters to the "friends" timeline (the main timeline in Spaz). Filters need to be added to each timeline individually.
The example above removes all API-based retweets from your timeline.