mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-06-13 03:34:04 +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"){
|
if (!me.is(".link-complex") && !(rel === "mediaPreview" && me.closest("#open-modal").length === 0) && rel !== "list" && rel !== "user"){
|
||||||
$TD.openBrowser(me.attr("href"));
|
$TD.openBrowser(me.attr("href"));
|
||||||
|
onUrlOpened();
|
||||||
}
|
}
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
onUrlOpened();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
window.open = function(url){
|
window.open = function(url){
|
||||||
@ -179,10 +179,11 @@
|
|||||||
$TD.openBrowser(url);
|
$TD.openBrowser(url);
|
||||||
onUrlOpened();
|
onUrlOpened();
|
||||||
};
|
};
|
||||||
})();
|
|
||||||
|
|
||||||
TD.util.maybeOpenClickExternally = prependToFunction(TD.util.maybeOpenClickExternally,function(e){
|
TD.util.maybeOpenClickExternally = prependToFunction(TD.util.maybeOpenClickExternally,function(e){
|
||||||
if (e.ctrlKey){
|
if (e.ctrlKey){
|
||||||
|
if (urlWait)return;
|
||||||
|
|
||||||
$TD.openBrowser(e.currentTarget.getAttribute("href"));
|
$TD.openBrowser(e.currentTarget.getAttribute("href"));
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@ -190,6 +191,7 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
})();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Block: Expand shortened links on hover.
|
// Block: Expand shortened links on hover.
|
||||||
|
Loading…
Reference in New Issue
Block a user