Support Firefox 30 new security model; fix duplicated issue in .xpi file

This commit is contained in:
Buu Nguyen 2014-06-12 08:48:51 -07:00
parent 36d496cdaf
commit da1cfb4978
6 changed files with 18 additions and 9 deletions

BIN
dist/firefox.xpi vendored

Binary file not shown.

BIN
dist/safari.safariextz vendored

Binary file not shown.

View File

@ -104,7 +104,8 @@ gulp.task('safari', function() {
gulp.task('firefox', function() {
return es.merge(
pipe('./icons/**/*', './tmp/firefox/data/icons'),
pipe(['./tmp/inject.js', './tmp/inject.css', './src/firefox/**.js'], './tmp/firefox/data'),
pipe(['./tmp/inject.js', './tmp/inject.css'], './tmp/firefox/data'),
pipe('./src/firefox/**.js', './tmp/firefox/lib'),
pipe('./src/firefox/package.json', './tmp/firefox')
)
})

View File

@ -18,22 +18,23 @@ function GitHub() {}
/**
* Selects a submodule.
*/
GitHub.prototype.selectSubmodule = function(url) {
window.location.href = url
GitHub.prototype.selectSubmodule = function(path) {
window.location.href = path
}
/**
* Selects a path.
*/
GitHub.prototype.selectPath = function(url) {
GitHub.prototype.selectPath = function(path) {
var container = $(GH_PJAX_SEL)
if (container.length) {
$.pjax({
url : url,
// needs full path for pjax to work with Firefox as per cross-domain-content setting
url : location.protocol + '//' + location.host + path,
container : container
})
}
else window.location.href = url // falls back
else window.location.href = path // falls back
}
/**

View File

@ -5,11 +5,14 @@
"description": "Display GitHub code in tree format",
"author": "Buu Nguyen",
"homepage": "https://github.com/buunguyen/octotree",
"lib": "data",
"main": "data/firefox",
"lib": "lib",
"main": "lib/firefox",
"data": "data",
"icon": "data/icons/icon48.png",
"icon64": "data/icons/icon64.png",
"license": "MIT",
"version": "1.3"
"version": "1.3",
"permissions": {
"cross-domain-content": ["https://api.github.com", "https://github.com"]
}
}

View File

@ -31,6 +31,10 @@
<array>
<string>inject.css</string>
</array>
<key>Whitelist</key>
<array>
<string>https://github.com/*</string>
</array>
</dict>
<key>Description</key>
<string>Display GitHub code in tree format</string>