Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(manifest): update the manifest #1276

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions manifest/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = facet => {
? 'La façon la plus simple de trouver des alternatives locales, en un seul clic. Gratuit et sans publicité.'
: 'Amis, media, experts vous informent directement sur les pages web visitées. ',
version,
manifest_version: 2,
manifest_version: 3,
icons: icons[facet],
background: {
page: 'background.html'
Expand Down Expand Up @@ -50,7 +50,7 @@ module.exports = facet => {
run_at: 'document_end'
}
],
browser_action: {
action: {
default_icon: {
'16': 'img/logo/' + facet + '/16x16.png',
'48': 'img/logo/' + facet + '/48x48.png',
Expand All @@ -59,6 +59,16 @@ module.exports = facet => {
default_title: facetName
},
permissions: ['activeTab', 'storage', 'contextMenus'],
web_accessible_resources: ['img/*', 'fonts/*']
web_accessible_resources: [
{
"resources": [
'img/*',
'fonts/*'
],
"matches": [
"*://*/*"
]
}
]
});
};
6 changes: 3 additions & 3 deletions manifest/development/chromium.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ module.exports = facet => {
'object-src': ["'self'"]
}
}),
browser_action: {
...facetBase.browser_action,
default_title: `${facetBase.browser_action.default_title} - development`
action: {
...facetBase.action,
default_title: `${facetBase.action.default_title} - development`
},
externally_connectable: {
matches: ['*://localhost/*'],
Expand Down
8 changes: 4 additions & 4 deletions manifest/development/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ module.exports = facet => {
return {
...facetBase,
name: `${facetBase.name} - development`,
permissions: [...facetBase.permissions, '*://*/*'],
host_permissions: ['*://*/*'],
content_security_policy: csp({
directives: {
'script-src': ["'self'", "'unsafe-eval'"],
'object-src': ["'self'"]
}
}),
browser_action: {
...facetBase.browser_action,
default_title: `${facetBase.browser_action.default_title} - development`
action: {
...facetBase.action,
default_title: `${facetBase.action.default_title} - development`
}
};
};
6 changes: 3 additions & 3 deletions manifest/proding/chromium.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ module.exports = facet => {
'style-src': ["'unsafe-inline'"]
}
}),
browser_action: {
...facetBase.browser_action,
default_title: `${facetBase.browser_action.default_title} - proding`
action: {
...facetBase.action,
default_title: `${facetBase.action.default_title} - proding`
}
};
};
6 changes: 3 additions & 3 deletions manifest/proding/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ module.exports = facet => {
return {
...production(facet),
name: `${facetBase.name} - proding`,
browser_action: {
...facetBase.browser_action,
default_title: `${facetBase.browser_action.default_title} - proding`
action: {
...facetBase.action,
default_title: `${facetBase.action.default_title} - proding`
}
};
};
2 changes: 1 addition & 1 deletion manifest/production/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ module.exports = facet => {
const facetBase = base(facet);
return {
...facetBase,
permissions: [...facetBase.permissions, '*://*/*']
host_permissions: ['*://*/*']
};
};
6 changes: 3 additions & 3 deletions manifest/staging/chromium.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ module.exports = facet => {
'style-src': ["'unsafe-inline'"]
}
}),
browser_action: {
...facetBase.browser_action,
default_title: `${facetBase.browser_action.default_title} - staging`
action: {
...facetBase.action,
default_title: `${facetBase.action.default_title} - staging`
}
};
};
6 changes: 3 additions & 3 deletions manifest/staging/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ module.exports = facet => {
return {
...proding(facet),
name: `${facetBase.name} - staging`,
browser_action: {
...facetBase.browser_action,
default_title: `${facetBase.browser_action.default_title} - staging`
action: {
...facetBase.action,
default_title: `${facetBase.action.default_title} - staging`
}
};
};
2 changes: 1 addition & 1 deletion src/app/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ browser.contextMenus
browser.contextMenus.create({
id: OPTIONS_MENU_ITEM_ID,
title: i18n.t('tab.sources_link'),
contexts: ['browser_action']
contexts: ['action']
});
});

Expand Down
4 changes: 2 additions & 2 deletions src/app/background/store/sagas/handleBrowserAction.saga.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { put, takeLatest } from 'redux-saga/effects';
import { CloseCause } from 'libs/domain/ui';
import {
BROWSER_ACTION_CLICKED,
ACTION_CLICKED,
toggleUI,
BrowserActionClickedAction
} from 'libs/store/actions';
Expand All @@ -13,5 +13,5 @@ export function* browserActionClickedSaga({
}

export default function* backgroundRootSaga() {
yield takeLatest(BROWSER_ACTION_CLICKED, browserActionClickedSaga);
yield takeLatest(ACTION_CLICKED, browserActionClickedSaga);
}
4 changes: 2 additions & 2 deletions src/app/background/store/sagas/tracking/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SagaIterator } from 'redux-saga';
import { call, select, takeEvery, takeLatest } from 'redux-saga/effects';
import Tracker from 'types/Tracker';
import {
BROWSER_ACTION_CLICKED,
ACTION_CLICKED,
CLOSE,
INSTALLATION_DETAILS,
LOCATION_CHANGED,
Expand Down Expand Up @@ -61,7 +61,7 @@ export default (tracker?: Tracker) =>
trackLocationChangeSaga(tracker)
);
yield takeEvery(
BROWSER_ACTION_CLICKED,
ACTION_CLICKED,
trackBrowserActionClickedSaga(tracker)
);
yield takeEvery(NOTICE_BADGED, trackNoticeBadgedSaga(tracker));
Expand Down
4 changes: 2 additions & 2 deletions src/app/background/store/sagas/tracking/posthog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SagaIterator } from '@redux-saga/types';
import { call, select, takeEvery, takeLatest } from '@redux-saga/core/effects';
import PostHog from 'posthog-node';
import {
BROWSER_ACTION_CLICKED,
ACTION_CLICKED,
CLOSE,
INSTALLATION_DETAILS,
LOCATION_CHANGED,
Expand Down Expand Up @@ -91,7 +91,7 @@ export default (client?: PostHog) =>
trackLocationChangeSaga(client)
);
yield takeEvery(
BROWSER_ACTION_CLICKED,
ACTION_CLICKED,
trackBrowserActionClickedSaga(client)
);
yield takeEvery(NOTICE_BADGED, trackNoticeBadgedSaga(client));
Expand Down
6 changes: 3 additions & 3 deletions src/libs/store/actions/browser.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import Tab from 'libs/domain/tab';
import { TabAction } from '.';

export const BROWSER_ACTION_CLICKED = 'BROWSER/BROWSER_ACTION_CLICKED';
export const ACTION_CLICKED = 'BROWSER/ACTION_CLICKED';
export interface BrowserActionClickedAction extends TabAction {
type: typeof BROWSER_ACTION_CLICKED;
type: typeof ACTION_CLICKED;
payload: {
tab: Tab;
};
}

export const browserActionClicked = (tab: Tab): BrowserActionClickedAction => ({
type: BROWSER_ACTION_CLICKED,
type: ACTION_CLICKED,
payload: { tab },
meta: { tab }
});