Skip to content

Commit

Permalink
2.0.4 temporary default back to 0.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Duc Duong committed Sep 29, 2022
1 parent c113dba commit a79d998
Show file tree
Hide file tree
Showing 16 changed files with 63 additions and 3,683 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Extension can be found here:

https://chrome.google.com/webstore/detail/save-all-resources/abpdnfjocnmdomablahdcfnoggeeiedb?hl=en-US

- 2.0.4: Incognito mode quick fix

- **2.0.3: Add version switcher (including legacy versions such as 0.1.8 0.1.9)**

- 2.0.2: Bug fixes for blob content promise
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "resources-saver-extension",
"version": "2.0.3",
"version": "2.0.4",
"description": "Chrome extension for one click downloading all resources!",
"browserslist": [
"> 0.5%, last 2 versions, not dead"
Expand All @@ -13,7 +13,7 @@
"dev-serve": "yarn cp && parcel ./src/*.html --port 20987 --dist-dir unpacked2x",
"build": "yarn cp && parcel build ./src/*.html --dist-dir unpacked2x",
"cp": "yarn clean && mkdir -p unpacked2x && cp -r ./src/static/* unpacked2x",
"clean": "rm -rf dist && rm -rf unpacked2x",
"clean": "rm -rf .parcel-cache && rm -rf dist && rm -rf unpacked2x",
"reset": "yarn clean && rm -rf ./.cache && rm -rf ./.parcel-cache",
"local": "rm -rf ./node_modules/parcel-plugin-local && yarn install --check-files && yarn reset",
"prettier": "yarn prettier"
Expand Down
Binary file added promotion-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 16 additions & 10 deletions src/static/devtool.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
//console.log('Hello from -> Devtool');

const init = () => {
const version = localStorage.getItem('resources-saver-version');
if (version === '0.1.8') {
try {
const version = localStorage.getItem('resources-saver-version');
if (version === '2') {
return chrome.devtools.panels.create('ResourcesSaver', 'icon.gif', 'devtool.app.html', function (panel) {
console.log('Content is loaded to panel', panel);
});
}

if (version === '0.1.9') {
return chrome.devtools.panels.create('ResourcesSaver', 'icon.gif', 'legacy/0.1.9/devtool.app.html', function (panel) {
console.log('Content is loaded to panel', panel);
});
}

return chrome.devtools.panels.create('ResourcesSaver', 'icon.gif', 'legacy/0.1.8/devtool.app.html', function (panel) {
console.log('Content is loaded to panel', panel);
});
}

if (version === '0.1.9') {
return chrome.devtools.panels.create('ResourcesSaver', 'icon.gif', 'legacy/0.1.9/devtool.app.html', function (panel) {
} catch {
return chrome.devtools.panels.create('ResourcesSaver', 'icon.gif', 'legacy/0.1.8/devtool.app.html', function (panel) {
console.log('Content is loaded to panel', panel);
});
}

return chrome.devtools.panels.create('ResourcesSaver', 'icon.gif', 'devtool.app.html', function (panel) {
console.log('Content is loaded to panel', panel);
});
};

init();
2 changes: 1 addition & 1 deletion src/static/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Save All Resources",
"version": "2.0.3",
"version": "2.0.4",
"description": "Save all resources files with retaining folder structure.",
"author": "up209d",
"homepage_url": "https://github.com/up209d/ResourcesSaverExt",
Expand Down
6 changes: 3 additions & 3 deletions src/static/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ <h2 class="heading">Instruction</h2>
<span>Switch Version</span>
</li>
<li>
You need to <span class="success">restart</span> devtool panel in order to switch version
It is not working in incognito mode. You need to <span class="success">restart</span> devtool panel in order to switch version
</li>
<li class="switch-version-container">
<div id="switch-version-2" class="switch-version-btn">2.0.3</div>
<div id="switch-version-2" class="switch-version-btn">2.0.4</div>
<div id="switch-version-1-9" class="switch-version-btn">0.1.9</div>
<div id="switch-version-1-8" class="switch-version-btn">0.1.8</div>
</li>
</ul>
<div>
<a class="sub-title" href="https://github.com/up209d" target="_blank"> Version: 2.0.3 by U.P </a>
<a class="sub-title" href="https://github.com/up209d" target="_blank"> Version: 2.0.4 by U.P </a>
</div>
</div>
<div id="debug"></div>
Expand Down
12 changes: 7 additions & 5 deletions src/static/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ const handleSwitchVersion = (version) => {
localStorage.setItem('resources-saver-version', '0.1.9');
return document.getElementById('switch-version-1-9').setAttribute('class', 'switch-version-btn active');
}
localStorage.setItem('resources-saver-version', '2');
return document.getElementById('switch-version-2').setAttribute('class', 'switch-version-btn active');
if (version === '2') {
localStorage.setItem('resources-saver-version', '2');
return document.getElementById('switch-version-2').setAttribute('class', 'switch-version-btn active');
}
};

window.onload = () => {
Expand All @@ -28,13 +30,13 @@ window.onload = () => {

const version = localStorage.getItem('resources-saver-version');

if (version === '0.1.8') {
return document.getElementById('switch-version-1-8').setAttribute('class', 'switch-version-btn active');
if (version === '2') {
return document.getElementById('switch-version-2').setAttribute('class', 'switch-version-btn active');
}

if (version === '0.1.9') {
return document.getElementById('switch-version-1-9').setAttribute('class', 'switch-version-btn active');
}

return document.getElementById('switch-version-2').setAttribute('class', 'switch-version-btn active');
return document.getElementById('switch-version-1-8').setAttribute('class', 'switch-version-btn active');
};
2 changes: 1 addition & 1 deletion unpacked2x/devtool.app.d.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion unpacked2x/devtool.app.d.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion unpacked2x/devtool.app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion unpacked2x/devtool.app.js.map

Large diffs are not rendered by default.

26 changes: 16 additions & 10 deletions unpacked2x/devtool.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
//console.log('Hello from -> Devtool');

const init = () => {
const version = localStorage.getItem('resources-saver-version');
if (version === '0.1.8') {
try {
const version = localStorage.getItem('resources-saver-version');
if (version === '2') {
return chrome.devtools.panels.create('ResourcesSaver', 'icon.gif', 'devtool.app.html', function (panel) {
console.log('Content is loaded to panel', panel);
});
}

if (version === '0.1.9') {
return chrome.devtools.panels.create('ResourcesSaver', 'icon.gif', 'legacy/0.1.9/devtool.app.html', function (panel) {
console.log('Content is loaded to panel', panel);
});
}

return chrome.devtools.panels.create('ResourcesSaver', 'icon.gif', 'legacy/0.1.8/devtool.app.html', function (panel) {
console.log('Content is loaded to panel', panel);
});
}

if (version === '0.1.9') {
return chrome.devtools.panels.create('ResourcesSaver', 'icon.gif', 'legacy/0.1.9/devtool.app.html', function (panel) {
} catch {
return chrome.devtools.panels.create('ResourcesSaver', 'icon.gif', 'legacy/0.1.8/devtool.app.html', function (panel) {
console.log('Content is loaded to panel', panel);
});
}

return chrome.devtools.panels.create('ResourcesSaver', 'icon.gif', 'devtool.app.html', function (panel) {
console.log('Content is loaded to panel', panel);
});
};

init();
Loading

0 comments on commit a79d998

Please sign in to comment.