Coder Social home page Coder Social logo

honestbleeps / babelext Goto Github PK

View Code? Open in Web Editor NEW
227.0 227.0 36.0 80 KB

BabelExt is a cross browser boilerplate/library for extension development

Home Page: http://babelext.com/

License: MIT License

JavaScript 66.95% Shell 1.64% HTML 30.61% Batchfile 0.80%

babelext's People

Contributors

agentlame avatar cantino avatar cody-young avatar digital-carver avatar honestbleeps avatar kasbah avatar limbogg avatar tymofij avatar victorb 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

babelext's Issues

Metadata Block Parsing & Implementing

It looks like BabelExt is missing functions for handling userscripts the way GreaseMonkey did.

The way I see it, this could best be accomplished, in an appropriately DIY fashion, by providing:

  • A function that takes a string (or something that implements its interface like Node's Buffer), finds the first metadata block (or all? pretty sure successive blocks are ignored), and returns a JS Object with the "@keys" converted to properties of the object, with strings as values (or arrays of strings when there is more than one instance of a key such as @require). This function can then be used by eg. a build script that reads all files, then outputs a "userscripts.json" that will be read in at runtime to determine which scripts to include.
  • A function for reading the extension's files (per the above note about using a "userscripts.json").
  • A function that takes an object with keys of userscript filenames, and values of the parsed metadata block objects, and then loads the userscripts based on their metadata. This includes per-browser functions (which could be surfaced to the BabelExt API) that add a script (from the extension or from the Internet via @require) in a new context (eg. XPCNativeWrapper in FF, with access to unsafeWindow) either before or after pageload. It can also insert https://github.com/honestbleeps/BabelExt/blob/master/lib/extension.js#L44-51 and/or extension API functions based on @grant.

creating crx file

Hi,
Can anyone tell me how can I create .crx file for chrome to distribute the extension?

Thanks
Raf

Not sure about `var instance = this;`

var BabelExt = (function() {
  // define private variables here...
  var instance   = this;

  instance.detectedBrowser = '';

Here why do you use this? I know browsers all have some kind of sandbox and you can access the real window this way, but then I browse your code and can't find anything relies on window, so why not use var instance = {}; ?

Edge Support?

It looks like RES is one of the preview Edge extensions. Was this updated to support Edge or was that a new implementation?

Not working in Firefox?

For me, BabelExt and the "Kitchen Sink Demo" works in Chrome, but under cfx run (Firefox 29) I see no page modifications on http://babelext.com/sink.html. Seems the add-on is not running, although cfx/Firefox lists it under Add-Ons.
Is it the URL selector in main.js ("*.babelext.com" vs bare "babelext.com")? - dunno.

Just another note: the makelinks.sh script only works (on Ubuntu) with the shebang #!/bin/bash.

Safari BabelExt.xhr is not working

Example added to extension.js:

          BabelExt.xhr({
            method: "GET",
            url: 'http://www.babelext.com/',
            onload: function(response) {
              alert("YEAH!");
            }
          });

Error in safari console:
DataCloneError: DOM Exception 25: An object could not be cloned.

Safari version: 8.0.2 (10600.2.5)

Demo update

First of all, i think the demo may need some updating. After loading the extension, chrome states that i need to set the manifest_version
image

and after doing that I see this next
image

i'm not sure what the second screenshot means, i don't thin the backgroiund.html is loading because of that.

Dead?

Is the project dead? I was hoping this would keep being developed...

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.