/// <summary>
        ///   <para>Renders required JavaScript tags for Surfingbird widgets.</para>
        /// </summary>
        /// <param name="renderer">JavaScript code renderer.</param>
        /// <returns>JavaScript code.</returns>
        /// <exception cref="ArgumentNullException">If <paramref name="renderer"/> is a <c>null</c> reference.</exception>
        public static IHtmlString Surfingbird(this IWidgetsScriptsRenderer renderer)
        {
            Assertion.NotNull(renderer);

            return(new MvcHtmlString(new TagBuilder("script")
                                     .Attribute("src", "http://surfingbird.ru/share/share.min.js")
                                     .Attribute("type", "text/javascript")
                                     .ToString()));
        }
        /// <summary>
        ///   <para>Renders required JavaScript tags for MailRu widgets.</para>
        /// </summary>
        /// <param name="renderer">JavaScript code renderer.</param>
        /// <returns>JavaScript code.</returns>
        /// <exception cref="ArgumentNullException">If <paramref name="renderer"/> is a <c>null</c> reference.</exception>
        public static IHtmlString MailRu(this IWidgetsScriptsRenderer renderer)
        {
            Assertion.NotNull(renderer);

            return(new MvcHtmlString(new TagBuilder("script")
                                     .Attribute("src", "http://cdn.connect.mail.ru/js/loader.js")
                                     .Attribute("type", "text/javascript")
                                     .ToString()));
        }
        /// <summary>
        ///   <para>Renders required JavaScript tags for Pinterest widgets.</para>
        /// </summary>
        /// <param name="renderer">JavaScript code renderer.</param>
        /// <returns>JavaScript code.</returns>
        /// <exception cref="ArgumentNullException">If <paramref name="renderer"/> is a <c>null</c> reference.</exception>
        public static IHtmlString Pinterest(this IWidgetsScriptsRenderer renderer)
        {
            Assertion.NotNull(renderer);

            return(new MvcHtmlString(new TagBuilder("script")
                                     .Attribute("src", "http://assets.pinterest.com/js/pinit.js")
                                     .Attribute("type", "text/javascript")
                                     .ToString()));
        }
        /// <summary>
        ///   <para>Renders required JavaScript tags for Tumblr widgets.</para>
        /// </summary>
        /// <param name="renderer">JavaScript code renderer.</param>
        /// <returns>JavaScript code.</returns>
        /// <exception cref="ArgumentNullException">If <paramref name="renderer"/> is a <c>null</c> reference.</exception>
        public static IHtmlString Tumblr(this IWidgetsScriptsRenderer renderer)
        {
            Assertion.NotNull(renderer);

            return(new MvcHtmlString(new TagBuilder("script")
                                     .Attribute("src", "http://platform.tumblr.com/v1/share.js")
                                     .Attribute("type", "text/javascript")
                                     .ToString()));
        }
Exemplo n.º 5
0
        /// <summary>
        ///   <para>Renders required JavaScript tags for Vkontakte widgets.</para>
        /// </summary>
        /// <param name="renderer">JavaScript code renderer.</param>
        /// <returns>JavaScript code.</returns>
        /// <exception cref="ArgumentNullException">If <paramref name="renderer"/> is a <c>null</c> reference.</exception>
        public static IHtmlString Vkontakte(this IWidgetsScriptsRenderer renderer)
        {
            Assertion.NotNull(renderer);

            return(new MvcHtmlString(new TagBuilder("script")
                                     .Attribute("src", "http://vk.com/js/api/openapi.js")
                                     .Attribute("type", "text/javascript")
                                     .ToString()));
        }
Exemplo n.º 6
0
        /// <summary>
        ///   <para>Renders required JavaScript tags for VideoJS widgets.</para>
        /// </summary>
        /// <param name="renderer">JavaScript code renderer.</param>
        /// <returns>JavaScript code.</returns>
        /// <exception cref="ArgumentNullException">If <paramref name="renderer"/> is a <c>null</c> reference.</exception>
        public static IHtmlString VideoJS(this IWidgetsScriptsRenderer renderer)
        {
            Assertion.NotNull(renderer);

            return(new MvcHtmlString(new TagBuilder("script")
                                     .Attribute("src", "http://vjs.zencdn.net/4.3/video.js")
                                     .Attribute("type", "text/javascript")
                                     .ToString()));
        }
        /// <summary>
        ///   <para>Renders required JavaScript tags for Disqus widgets.</para>
        /// </summary>
        /// <param name="renderer">JavaScript code renderer.</param>
        /// <returns>JavaScript code.</returns>
        /// <exception cref="ArgumentNullException">If <paramref name="renderer"/> is a <c>null</c> reference.</exception>
        public static IHtmlString Disqus(this IWidgetsScriptsRenderer renderer)
        {
            Assertion.NotNull(renderer);

            return(Scripts.Render("~/WebWidgets/Disqus"));
        }