fix(scripts): show report option in all contexts

This commit is contained in:
wanhose 2021-11-04 14:08:26 +01:00
parent 5c6d425ab1
commit ca5e27d759

View File

@ -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",