Beispiel #1
0
        /// <summary>
        /// 查找主浏览器网站有无对于脚本逻辑,如果有执行脚本逻辑
        /// </summary>
        private bool QueryScriptRule(string url, string text)
        {
            string  domain = StringHelper.GetDomain(url);
            JObject jso    = HttpRequestWapper.GetJsonObject(ServerApiInvoker.APIRoot + "get_comment_script?url=" + domain);

            if (jso == null)
            {
                return(false);
            }
            string script = jso["script"].ToString();

            try {
                //JintCreator.Create(hostBrowser)
                //.SetParameter("comment", text)
                //.Run(script);
            }
            catch (Exception ex) {
                logger.Fatal(ex);
                return(false);
            }
            return(true);
        }