示例#1
0
        public virtual void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model)
        {
            if (!TwitterUrls.IsTweetDeck(frame.Url) || browser.IsLoading)
            {
                Context = CurrentInfo.Reset();
            }
            else
            {
                Context = CurrentInfo.Create(parameters);
            }

            if (parameters.TypeFlags.HasFlag(ContextMenuType.Selection) && !parameters.TypeFlags.HasFlag(ContextMenuType.Editable))
            {
                model.AddItem(MenuSearchInBrowser, "Search in browser");
                model.AddSeparator();
                model.AddItem(MenuReadApplyROT13, "Apply ROT13");
                model.AddSeparator();
            }