Package org.jsoup.nodes

Examples of org.jsoup.nodes.Document.head()


        .attr("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");
        // doc.head().appendElement("script").attr("src",
        // "/js/jquery.tools.min.js");
        doc.head().appendElement("script")
        .attr("src", "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js");
        doc.head().appendElement("script").attr("src", "/js/jquery.cookie.js");
        doc.head().appendElement("script").attr("src", "/js/rangy-core.js");
        doc.head().appendElement("script").attr("src", "/js/rangy-selectionsaverestore.js");
        doc.head().appendElement("script").attr("src", "/js/locutus.js");
        doc.head()
        .appendElement("script")
View Full Code Here


        // doc.head().appendElement("script").attr("src",
        // "/js/jquery.tools.min.js");
        doc.head().appendElement("script")
        .attr("src", "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js");
        doc.head().appendElement("script").attr("src", "/js/jquery.cookie.js");
        doc.head().appendElement("script").attr("src", "/js/rangy-core.js");
        doc.head().appendElement("script").attr("src", "/js/rangy-selectionsaverestore.js");
        doc.head().appendElement("script").attr("src", "/js/locutus.js");
        doc.head()
        .appendElement("script")
        .attr("type", "text/javascript")
View Full Code Here

        // "/js/jquery.tools.min.js");
        doc.head().appendElement("script")
        .attr("src", "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js");
        doc.head().appendElement("script").attr("src", "/js/jquery.cookie.js");
        doc.head().appendElement("script").attr("src", "/js/rangy-core.js");
        doc.head().appendElement("script").attr("src", "/js/rangy-selectionsaverestore.js");
        doc.head().appendElement("script").attr("src", "/js/locutus.js");
        doc.head()
        .appendElement("script")
        .attr("type", "text/javascript")
        .text("function woopraReady(tracker) {tracker.setDomain('lastcalc.com');tracker.setIdleTimeout(300000);tracker.track();return false;}(function(){var wsc = document.createElement('script');wsc.src = document.location.protocol+'//static.woopra.com/js/woopra.js';wsc.type = 'text/javascript';wsc.async = true;var ssc = document.getElementsByTagName('script')[0];ssc.parentNode.insertBefore(wsc, ssc);})();");
View Full Code Here

        doc.head().appendElement("script")
        .attr("src", "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js");
        doc.head().appendElement("script").attr("src", "/js/jquery.cookie.js");
        doc.head().appendElement("script").attr("src", "/js/rangy-core.js");
        doc.head().appendElement("script").attr("src", "/js/rangy-selectionsaverestore.js");
        doc.head().appendElement("script").attr("src", "/js/locutus.js");
        doc.head()
        .appendElement("script")
        .attr("type", "text/javascript")
        .text("function woopraReady(tracker) {tracker.setDomain('lastcalc.com');tracker.setIdleTimeout(300000);tracker.track();return false;}(function(){var wsc = document.createElement('script');wsc.src = document.location.protocol+'//static.woopra.com/js/woopra.js';wsc.type = 'text/javascript';wsc.async = true;var ssc = document.getElementsByTagName('script')[0];ssc.parentNode.insertBefore(wsc, ssc);})();");
View Full Code Here

        .attr("src", "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js");
        doc.head().appendElement("script").attr("src", "/js/jquery.cookie.js");
        doc.head().appendElement("script").attr("src", "/js/rangy-core.js");
        doc.head().appendElement("script").attr("src", "/js/rangy-selectionsaverestore.js");
        doc.head().appendElement("script").attr("src", "/js/locutus.js");
        doc.head()
        .appendElement("script")
        .attr("type", "text/javascript")
        .text("function woopraReady(tracker) {tracker.setDomain('lastcalc.com');tracker.setIdleTimeout(300000);tracker.track();return false;}(function(){var wsc = document.createElement('script');wsc.src = document.location.protocol+'//static.woopra.com/js/woopra.js';wsc.type = 'text/javascript';wsc.async = true;var ssc = document.getElementsByTagName('script')[0];ssc.parentNode.insertBefore(wsc, ssc);})();");

        doc.head().append("<script type=\"text/javascript\"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-354970-27']); _gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script>");
View Full Code Here

        doc.head()
        .appendElement("script")
        .attr("type", "text/javascript")
        .text("function woopraReady(tracker) {tracker.setDomain('lastcalc.com');tracker.setIdleTimeout(300000);tracker.track();return false;}(function(){var wsc = document.createElement('script');wsc.src = document.location.protocol+'//static.woopra.com/js/woopra.js';wsc.type = 'text/javascript';wsc.async = true;var ssc = document.getElementsByTagName('script')[0];ssc.parentNode.insertBefore(wsc, ssc);})();");

        doc.head().append("<script type=\"text/javascript\"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-354970-27']); _gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script>");
        doc.body().attr("data-worksheet-id", worksheet.id);
        doc.body().attr("data-worksheet-ro-id", worksheet.readOnlyId);
        final Element header = doc.body().appendElement("div").attr("id", "header");
        header.appendElement("div").attr("id", "logo").text("LastCalc");
        header.appendElement("div").attr("id", "help-button").text("Show Help");
View Full Code Here

        assertThat(document.select(".secondary-nav .blog-category.active").text(), equalTo("All Posts"));

        assertThat(document.select(".content--title.blog-category.active").text(), equalTo("The Spring Blog"));

        assertThat(
                document.head()
                        .getElementsByAttributeValue("type", "application/atom+xml")
                        .get(0).attr("href"), equalTo("/blog.atom"));
    }

    @Test
View Full Code Here

                .getDisplayName()));

        assertThat(html.select(".content--title.blog-category.active").text(), equalTo(PostCategory.ENGINEERING
                .getDisplayName()));

        assertThat(html.head().getElementsByAttributeValue("type", "application/atom+xml").get(0).attr("href"),
                equalTo("/blog/category/engineering.atom"));
    }

    @Test
    public void given1PageOfResults_blogIndexDoesNotShowPaginationControl() throws Exception {
View Full Code Here

        assertThat(html.select(".blog-category.active").text(), equalTo("Broadcasts"));

        assertThat(numberOfBlogPosts(html), is(2));

        assertThat(html.head().getElementsByAttributeValue("type", "application/atom+xml").get(0).attr("href"),
                equalTo("/blog/broadcasts.atom"));
    }

    @Test
    public void given1PageOfResults_blogIndexDoesNotShowPaginationControl() throws Exception {
View Full Code Here

                Elements children = embedDoc.body().children();
                Element wrappingNode = ElementUtil.wrapElementsToSingleNode(children);
        */
        Element wrappingNode = new GroupNode();
        // retrieve all the blocks that misincluded into head
        Element head = embedDoc.head();
        Elements headChildren = head.children();
        List<Node> tempList = new ArrayList<>();
        String tagName;
        for (Element child : headChildren) {
            if (StringUtil.in(child.tagName(), "script", "link", ExtNodeConstants.BLOCK_NODE_TAG)) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.