mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-03 23:34:09 +02:00
Fix ctrl+clicking on regular links causing them to open twice
Closes #21
This commit is contained in:
parent
15a39de939
commit
2ecbbdd011
@ -167,10 +167,10 @@
|
||||
|
||||
if (!me.is(".link-complex") && !(rel === "mediaPreview" && me.closest("#open-modal").length === 0) && rel !== "list" && rel !== "user"){
|
||||
$TD.openBrowser(me.attr("href"));
|
||||
onUrlOpened();
|
||||
}
|
||||
|
||||
|
||||
e.preventDefault();
|
||||
onUrlOpened();
|
||||
});
|
||||
|
||||
window.open = function(url){
|
||||
@ -179,18 +179,20 @@
|
||||
$TD.openBrowser(url);
|
||||
onUrlOpened();
|
||||
};
|
||||
|
||||
TD.util.maybeOpenClickExternally = prependToFunction(TD.util.maybeOpenClickExternally,function(e){
|
||||
if (e.ctrlKey){
|
||||
if (urlWait)return;
|
||||
|
||||
$TD.openBrowser(e.currentTarget.getAttribute("href"));
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
TD.util.maybeOpenClickExternally = prependToFunction(TD.util.maybeOpenClickExternally,function(e){
|
||||
if (e.ctrlKey){
|
||||
$TD.openBrowser(e.currentTarget.getAttribute("href"));
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
// Block: Expand shortened links on hover.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user