Skip to content

Commit

Permalink
Organize source files into folders
Browse files Browse the repository at this point in the history
  • Loading branch information
turanjanin committed Sep 6, 2024
1 parent 8692cd1 commit 1f06513
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions manifest-chrome.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Јован Турањанин",
"version": "3.0",
"background": {
"service_worker": "background.js"
"service_worker": "scripts/background.js"
},
"action": {
"default_icon": {
Expand All @@ -26,7 +26,7 @@
"rule_resources" : [{
"id": "map",
"enabled": true,
"path": "latin-cyrillic-domains.json"
"path": "resources/latin-cyrillic-domains.json"
}]
},
"permissions": [
Expand Down
4 changes: 2 additions & 2 deletions manifest-firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Јован Турањанин",
"version": "3.0",
"background": {
"scripts": ["background.js"]
"scripts": ["scripts/background.js"]
},
"action": {
"default_icon": {
Expand All @@ -26,7 +26,7 @@
"rule_resources" : [{
"id": "map",
"enabled": true,
"path": "latin-cyrillic-domains.json"
"path": "resources/latin-cyrillic-domains.json"
}]
},
"permissions": [
Expand Down
File renamed without changes.
20 changes: 10 additions & 10 deletions background.js → scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ let patternsToRules = {
function updateExtensionIcon(tab, isEnabled) {
chrome.action.setIcon({
path: isEnabled ? {
"16": "icons/icon-on-16.png",
"32": "icons/icon-on-32.png",
"48": "icons/icon-on-48.png",
"128": "icons/icon-on-128.png"
'16': '/icons/icon-on-16.png',
'32': '/icons/icon-on-32.png',
'48': '/icons/icon-on-48.png',
'128': '/icons/icon-on-128.png'
} : {
"16": "icons/icon-off-16.png",
"32": "icons/icon-off-32.png",
"48": "icons/icon-off-48.png",
"128": "icons/icon-off-128.png"
'16': '/icons/icon-off-16.png',
'32': '/icons/icon-off-32.png',
'48': '/icons/icon-off-48.png',
'128': '/icons/icon-off-128.png'
},
tabId: tab.id
});
Expand Down Expand Up @@ -333,7 +333,7 @@ function transliteratePage(tab) {
tabId: tab.id,
allFrames: true
},
files: ['/content.js']
files: ['/scripts/content.js']
}).then(() => {
updateExtensionIcon(tab, true);
chrome.tabs.sendMessage(tab.id, { isEnabled: true });
Expand Down Expand Up @@ -361,7 +361,7 @@ function redirectPage(tab) {
target: {
tabId: tab.id
},
files: ['/reload.js']
files: ['/scripts/reload.js']
}).then(() => {
updateExtensionIcon(tab, true);
});
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 1f06513

Please sign in to comment.