mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-18 06:15:49 +02:00
parent
2f352ef9bb
commit
8d37d68770
@ -420,7 +420,7 @@
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Block: Bypass t.co when clicking links and media.
|
// Block: Bypass t.co when clicking/dragging links and media.
|
||||||
//
|
//
|
||||||
$(document.body).delegate("a[data-full-url]", "click auxclick", function(e){
|
$(document.body).delegate("a[data-full-url]", "click auxclick", function(e){
|
||||||
if (e.button === 0 || e.button === 1){ // event.which seems to be borked in auxclick
|
if (e.button === 0 || e.button === 1){ // event.which seems to be borked in auxclick
|
||||||
@ -429,6 +429,16 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document.body).delegate("a[data-full-url]", "dragstart", function(e){
|
||||||
|
let url = $(this).attr("data-full-url");
|
||||||
|
let data = e.originalEvent.dataTransfer;
|
||||||
|
|
||||||
|
data.clearData();
|
||||||
|
data.setData("text/uri-list", url);
|
||||||
|
data.setData("text/plain", url);
|
||||||
|
data.setData("text/html", `<a href="${url}">${url}</a>`);
|
||||||
|
});
|
||||||
|
|
||||||
if (ensurePropertyExists(TD, "services", "TwitterUser", "prototype", "fromJSONObject")){
|
if (ensurePropertyExists(TD, "services", "TwitterUser", "prototype", "fromJSONObject")){
|
||||||
const prevFunc = TD.services.TwitterUser.prototype.fromJSONObject;
|
const prevFunc = TD.services.TwitterUser.prototype.fromJSONObject;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user