mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-16 18:15:48 +02:00
Fix dragging twitter links over columns from some sources or w/ url parameters not working
This commit is contained in:
parent
f297cb2623
commit
ab9ff980ef
@ -759,14 +759,14 @@
|
|||||||
// Block: Allow drag & drop behavior for dropping links on columns to open their detail view.
|
// Block: Allow drag & drop behavior for dropping links on columns to open their detail view.
|
||||||
//
|
//
|
||||||
(function(){
|
(function(){
|
||||||
const tweetRegex = /^https?:\/\/twitter\.com\/[A-Za-z0-9_]+\/status\/(\d+)\/?$/;
|
const tweetRegex = /^https?:\/\/twitter\.com\/[A-Za-z0-9_]+\/status\/(\d+)\/?\??/;
|
||||||
const selector = "section.js-column";
|
const selector = "section.js-column";
|
||||||
|
|
||||||
let isDraggingValid = false;
|
let isDraggingValid = false;
|
||||||
|
|
||||||
const events = {
|
const events = {
|
||||||
dragover: function(e){
|
dragover: function(e){
|
||||||
e.originalEvent.dataTransfer.dropEffect = isDraggingValid ? "move" : "none";
|
e.originalEvent.dataTransfer.dropEffect = isDraggingValid ? "all" : "none";
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user