1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-13 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:
chylex 2018-01-19 06:05:46 +01:00
parent f297cb2623
commit ab9ff980ef

View File

@ -759,14 +759,14 @@
// Block: Allow drag & drop behavior for dropping links on columns to open their detail view.
//
(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";
let isDraggingValid = false;
const events = {
dragover: function(e){
e.originalEvent.dataTransfer.dropEffect = isDraggingValid ? "move" : "none";
e.originalEvent.dataTransfer.dropEffect = isDraggingValid ? "all" : "none";
e.preventDefault();
e.stopPropagation();
},