From 79f6df121b3d1fac9a60f3abb388e7bf5d62ecd6 Mon Sep 17 00:00:00 2001
From: chylex <info@chylex.com>
Date: Wed, 8 Mar 2017 13:01:48 +0100
Subject: [PATCH] Swap shift key functionality in drawer and retweet account
 selectors

---
 Resources/Scripts/code.js | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js
index e5b1a3c8..22065993 100644
--- a/Resources/Scripts/code.js
+++ b/Resources/Scripts/code.js
@@ -494,6 +494,23 @@
     });
   })();
   
+  //
+  // Block: Swap shift key functionality for selecting accounts.
+  //
+  $(".js-drawer[data-drawer='compose']").delegate(".js-account-list > .js-account-item", "click", function(e){
+    e.shiftKey = !e.shiftKey;
+  });
+  
+  TD.components.AccountSelector.prototype.refreshPostingAccounts = appendToFunction(TD.components.AccountSelector.prototype.refreshPostingAccounts, function(){
+    if (!this.$node.attr("td-account-selector-hook")){
+      this.$node.attr("td-account-selector-hook", "1");
+      
+      this.$node.delegate(".js-account-item", "click", function(e){
+        e.shiftKey = !e.shiftKey;
+      });
+    }
+  });
+  
   //
   // Block: Work around clipboard HTML formatting.
   //