Skip to content

Commit

Permalink
v3.4.2 Release: Manifest v3 Upgrade (#1042)
Browse files Browse the repository at this point in the history
* Manifest v3 upgrade for Chrome.
* Stores state in session storage to avoid log file bloat.
* Need to uncomment line in manifest.json before running in Firefox.
* Doesn't work in Safari.
v3.4.2

Detailed:
* first commit upgrading to manifest v3
* use chrome.windows.getCurrent get height and width
* update the request header in the rules file
* updated the version and move some background.js variable to chrome.storage.local
* move globalAPICache to chrome.storage
* move gToolbarStates to chrome.storage
* remove declarativeNetRequest request from manifest
* remove constants from persistent storage
* globalAPICache holds temp data not needed in storage
* gStatusCode removed since no longer used
* fixed bug that was introduced in incrementCount()
* stores toolbar states using TabData utility functions instead of gToolbarStates
* clear toolbar state only if state changes
* got running in Firefox, with a warning still
* tweak efficiency of getting toolbar state
* switch to storage.session for waybackCountCache
* remove debug logs and cleanup commented code
* eslint formatting fixes
* commenting scripts line works in Chrome to avoid error, will need to be restored to work in Firefox

---------

Co-authored-by: Anish Sarangi <[email protected]>
  • Loading branch information
cgorringe and Anish Sarangi authored Aug 13, 2024
1 parent 4c77f8c commit d56a9cb
Show file tree
Hide file tree
Showing 5 changed files with 369 additions and 245 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": "standard",
"env": {
"browser": true,
"webextensions": true
"webextensions": true,
"worker": true
},
"rules": {
"indent": ["warn", 2, { "SwitchCase": 1, "MemberExpression": "off" }],
Expand All @@ -13,7 +14,8 @@
"quote-props": "off",
"one-var": "off",
"padded-blocks": "off",
"dot-notation": "off"
"dot-notation": "off",
"semi": "off"
},
"globals": {
"$": "readonly"
Expand Down
8 changes: 4 additions & 4 deletions safari/Wayback Machine.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MARKETING_VERSION = 3.3.1.1;
MARKETING_VERSION = 3.4.2;
PRODUCT_BUNDLE_IDENTIFIER = archive.org.waybackmachine.mac.extension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -493,7 +493,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MARKETING_VERSION = 3.3.1.1;
MARKETING_VERSION = 3.4.2;
PRODUCT_BUNDLE_IDENTIFIER = archive.org.waybackmachine.mac.extension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -521,7 +521,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MARKETING_VERSION = 3.3.1.1;
MARKETING_VERSION = 3.4.2;
PRODUCT_BUNDLE_IDENTIFIER = archive.org.waybackmachine.mac;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -548,7 +548,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MARKETING_VERSION = 3.3.1.1;
MARKETING_VERSION = 3.4.2;
PRODUCT_BUNDLE_IDENTIFIER = archive.org.waybackmachine.mac;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
57 changes: 28 additions & 29 deletions webextension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"manifest_version": 3,
"name": "Wayback Machine",
"version": "3.3.1.1",
"version": "3.4.2",
"description": "The Official Wayback Machine Extension - by the Internet Archive.",
"icons": {
"16": "images/app-icon/mini-icon16.png",
Expand All @@ -15,7 +15,7 @@
"512": "images/app-icon/app-icon512.png",
"1024": "images/app-icon/app-icon1024.png"
},
"browser_action": {
"action": {
"default_icon": {
"16": "images/toolbar/toolbar-icon-archive16.png",
"24": "images/toolbar/toolbar-icon-archive24.png",
Expand All @@ -25,35 +25,34 @@
},
"homepage_url": "https://archive.org/",
"permissions": [
"activeTab",
"cookies",
"contextMenus",
"notifications",
"storage",
"webRequest",
"webRequestBlocking",
"https://archive.org/*",
"https://*.archive.org/*",
"https://hypothes.is/*",
"<all_urls>"
"activeTab",
"cookies",
"contextMenus",
"notifications",
"storage",
"scripting",
"webRequest"
],
"host_permissions": [
"https://archive.org/*",
"https://*.archive.org/*",
"https://hypothes.is/*",
"<all_urls>"
],
"optional_permissions": [
"bookmarks"
"bookmarks"
],
"background": {
"scripts": ["scripts/utils.js",
"scripts/background.js"],
"persistent": true
// "scripts": ["scripts/background.js", "scripts/utils.js"],
"service_worker": "scripts/background.js"
},
"content_scripts": [
{
"matches": ["http://*.wikipedia.org/*", "https://*.wikipedia.org/*"],
"js": ["scripts/wikipedia.js"],
"css": ["css/wikipedia.css"]
}
],
"web_accessible_resources": [
"css/archive.css",
"images/*"
]
"content_scripts": [{
"matches": ["http://*.wikipedia.org/*", "https://*.wikipedia.org/*"],
"js": ["scripts/wikipedia.js"],
"css": ["css/wikipedia.css"]
}],
"web_accessible_resources": [{
"resources": ["/css/archive.css", "/images/*"],
"matches": ["<all_urls>"]
}]
}
Loading

0 comments on commit d56a9cb

Please sign in to comment.