We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1978406 commit b582f7bCopy full SHA for b582f7b
background.js
@@ -27,25 +27,4 @@ function sendToContentScript(tabId, message) {
27
if (isValidAction(message.action)) {
28
sendToContentScript(sender.tab.id, message);
29
}
30
-});
31
-
32
-function isValidAction(action) {
33
- return (
34
- action === 'startUnsubscribe' ||
35
- action === 'stopUnsubscribe' ||
36
- action === 'startDislike' ||
37
- action === 'stopDislike' ||
38
- action === 'startNewAction' ||
39
- action === 'stopNewAction'
40
- );
41
-}
42
43
-function sendToContentScript(tabId, message) {
44
- chrome.scripting.executeScript({
45
- target: { tabId: tabId },
46
- function: (message) => {
47
- chrome.runtime.sendMessage(message);
48
- },
49
- args: [message],
50
- });
51
+});
0 commit comments