From 0fb06d0ff23feba26b358eb7f850d2c4314d1759 Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Tue, 1 Aug 2017 12:28:52 +0200
Subject: [PATCH] Remove reply revert option from edit-design plugin

---
 Resources/Plugins/edit-design/browser.js | 31 ------------------------
 Resources/Plugins/edit-design/modal.html |  4 ---
 2 files changed, 35 deletions(-)

diff --git a/Resources/Plugins/edit-design/browser.js b/Resources/Plugins/edit-design/browser.js
index 569ca357..e20694e0 100644
--- a/Resources/Plugins/edit-design/browser.js
+++ b/Resources/Plugins/edit-design/browser.js
@@ -1,9 +1,3 @@
-constructor(){
-  super({
-    requiresPageReload: true
-  })
-}
-
 enabled(){
   // elements & data
   this.css = null;
@@ -16,7 +10,6 @@ enabled(){
     fontSize: "12px",
     hideTweetActions: true,
     moveTweetActionsToRight: true,
-    revertReplies: false,
     themeColorTweaks: true,
     revertIcons: true,
     smallComposeTextSize: false,
@@ -59,7 +52,6 @@ enabled(){
     this.firstTimeLoad = obj === null;
     
     this.onStageReady();
-    this.injectDeciderReplyHook(obj && obj.revertReplies);
   };
   
   if (this.$$wasLoadedBefore){
@@ -248,19 +240,6 @@ enabled(){
     }
   });
   
-  // decider injections
-  this.injectDeciderReplyHook = enable => {
-    let prevFunc = TD.decider.updateFromBackend;
-    
-    TD.decider.updateFromBackend = function(data){
-      data["simplified_replies"] = !enable;
-      return prevFunc.apply(this, arguments);
-    };
-    
-    TD.decider.updateForGuestId();
-    this.$requiresReload = enable;
-  };
-  
   // animation optimization
   this.optimizations = null;
   this.optimizationTimer = null;
@@ -388,11 +367,6 @@ enabled(){
       this.css.insert(".compose-text { font-size: 12px !important; height: 120px !important }");
     }
     
-    if (this.config.revertReplies){
-      this.css.insert(".activity-header + .tweet .tweet-context { margin-left: -35px }");
-      this.css.insert(".activity-header + .tweet .tweet-context .obj-left { margin-right: 5px }");
-    }
-    
     if (this.config.revertIcons){
       this.icons = document.createElement("style");
       this.icons.innerHTML = `
@@ -529,11 +503,6 @@ enabled(){
 .txt-base-smallest:not(.icon), .txt-base-largest:not(.icon) { font-size: ${this.config.fontSize} !important }
 .avatar { border-radius: ${this.config.avatarRadius}% !important }
 
-${this.config.revertReplies ? `
-.activity-header + .tweet .tweet-context { margin-left: -35px }
-.activity-header + .tweet .tweet-context .obj-left { margin-right: 5px }
-` : ``}
-
 ${this.config.revertIcons ? `
 @font-face { font-family: 'tweetdeckold'; src: url(\"https://ton.twimg.com/tweetdeck-web/web/assets/fonts/tweetdeck-regular-webfont.5f4ea87976.woff\") format(\"woff\"); font-weight: normal; font-style: normal }
 .icon-reply:before{content:"\\f006";font-family:tweetdeckold}
diff --git a/Resources/Plugins/edit-design/modal.html b/Resources/Plugins/edit-design/modal.html
index 3ae8910f..0720c41a 100644
--- a/Resources/Plugins/edit-design/modal.html
+++ b/Resources/Plugins/edit-design/modal.html
@@ -88,10 +88,6 @@
             <input data-td-key="moveTweetActionsToRight" class="js-theme-checkbox touch-larger-label" type="checkbox">
             Tweet actions on the right side
           </label>
-          <label class="checkbox">
-            <input data-td-key="revertReplies" data-td-reload class="js-theme-checkbox touch-larger-label" type="checkbox">
-            Revert reply style (reloads page)
-          </label>
           
           <!-- DESIGN -->