Comments (3)
@jaegertros Hey bro, I am not sure what would you want to achieve? Could you clarify it with more details, maybe I can help :D
from resourcessaverext.
@up209d appreciate the quick response! I am using your extension to help with my thesis research so I can grab articles and related stuff from pages, so super helpful (more so than just saving the article or whatever itself). The filenames default to "all.zip" in the "All Resources" folder of downloads. I was hoping to have it default to always naming the zip file after the URL where it was gotten from. I didn't know how Windows would handle it if the extension tried to use invalid filepath characters, and I was trying to show an attempt at cleaning that up. But honestly, it doesn't make a difference to me if the characters are just removed or replaced by anything else. It would just save me a lot of time trying to manually clean up the url name and then renaming the zip files or also save me from this "all (68).zip" mess that I am making for myself.
For example, if I saved this page:
currently - all.zip
hopeful for - anything along these lines
httpsgithub.comup209dResourcesSaverExtissues18.zip
https github com up209d ResourcesSaverExt issues 18.zip
github.com_up209d_ResourcesSaverExt_issues_18.zip
from resourcessaverext.
@jaegertros hey bro, you might need to take the tab url first like this
function downloadCompleteZip(blobWriter, callback) {
blobWriter.close(function (blob) {
chrome.tabs.get(
chrome.devtools.inspectedWindow.tabId, function (tab) {
var filename = tab.url.replace(/(\||\/|\:|\*|\"|\<|\>|\\)/g,"_");
chrome.downloads.download({
url: URL.createObjectURL(blob),
filename: 'All Resources/' + filename + '.zip',
saveAs: false
}, function () {
if (chrome.runtime.lastError) {
callback(false);
} else {
callback(true);
}
});
});
})
}
from resourcessaverext.
Related Issues (20)
- Crashes when there's thousands of files HOT 2
- Audio and video files saved using ResourcesSaver are imcomplete HOT 1
- How to quickly download blob links with image/jpeg from chrome developer tools->network->preview window?
- Also include pages that are linked to, say within one or two levels?
- Any way or api to download files? HOT 1
- Missing . folder
- need help please HOT 1
- <audio> element resources are ignored
- Type filter before download HOT 1
- Update to manifest V3, fix some css, new icon. HOT 1
- old version request HOT 10
- Option include all assets by XHR requests is missing in v2 HOT 2
- Panel not appearing in any version number HOT 7
- File names do not match HOT 2
- Switch Version not working
- Retrieve or generate package.json HOT 2
- Addition to building on Windows NT HOT 2
- Is there any similar tools in Python
- Lots of duplicated files are saved in the zip
- Not to save the resoure and then save the resoure can't open the file and other problem to Issues HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resourcessaverext.