fix(scripts): show report option in all contexts
This commit is contained in:
parent
5c6d425ab1
commit
ca5e27d759
@ -225,6 +225,7 @@ chrome.runtime.onMessage.addListener((request, sender, callback) => {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
chrome.contextMenus.create({
|
chrome.contextMenus.create({
|
||||||
|
contexts: ["all"],
|
||||||
id: contextMenuId,
|
id: contextMenuId,
|
||||||
title: "Report site...",
|
title: "Report site...",
|
||||||
});
|
});
|
||||||
@ -236,7 +237,7 @@ chrome.contextMenus.create({
|
|||||||
chrome.contextMenus.onClicked.addListener((info, tab) => {
|
chrome.contextMenus.onClicked.addListener((info, tab) => {
|
||||||
if (info.menuItemId !== contextMenuId) return;
|
if (info.menuItemId !== contextMenuId) return;
|
||||||
|
|
||||||
fetch("https://cdm-report-service.herokuapp.com/rest/v1/report", {
|
fetch("https://cdm-report-service.herokuapp.com/rest/v1/report/", {
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
text: tab.url,
|
text: tab.url,
|
||||||
to: "wanhose.development@gmail.com",
|
to: "wanhose.development@gmail.com",
|
||||||
|
Loading…
Reference in New Issue
Block a user