Lobbyradar is a Browserextension which uses Data available on lobbyradar.opendatacloud.de Lobbyradar is meant to run on Chrome, Safari and Firefox. It is built using the BabelExt Project. BabelExt simplifies cross-browser development of Extensions. It abstracts Message passing between background- and foreground scripts. Background scripts are run in the Context of the Extension. They have access to the extension data, here: settings and lobbydata. Foreground scripts are injected into the current page and can modify the DOM and interact with the UI. BabelExt comes with an unusual Build-Script based on PhantomJS.
I had to modify BabelExt for lobbyradar, so browser abstraction is somewhat lost.
lib/: Background and Foreground scripts, settings files (settings.json, local_settings.json) test/: Test-Page with many names and an iframe. Serve this directory with a web server to test your extension. build/: Installable Extensions generated by the build script.
Chrome/: the Chrome-Extension. This Directory is modified by the build script. Safari.safariextension/: the Safari extension. Modified by build script and Safaris extensions builder (Info.plist) Firefox/: the Firefox extension. Modified by Build script and Firefox-SDK.
Do not delete the Extension directories! The build script generates only part of the files.
fg_page.js: Injected into the Page. The same for all Browsers bg_*.js: Background Scripts. One Version for Chrome/Safari, different for Firefox.
Background-scripts for Chrome/Safari are modified in lib/. Background-scripts for Firefox are modified in Firefox/.
I strongly recommend to understand the build script.
Download PhantomJS (http://phantomjs.org), which is used to build and deploy browser-extensions. You need to have the Chrome Browser installed to build the Chrome extension.
In UNIX-based OSes, run ./bin/build.sh
The build system hasn't been tested under Windows yet - your best bet is probably to look at the scripts and write a Windows equivalent. If it's any good, please send in a patch!
IMPORTANT SAFARI NOTE: If the extension directory does not end in ".safariextension", it will not be recognized by Safari. Symlinks inside the extension directory are not allowed.
- You need to build the package before you start - the initial build process configures some files that aren't stored in git
-
Go to about://extensions
-
Check "Developer Mode"
-
Click "load unpacked extension" and choose the Chrome directory
-
You're good to go! If you just want to try out the BabelExt kitchen sink demo, navigate to http://babelext.com/demo/
-
Further Chrome development information can be found at http://code.google.com/chrome/extensions/index.html
-
Install firefox developer edition
-
Install Auto-Installer Extension https://addons.mozilla.org/addon/autoinstaller/
-
Further Firefox development information can be found at https://addons.mozilla.org/en-US/developers/docs/sdk/latest/
-
Click the gear icon, and choose Settings -> Preferences -> Advanced
-
Check the box that reads "Show Develop menu in menu bar"
-
Click the menu button (left of the gear icon), and choose Develop -> Show Extension Builder
-
Click the + button at the bottom left, and choose "Add Extension"
-
Choose the Safari.safariextension folder from lobbyradar
-
Further Safari development information can be found at https://developer.apple.com/library/safari/#documentation/Tools/Conceptual/SafariExtensionGuide/Introduction/Introduction.html
You need to release your extension by hand in each Extension store.
MIT (X11) license. See LICENSE.txt