 class SlideViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, MGSwipeTableCellDelegate {
     @IBAction func deleteAllTabCheck(sender: AnyObject) {
         //function to define tab deletion
-        if(mainView == false) {
-         //remove all history records
-         slideViewValue.historyUrl.removeAll()
-         slideViewValue.historyTitle.removeAll()
-         slideViewValue.htButtonSwitch = false
-         
-         //back to original tab
-         historyBackToNormal()
-         self.view.makeToast("Tabs", duration: 0.8, position: CGPoint(x: self.view.frame.size.width-120, y: UIScreen.mainScreen().bounds.height-70))
-         } else {
-         //reset main arrays
-         slideViewValue.windowStoreTitle.removeAll()
-         slideViewValue.windowStoreTitle.append("")
-         slideViewValue.windowStoreUrl.removeAll()
-         slideViewValue.windowStoreUrl.append("about:blank")
-         slideViewValue.scrollPosition.removeAll()
-         slideViewValue.scrollPosition.append("0.0")
-         slideViewValue.windowCurTab = 0
-         
-         //reset readActions
-         slideViewValue.readActions = false
-         slideViewValue.readRecover = false
-         slideViewValue.readActionsCheck = false
-         self.sgButton.setImage(UIImage(named: "Read"), forState: UIControlState.Normal)
-         
-         //open tabs in background
-         WKWebviewFactory.sharedInstance.webView.loadRequest(NSURLRequest(URL:NSURL(string: slideViewValue.windowStoreUrl[slideViewValue.windowCurTab])!))
-         slideViewValue.scrollPositionSwitch = true
-         self.revealViewController().rightRevealToggleAnimated(true)
+        if(mainView == 0) {
+            //remove all history records
+            slideViewValue.historyUrl.removeAll()
+            slideViewValue.historyTitle.removeAll()
+            slideViewValue.htButtonSwitch = false
+            
+            //back to original tab
+            historyBackToNormal()
+            self.view.makeToast("Tabs", duration: 0.8, position: CGPoint(x: self.view.frame.size.width-120, y: UIScreen.mainScreen().bounds.height-70))
+        } else if(mainView == 2) {
+            //remove all history records
+            slideViewValue.likesUrl.removeAll()
+            slideViewValue.likesTitle.removeAll()
+            slideViewValue.bkButtonSwitch = false
+            
+            //back to original tab
+            bookmarkBackToNormal()
+            self.view.makeToast("Tabs", duration: 0.8, position: CGPoint(x: self.view.frame.size.width-120, y: UIScreen.mainScreen().bounds.height-70))
+        } else if(mainView == 1) {
+            //reset main arrays
+            slideViewValue.windowStoreTitle.removeAll()
+            slideViewValue.windowStoreTitle.append("")
+            slideViewValue.windowStoreUrl.removeAll()
+            slideViewValue.windowStoreUrl.append("about:blank")
+            slideViewValue.scrollPosition.removeAll()
+            slideViewValue.scrollPosition.append("0.0")
+            slideViewValue.windowCurTab = 0
+            
+            //reset readActions
+            slideViewValue.readActions = false
+            slideViewValue.readRecover = false
+            slideViewValue.readActionsCheck = false
+            self.sgButton.setImage(UIImage(named: "Read"), forState: UIControlState.Normal)
+            
+            //open tabs in background
+            WKWebviewFactory.sharedInstance.webView.loadRequest(NSURLRequest(URL:NSURL(string: slideViewValue.windowStoreUrl[slideViewValue.windowCurTab])!))
+            slideViewValue.scrollPositionSwitch = true
+            self.revealViewController().rightRevealToggleAnimated(true)
          }
     }
     @IBAction func deleteAllTab(sender: AnyObject) {

                slideViewValue.bkButtonSwitch = false
                bgText.text = "history"
                tempArray_title = slideViewValue.historyTitle
                mainView = false
                windowView.reloadSections(NSIndexSet(indexesInRange: NSMakeRange(0, windowView.numberOfSections)), withRowAnimation: .Automatic)
                self.view.makeToast("History", duration: 0.8, position: CGPoint(x: self.view.frame.size.width-120, y: UIScreen.mainScreen().bounds.height-70))
                

    }
    var tempArray_title = [String]() //Temporary store array
    var style = ToastStyle() //initialise toast
    var mainView: Int = 0
    var trashButton: Bool = false
    var likeText: String = ""
    
