From 893783dcbb5b8978d5759f9881de437b11e0f0cb Mon Sep 17 00:00:00 2001 From: kunalmnnit <34139921+kunalmnnit@users.noreply.github.com> Date: Thu, 18 Oct 2018 19:35:02 +0530 Subject: [PATCH] FIxes #17 Group Tabs on the basis of their headings --- background.js | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/background.js b/background.js index f2fc661..e20dcf0 100644 --- a/background.js +++ b/background.js @@ -536,8 +536,25 @@ $(document).ready(function(){ else if((idx = (txt.toLowerCase()).indexOf("arrange heading".toLowerCase())) !==-1) { Speech("Arranging the headings of the tab"); - // Code to arrange tabs alphabetically - // MEDIUM: 3 + // Code to arrange tabs alphabetically + // MEDIUM: 3 + var move = function(tabs){ + tabs.sort(function(a,b){ + if(a.title