1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-22 09:15:48 +02:00

Fix middle-clicking on certain user links opening the page in TweetDuck window

This commit is contained in:
chylex 2016-08-13 03:26:00 +02:00
parent 3f15ff1c06
commit 569fdec380

View File

@ -53,11 +53,13 @@
}
});
// Setup video element replacement
// Setup video element replacement and fix missing target in user links
new MutationObserver(function(){
$("video").each(function(){
$(this).parent().replaceWith("<a href='"+$(this).attr("src")+"' rel='url' target='_blank' style='display:block; border:1px solid #555; padding:3px 6px'>&#9658; Open video in browser</a>");
});
$("a[rel='user']").attr("target","_blank");
}).observe($(".js-app-columns")[0],{
childList: true,
subtree: true