Skip to content

Commit

Permalink
- Support dropping multiple links
Browse files Browse the repository at this point in the history
- Click on search in clipper for new bookmarks opens mini app in all bookmarks page
  • Loading branch information
Rustem Mussabekov committed Jun 30, 2024
1 parent c9d970d commit 8ee05ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
14 changes: 13 additions & 1 deletion src/co/picker/file/drop/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/routes/extension/clipper/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Header data-no-shadow data-static>
Expand Down

0 comments on commit 8ee05ae

Please sign in to comment.