Coder Social home page Coder Social logo

chrome-whistle's Introduction

Whistle

Whistle is a chrome extension redirecting online static resources to local files. Using RegExp patterns, mapping directory or files to local workspace. We can edit sources in the Sources panel and save them directly to mapping workspace, no need to worry about missing when pages refreshed. However, we also need a proxy server transferring local files. So, I have another project Whistle-Proxy, which is a chrome packaged app, acting as a http proxy webserver. You can download it here.

screenshot

How it works

As you can seen in the screenshot of whistle, the laucn button is for lanching proxy server whistle-proxy if installed. However, never mind, you do not have to use it. Then follows the rules configuration. Now there are six lines. The left input is online static resource and the right one is local(in fact, whatever other resource is ok). And the checkbox is a switch, when it on of course redirecting is enabled.

How to write the rules? It is rather easy, because I just use String.replace(online, local). For example,

www.logger.im/static/(.*) as online and 127.0.0.1:8888/$1 as local,

and seeing www.logger.im/static/js/app.js will redirect to 127.0.0.1:8888/js/app.js.

Look, there is no protocol field. No matter http or https, it can be just redirected to local proxy in http, as my poor whistle-proxy hasn't support https yet.Of course, if you have your own server supports https protocol, just use it!


If you have any suggestion or problem, please just tell me.

chrome-whistle's People

Contributors

kinka avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.