Giter VIP home page Giter VIP logo

punkjs's Introduction

Punkjs

Punk is the English phonetic spelling of the Irish word for dot, "ponc". I wanted to call this "Poncjs", but I also didn't want it to be difficult to search for.

Punkjs is a Chrome extension that allows you to load local Javascript files into web pages based on the filename. It can load them from a directory of your choosing (like ~/.js) into web pages that match the domain, like google.com.js on www.google.com.

It is the spiritual successor to dotjs, which is no longer maintained.

Extensions have security restrictions that stop them reading from the filesystem, so you'll also need to install the Punkjs Bridge App.

How to Use

  • Install the extension.
  • Install the app.
  • Create your ~/.js directory.
  • Configure the directory by launching the app.
  • Hack on some js.

How it Works

The Punkjs extension and Punkjs Bridge app use the Chrome runtime messaging API for communicating.

Whenever you navigate to a webpage the extension will tell the bridge what domain the page is on. The bridge will try to find matching files, starting with the TLD and working down through the levels (com.js, google.com.js, mail.google.com.js, etc.). The extension then runs the returned Javascript in the context of the page.

You can also define a default.js file which will run on every page load, which can be useful for things like loading jQuery.

Requirements

  • Mac, Windows or Linux
  • Google Chrome.

punkjs's People

Contributors

kudos avatar lhanson avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

punkjs's Issues

Figure out the UX of prompting users for their dotfiles path

Currently it pops up a window from the app when either there is no .js path configured or when the app is explicitly opened. It does this check every time you open a new tab, so it keeps prompting until you configure it. Not ideal.

Ideal UX would be an options pane on the extension, but it's not possible to open a file prompt with the right permissions from there (afaik).

Problem with choosing ~/.js

Hey!

I've followed the instructions and have both extension and app installed.

When i choose ~/.js directory in the app nothing happens - no confirmation and no change to the app screen. The file select dialog just closes and that's it.

Seems like it does not save it because it reopens all the time.

Any clue what could be the problem?
Cheers

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.