             }
             return false
         }
-        
-//        if isShare {
-//            var isDiscussion = false
-//            if let highlightId = selectedHighlightId {
-//                isDiscussion = FolioReader.sharedInstance.readerContainer.isDiscussion(highlightWith: highlightId)
-//            }
-//            
-//            if isDiscussion {
-//                if action == #selector(self.colors(_:)) ||
-//                    (action == #selector(self.share(_:)) && readerConfig.allowSharing) ||
-//                    action == #selector(self.remove(_:)) ||
-//                    action == #selector(self.copyText(_:)) ||
-//                    action == #selector(self.createAnnotation(_:)) {
-//                    
-//                    return true
-//                }
-//                return false
-//            } else {
-//                if action == #selector(self.colors(_:)) ||
-//                    (action == #selector(self.share(_:)) && readerConfig.allowSharing) ||
-//                    action == #selector(self.remove(_:)) ||
-//                    action == #selector(self.copyText(_:)) ||
-//                    action == #selector(self.createDiscussion(_:)) ||
-//                    action == #selector(self.createAnnotation(_:)) {
-//                    
-//                    return true
-//                }
-//                return false
-//            }
-//            return false
-//            // menu for selecting highlight color
-//        } else if isColors {
-//            if action == #selector(self.setYellow(_:)) || action == #selector(self.setGreen(_:)) || action == #selector(self.setBlue(_:)) || action == #selector(self.setPink(_:)) || action == #selector(self.setUnderline(_:)) {
-//                return true
-//                
-//            }
-//            
-//            return false
-//            
-//            // default menu
-//        } else {
-//            var isOneWord = false
-//            if let result = js("getSelectedText()") , result.components(separatedBy: " ").count == 1 {
-//                isOneWord = true
-//            }
-//            
-//            if (action == #selector(self.highlight(_:)) ||
-//                action == #selector(self.copyText(_:)) ||
-//                action == #selector(self.createDiscussion(_:)) ||
-//                action == #selector(self.createAnnotation(_:)))
-//                || (action == #selector(self.define(_:)) && isOneWord)
-//                || (action == #selector(self.play(_:)) && (book.hasAudio() || readerConfig.enableTTS))
-//                || (action == #selector(self.share(_:)) && readerConfig.allowSharing)
-//                || (action == #selector(NSObject.copy) && readerConfig.allowSharing) {
-//                return true
-//            }
-//            return false
-//        }
     }
     
     open override var canBecomeFirstResponder : Bool {


            if action == #selector(highlight(_:))
                || action == #selector(createAnnotation(_:))
                || (action == #selector(define(_:)) && isOneWord)
                || (action == #selector(play(_:)) && (book.hasAudio() || readerConfig.enableTTS))
                || (action == #selector(share(_:)) && readerConfig.allowSharing)

            menuItems = [yellowItem, greenItem, blueItem, pinkItem, underlineItem]
        } else {
            // default menu [Copiar, Destaque, Anotação, Criar discussão (desabilitado)]
            menuItems = [copyItem, highlightItem, annotationItem, discussionItem, shareItem]
            
//            if book.hasAudio() || readerConfig.enableTTS {
//                menuItems.insert(playAudioItem, at: 0)
