Coder Social home page Coder Social logo

wegewerk / lobbyradar-extension Goto Github PK

View Code? Open in Web Editor NEW
5.0 7.0 19.0 21.71 MB

The Lobbyradar browser plugin shows you connections of persons and organisations connected to lobbying activities.

License: MIT License

JavaScript 80.01% CSS 15.07% HTML 4.92% Shell 0.01%

lobbyradar-extension's Introduction

Lobbyradar

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.

Directories

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.

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.

Build process

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.

Instructions for loading/testing an extension in each browser

  • You need to build the package before you start - the initial build process configures some files that aren't stored in git

Chrome / Opera

Firefox

Safari

Releasing packages

You need to release your extension by hand in each Extension store.

LICENSE

MIT (X11) license. See LICENSE.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.