Added icons

This commit is contained in:
2020-04-13 17:42:16 +03:00
parent 3f1cc437f4
commit 26d9856f83
6 changed files with 23 additions and 17 deletions

View File

@@ -1,15 +1,15 @@
chrome.runtime.onInstalled.addListener(function() { chrome.runtime.onInstalled.addListener(function() {
chrome.storage.sync.set({isExtensionOn: true}, function() { chrome.storage.sync.set({isExtensionOn: true}, function() {
console.log('isExtensionOn: '+true); console.log('isExtensionOn: '+true);
});
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {
chrome.declarativeContent.onPageChanged.addRules([{
conditions: [new chrome.declarativeContent.PageStateMatcher({
pageUrl: {hostEquals: 'vk.com'},
})
],
actions: [new chrome.declarativeContent.ShowPageAction()]
}]);
});
}); });
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {
chrome.declarativeContent.onPageChanged.addRules([{
conditions: [new chrome.declarativeContent.PageStateMatcher({
pageUrl: {hostEquals: 'vk.com'},
})
],
actions: [new chrome.declarativeContent.ShowPageAction()]
}]);
});
});

BIN
icon128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
icon140.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
icon48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -1,5 +1,9 @@
{ {
"name": "Hide Cringe", "name": "Hide Cringe",
"icons": {
"128": "icon128.png",
"48": "icon48.png"
},
"version": "1.0", "version": "1.0",
"description": "Hides cringe", "description": "Hides cringe",
"permissions": ["activeTab", "declarativeContent", "storage"], "permissions": ["activeTab", "declarativeContent", "storage"],
@@ -15,10 +19,12 @@
"manifest_version": 2, "manifest_version": 2,
"content_scripts": [ "content_scripts": [
{ {
"matches": [ "matches": ["https://*.vk.com/*"],
"https://*.vk.com/*"
],
"js": ["hide_element.js"] "js": ["hide_element.js"]
},
{
"matches": ["https://*.vk.com/*"],
"js": ["controls.js"]
} }
] ]
} }

View File

@@ -51,7 +51,7 @@ disableCheckbox.addEventListener('change', (event) => {
}); });
}); });
idToHideInput.addEventListener('input', (event) => { idToHideInput.addEventListener('input', () => {
chrome.storage.sync.set({idToHide: idToHideInput.value}, function() { chrome.storage.sync.set({idToHide: idToHideInput.value}, function() {
console.log('idToHide: '+idToHideInput.value); console.log('idToHide: '+idToHideInput.value);
}); });