From 65b8efe13c3d921f1f116ed052ec5bc93a603f1c Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Sat, 25 Apr 2020 03:48:20 +0200
Subject: [PATCH] Fix non-quoted tweet links opening in browser despite also
 opening in the column

Closes #273
---
 Resources/Scripts/code.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js
index 180b0bd6..8f4e9b9e 100644
--- a/Resources/Scripts/code.js
+++ b/Resources/Scripts/code.js
@@ -572,7 +572,9 @@
   //
   execSafe(function setupShortenerBypass(){
     $(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
+      // event.which seems to be borked in auxclick
+      // tweet links open directly in the column
+      if ((e.button === 0 || e.button === 1) && $(this).attr("rel") !== "tweet"){
         $TD.openBrowser($(this).attr("data-full-url"));
         e.preventDefault();
       }