Coder Social home page Coder Social logo

trigger-corp / browser-extensions Goto Github PK

View Code? Open in Web Editor NEW
312.0 26.0 52.0 28.27 MB

Build and run cross-platform browser extensions from one codebase.

License: Other

JavaScript 54.49% HTML 1.02% Shell 0.01% PowerShell 0.05% Python 16.21% CSS 0.17% NSIS 21.27% C 0.24% Pascal 0.15% C++ 6.25% Batchfile 0.09% Assembly 0.05%

browser-extensions's Introduction

OpenForge

Build and run cross-platform browser extensions from one codebase.

Please see the introductory blog post for details on the history of this project.

Documentation can be found here.

Dependencies

Ubuntu

  • Python dependencies: sudo apt-get install python-setuptools python-pip python-virtualenv
  • Mercurial: sudo apt-get install mercurial
  • Git: sudo apt-get install git
  • Java Runtime: sudo apt-get install default-jre
  • NSIS: sudo apt-get install nsis (Only needed if you want to do IE builds)

OSX:

Windows::

Installation

Clone Repo:

git clone https://github.com/trigger-corp/browser-extensions.git

Create Python Environment:

cd browser-extensions
virtualenv --no-site-packages ./python-env

Activate Python Environment (Unix):

source ./python-env/bin/activate

Activate Python Environment (Windows):

.\python-env\Scripts\activate.bat

Setup Python Environment:

cd generate
pip install -r requirements.txt
python setup.py develop
cd ..

Using OpenForge

Activate Python Environment (Unix):

source ./python-env/bin/activate

Activate Python Environment (Windows):

.\python-env\Scripts\activate.bat

Creating a new extension:

Create a directory for your extension, change into it and then run:

forge-extension create

Building an extension:

forge-extension build <platform>

Where <platform> is one of chrome, safari, firefox or ie

Packaging an extension:

forge-extension package <platform>

Where <platform> is one of chrome, safari, firefox or ie

Examples

IE Plugin with Background and Content Scripts:

https://github.com/rei-colina-experiments/ie-browser-extension-demo Includes setup instructions and an explanation of how background and content scripts work.

Testing OpenForge

Generate test suites:

forge-module-test-app -o ~/forge-workspace/v2automated/src -t automated all
forge-module-test-app -o ~/forge-workspace/v2interactive/src -t interactive all

browser-extensions's People

Contributors

antoinevg avatar hdlopez avatar jaredsohn avatar makern avatar mlissner avatar patcon avatar reicolina avatar sdaicz avatar vkurdin-aw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

browser-extensions's Issues

Why require an index.html file?

Thanks for open sourcing this tool! It seems really great.

Trying to use it for https://github.com/gittip/Gittip-Everywhere, which is essentially a userscript to resurface certain websites. I'm being forced to add an index.html file, and it's not entirely clear why I need it. If I understand correctly, this tool doesn't necessarily need to add a browser extension button, so why the index.html requirement?

Thanks!

IE9+ packages button issue

I have installed all the dependencies as readme.md suggests and tried packaging IE extension with the interactive test suite. For some reason, the plugin button is not visible on the favorites and tool bar (#29) but is visible on the command bar. After IE restart, the button is not visible anywhere although the extension is still enabled in the add-on list.

I have tried installing the dependencies, packaging and testing on a fresh install of English version of Windows (VM) just to check if the problem comes from my usual (non-English) work environment. The results seems to be the same.

Basic extension Locks up browser on IE 11 + Win 7 64bit

I packaged a basic extension for IE, nothing added to the generated skeleton except a button.

It installs fine on WIN8 + IE11, but it locks the browser up on loading for both IE 11 and IE 10 on all of the WIN 7 64bit machines that I have access to. (5) of them. Any thoughts on where to look?

ImportError: No module named forge

I am trying to build browser extension , but the forge module is not found. Perhaps i am doing something wrong here. Can you please help ?

a firefox popup problem

I am trying to build browser extension, it can display a popup on chrome. However, it can't display a popup on firefox, how should I do ? THX~

can't access dead object forge-panel.js:6
/**

  • If set to true frame loaders between xul panel frame and
  • hidden frame are swapped. If set to false frame loaders are
  • set back to normal. Setting the value that was already set will
  • have no effect.
    */
    set _frameLoadersSwapped(value) {
    if (this.__frameLoadersSwapped == value) return;
    this._frame.QueryInterface(Ci.nsIFrameLoaderOwner)
    .swapFrameLoaders(this._viewFrame); <<<<------ this line
    this.__frameLoadersSwapped = value;
    },
    __frameLoadersSwapped: false,

Getting started with a browser extension for IE

Hi,
I'm new to OpenForge. I'm trying to build the weather app as a browser extension for IE. For Chrome I managed to get something working. Is there anyone out there who can help me to get a working IE extension?

Thanks in advance,
Merijn

Add new co-maintainers

Just wondering whether you might be open to using the pull request hack :)
http://felixge.de/2013/03/11/the-pull-request-hack.html

Having spoken with a few different groups about leveraging this project, the lack of activity in the past few months is a slight cause for concern, as far as I can tell. (Not shaming anyone, as I've only spoken up in the past 8 hours yetand do not expect a reply, but the point has been consistently raised with everyone who I've pointed this way.)

Thanks again! :)

forge.message.listen's reply message is picked up by wrong activation

Here is a simplified version of my extension that exhibits the problem:

  1. Background page has:

forge.message.listen(
function(scriptname, reply) {
reply(true);
}, function(err) {
console.log(err);
}
);

  1. I have at least two activations that consist of the following code:

var __activation_id = "$SCRIPT_NAME"; // set via tokenizing code
forge.message.broadcastBackground(__activation_id, __activation_id,
function(content) {
console.log(__activation_id + " response: " + content)
}, function(content) {
console.log(__activation_id + " response: " + content)
});

Basically when I run this, my activations all talk to the background page and I would expect each to write to the console the reply they received. Unfortunately, I often experience one activation getting multiple responses and the others not getting any responses. There isn't a parameter to restrict the reply to certain listeners, but I would think that could and would be determined automatically.

Any plans to add docs to the repo?

I do feel a little sketched out using docs that have a big red warning at the top. Also, I get a bit confused when I click on something for the browser extension docs and the sidebar is showing that method name for the mobile API. Would you guys accept a pull request for a nice markdown file with all the docs? If not, why not?

Add-on built with OpenForge rejected from the Mozilla Add-on store.

Your add-on ... has been reviewed by an editor and did not meet the criteria for being hosted in our gallery.

Reviewer:
erosman

Comments:
Your version was rejected because of the following problems:

1) I'm sorry, but we cannot currently accept add-ons built using the Trigger extensions framework. We will contact you if and when we are able to do so. Thanks.

Please fix them and submit again. Thank you.



This version of your add-on has been disabled. You may re-request review by addressing the editor's comments and uploading a new version. To learn more about the review process, please visit https://addons.mozilla.org/developers/docs/policies/reviews#selection

If you have any questions or comments on this review, please reply to this email or join #amo-editors on irc.mozilla.org
--
Mozilla Add-ons
https://addons.mozilla.org

I had a lot of trouble trying to publish to the Mozilla Add ons store. It seems they don't like the fact that the code is all compressed and that there are binaries present.

I like the concept of write once for all platforms, but I ended up just converting to a plain Vanilla JS userscript instead.

The extension was built as a proof of concept and to evaluate OpenForge as a possible solution to the problem of cross-platform extensions. I won't be pursuing the add-on I built with this, so this is not a critical issue for me personally, but it may be something that helps others if it gets fixed. Hope this helps!

IE popup resizing.

Hi,
The popup displayed in IE11 windows 8.1 doesn't resize its width.
2014-08-18 14_34_47-google - internet explorer

Content Script Isolation for IE

Hi, @antoinevg ๐Ÿ‘‹ Question for you, if you don't mind: Firefox has the Sandbox and evalInSandbox() functionalities and Chrome has sandboxed (isolated worlds) execution in their content scripts. Unfortunately, IE doesn't provide such isolation mechanisms out of the box, which causes naming and library (i.e jQuery, Angular, etc) conflicts between injected scripts and the host page. I've been trying to explore ways that we could create such an isolated context within the BHO C++ implementatiom but wanted to ask you first, in case you have any suggestions, solutions in mind, or even comments on the matter?

I, and I'm sure a lot of people in the community, wouldn't mind writing the actual implementation, but any insights are very welcome ๐Ÿ˜„

Thoughts?

Packaged extensions cannot be installed

I followed the instructions and setup the environment successfully. After that I created an extension folder and created a new / blank extension. The build and package steps complete successfully but neither the CRX file (which is packaged via Chrome) nor the XPI file can be installed (images attached)

image

image

This is a link to the generated XPI file - https://dl.dropboxusercontent.com/u/9269606/App2.xpi

This is a RAR file to the CRX and PEM files for chrome - https://dl.dropboxusercontent.com/u/9269606/App.rar

I'm running Chrome 29.0.1547.66 m and Firefox 23.0.1

Builds are being generated on Ubuntu 12.04

Rebuild osslsigncode_osx

osslsigncode_osx is currently incorrectly linked against /opt/local/lib/libcrypto.1.0.0.dylib which is not part of OSX. Presumably it was built while some third party package manager like homebrew was interfering. The corresponding system library is /usr/lib/libcrypto.dylib and osslsigncode_osx should be rebuilt using it.

IE extension - refresh issue

Hi,

I'm having issue with IE extension built on trigger-corp's framework. My extension injects one javascript file in every browser page. Everything works fine until I refresh page either by using F5 or refresh button in IE. Can you please help me to fix this?

Thanks,

manifest.json

Hi;
i would like install my plugin on firefox.
But i can't create the manifest.json for chrome ?
Can you help me plz ?

On firefox, it's good

Thanks for your support

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.