Skip to content

Instantly share code, notes, and snippets.

View RodrigoTomeES's full-sized avatar
🦀
Learning Rust

Rodrigo RodrigoTomeES

🦀
Learning Rust
View GitHub Profile
@RodrigoTomeES
RodrigoTomeES / FF_HTMLbookmarks_toCSV.js
Created March 8, 2022 22:40 — forked from ruucm/FF_HTMLbookmarks_toCSV.js
JavaScript bookmarklet for converting HTML-formatted Firefox bookmarks into a downloadable CSV file
javascript:(function(){
/* escape quotes and commas in contents to be comma-separated */
function wrapCsvContents(content) {
if (typeof(content) === 'string') {
if (content.replace(/ /g, '').match(/[\s,"]/)) {
return '"' + content.replace(/"/g, '""') + '"';
}
}
return content;
}