示例#1
0
文件: JSHelpers.cs 项目: shldn/mdons
    public static void MinimizeGoogleDocMenus(CollabBrowserTexture bTex)
    {
        string  cmd  = "var elem = document.getElementById(\"viewModeButton\"); if( elem != null ){var attr = elem.getAttribute(\"data-tooltip\"); if(attr != null && attr.indexOf(\"Hide\") != -1){elem.getBoundingClientRect();}}";
        JSValue rect = bTex.ExecuteJavaScriptWithResult(cmd);

        if (rect != null && rect.Type != JSValueType.Null)
        {
            bTex.ClickOnTopCenterOfObject(rect.GetObject());
        }
    }