diff --git a/package.json b/package.json index 6265fe4c..9776f018 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "app", - "version": "5.6.43", + "version": "5.6.44", "description": "All-in-one bookmark manager", "author": "Rustem Mussabekov", "license": "MIT", diff --git a/src/co/picker/file/drop/module.js b/src/co/picker/file/drop/module.js index fb8328d4..19cbbafb 100644 --- a/src/co/picker/file/drop/module.js +++ b/src/co/picker/file/drop/module.js @@ -74,10 +74,22 @@ export default class DropModule extends React.Component { throw new Error('drag data is incorrect json: '+String(data)) } } + //text links + else if (record.type == 'text/plain'){ + const found = e.dataTransfer.getData(record.type) + .split('\n') + .map(v=>v.trim()) + .filter(v=>URL.canParse(v) && new URL(v).host != location.host) + + for(const link of found) + if (!links.includes(link)) + links.push(link) + } //link else if (record.type == 'text/uri-list'){ const link = e.dataTransfer.getData(record.type) - if (new URL(link).host != location.host) + if (new URL(link).host != location.host && + !links.includes(link)) links.push(link) } } diff --git a/src/routes/extension/clipper/header.js b/src/routes/extension/clipper/header.js index 9a4e8a43..fbff95ab 100644 --- a/src/routes/extension/clipper/header.js +++ b/src/routes/extension/clipper/header.js @@ -22,7 +22,7 @@ function ClipperHeader({ status, item }) { default: title = t.s('edit'); break } - const collectionPath = `/my/${item.collectionId}` + const collectionPath = `/my/${status=='new' ? 0 : item.collectionId}` return (