JSFiddle - React, Tailwind, and code Playground

by Zhitao Gong

HTML

<div id="demo"></div>

JavaScript

function requestCrossDomain(url, cb) {

    yql = "http://query.yahooapis.com/v1/public/yql?" +
        "q=" + encodeURIComponent('select * from html where url="' + url + '"') +
        "&callback=?";

    console.log(yql);

    $.getJSON(yql, function (data) {
        if (data.results[0]) {
            $("<pre/>").html(data.results[0]).appendTo($("#demo"));
            console.log(data.results[0]);
        }
    })
};

requestCrossDomain("https://gist.githubusercontent.com/gongzhitaao/11357604/raw/7946d46c975337084b18ff1d59530acc59c9e010/index.html");