Skip to content

Instantly share code, notes, and snippets.

View ruucm's full-sized avatar
🎾
Focusing

ruucm

🎾
Focusing
View GitHub Profile
@ruucm
ruucm / FF_HTMLbookmarks_toCSV.js
Created October 16, 2020 16:29 — forked from keikoro/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;
}