mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-31 20:41:05 +08:00
Allow mailspring:// for sounds / other media elements
This commit is contained in:
parent
31a8b5964a
commit
2b75347c9c
3 changed files with 6 additions and 11 deletions
|
@ -1,15 +1,10 @@
|
|||
import { SoundRegistry } from 'mailspring-exports';
|
||||
|
||||
export function activate() {
|
||||
// FIXME: Use the mailspring:// protocol handlers once we upgrade Electron past
|
||||
// v30.0
|
||||
// See: https://github.com/atom/electron/issues/1123
|
||||
SoundRegistry.register({
|
||||
send: ['internal_packages', 'custom-sounds', 'CUSTOM_UI_Send_v1.ogg'],
|
||||
confirm: ['internal_packages', 'custom-sounds', 'CUSTOM_UI_Confirm_v1.ogg'],
|
||||
'hit-send': ['internal_packages', 'custom-sounds', 'CUSTOM_UI_HitSend_v1.ogg'],
|
||||
'new-mail': ['internal_packages', 'custom-sounds', 'CUSTOM_UI_NewMail_v1.ogg'],
|
||||
});
|
||||
SoundRegistry.register('send', 'mailspring://custom-sounds/CUSTOM_UI_Send_v1.ogg');
|
||||
SoundRegistry.register('confirm', 'mailspring://custom-sounds/CUSTOM_UI_Confirm_v1.ogg');
|
||||
SoundRegistry.register('hit-send', 'mailspring://custom-sounds/CUSTOM_UI_HitSend_v1.ogg');
|
||||
SoundRegistry.register('new-mail', 'mailspring://custom-sounds/CUSTOM_UI_NewMail_v1.ogg');
|
||||
}
|
||||
|
||||
export function deactivate() {
|
||||
|
|
|
@ -352,7 +352,7 @@ const start = () => {
|
|||
responseHeaders: {
|
||||
...details.responseHeaders,
|
||||
'Content-Security-Policy': [
|
||||
"default-src * mailspring:; script-src 'self' 'unsafe-inline' chrome-extension://react-developer-tools; style-src * 'unsafe-inline' mailspring:; img-src * data: mailspring: file:; object-src none; media-src none; manifest-src none;",
|
||||
"default-src * mailspring:; script-src 'self' 'unsafe-inline' chrome-extension://react-developer-tools; style-src * 'unsafe-inline' mailspring:; img-src * data: mailspring: file:; object-src none; media-src mailspring:; manifest-src none;",
|
||||
],
|
||||
},
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<title>Mailspring</title>
|
||||
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src * mailspring:; script-src 'self' chrome-extension://react-developer-tools; style-src * 'unsafe-inline' mailspring:; img-src * data: mailspring: file:; object-src none; media-src none; manifest-src none;">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src * mailspring:; script-src 'self' chrome-extension://react-developer-tools; style-src * 'unsafe-inline' mailspring:; img-src * data: mailspring: file:; object-src none; media-src mailspring:; manifest-src none;">
|
||||
|
||||
<script src="index.js"></script>
|
||||
</head>
|
||||
|
|
Loading…
Reference in a new issue