Last active
December 18, 2015 19:49
-
-
Save erikvold/5835884 to your computer and use it in GitHub Desktop.
Fx redirect example using jetpack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| const { data } = require('sdk/self'); | |
| // Using the redirect module from the pathfinder package https://github.com/erikvold/addon-pathfinder/blob/master/lib/redirect.js | |
| const { Redirect } = require('pathfinder/redirect'); | |
| Redirect({ | |
| from: "http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js", | |
| to: 'data:text/javascript;charset=utf-8,' + encodeURIComponent(data.load('ajax/libs/jquery/2.0.2/jquery.min.js')) | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment