-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix issue with firefox, rewrite building process
- Loading branch information
1 parent
1f7975d
commit 0c4e47e
Showing
9 changed files
with
89 additions
and
65 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 1.3 | ||
|
||
fix issues with firefox. rewrite building process. | ||
|
||
## 1.2 | ||
|
||
Add support for Firefox and Edge. new version require Deneb version >= 3.6.0 but in Chrome the old Deneb is still compatible until the next version of Sadr |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
#/bin/sh | ||
|
||
# chrome | ||
npm run build:prod | ||
|
||
zip -r chrome ./chrome | ||
zip -r other ./other | ||
zip -r chrome ./dist | ||
|
||
# firefox | ||
npm run build:prod:firefox | ||
cd dist | ||
zip -r firefox . | ||
mv firefox.zip ../ | ||
cd .. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
module.exports = { | ||
prod: { | ||
albireo_host: 'https://localhost:3000', | ||
albireo_host: 'https://localhost:3000', // should match your Albireo instance address | ||
extension_name: 'Bangumi for Deneb', | ||
extension_description: 'Add bangumi feature for Deneb, including watch progress synchronizing, comment, rating.' | ||
extension_id: '[email protected]' // must be modified when publishing, | ||
}, | ||
dev: { | ||
albireo_host: 'http://localhost:3000' | ||
albireo_host: 'http://localhost:3000', | ||
extension_id: '[email protected]' // should be different with the dev id | ||
} | ||
}; |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const env = require('../env'); | ||
|
||
const CHROME = 'Chrome'; | ||
|
||
module.exports = function (manifest, browserType, isProd) { | ||
let manifestObj = JSON.parse(manifest); | ||
if (browserType === CHROME) { | ||
manifestObj.browser_specific_settings = undefined; | ||
} else { | ||
manifestObj.externally_connectable = undefined; | ||
manifestObj.background.persistent = undefined; | ||
manifestObj.browser_specific_settings.gecko.id = `${env.dev.extension_id}`; | ||
} | ||
|
||
if (isProd) { | ||
|
||
let localHostUrlIndex = manifestObj.permissions.findIndex((entry) => { | ||
return entry === 'http://localhost/*'; | ||
}); | ||
|
||
manifestObj.permissions[localHostUrlIndex] = `${env.prod.albireo_host}/*`; | ||
|
||
manifestObj.name = env.prod.extension_name; | ||
manifestObj.description = env.prod.extension_description; | ||
manifestObj.content_scripts[0].matches = [`${env.prod.albireo_host}/*`]; | ||
|
||
if (browserType === CHROME) { | ||
manifestObj.externally_connectable.matches = [`${env.prod.albireo_host}/*`]; | ||
} else { | ||
manifestObj.browser_specific_settings.gecko.id = `${env.prod.extension_id}`; | ||
} | ||
} | ||
|
||
return JSON.stringify(manifestObj, null, 2); | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,26 +2,31 @@ | |
"manifest_version": 2, | ||
"name": "Deneb Social", | ||
"description": "Add some social elements to Deneb", | ||
"version": "1.2", | ||
"version": "1.3", | ||
"browser_specific_settings": { | ||
"gecko": { | ||
"id": "[email protected]" | ||
} | ||
}, | ||
"background": { | ||
"scripts": ["backend.js"], | ||
"persistent": false | ||
}, | ||
"content_scripts": [ | ||
{ | ||
"matches": ["http://localhost:3000/*"], | ||
"matches": ["http://localhost/*"], | ||
"run_at": "document_start", | ||
"js": ["bridge.js"] | ||
} | ||
], | ||
"externally_connectable": { | ||
"matches": ["http://localhost:3000/*"] | ||
"matches": ["http://localhost/*"] | ||
}, | ||
"permissions": [ | ||
"cookies", | ||
"https://bgm.tv/*", | ||
"https://api.bgm.tv/*", | ||
"http://localhost:3000/*", | ||
"http://localhost/*", | ||
"storage", | ||
"tabs" | ||
] | ||
|
This file contains 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