0

I know this Question has been asked here before, but still I can't figure out in my case, so please advise.

I made some GitHub page:

http://kenokabe.github.io/test

Chrome browser fails to open this page at first, and the reload shows properly. Incognite Window fails even after it's reloaded.

Chrome Console says:

Uncaught SyntaxError: Unexpected token < jquery-2.0.3.min.js:4

The page is based on

https://github.com/kenokabe/kenokabe.github.io

Brief Content Management System

No Server side involved. JS code on Client side does all.

Getting Ready
  • /scheme.html is a clone of the index.html (Auto Generated @setup).

  • /javascripts/invoke.js the bootstrapper

Write Contents and Publish
  1. Edit a DOC on Dual Pane MarkDown Editor

  2. At the end of the file, add

    <style type="text/css">body {display: none;}</style><script src="/javascripts/invoke.js"></script>

  3. Obtain the HTML file via Editor, and upload to the top level of the Github repo


http://kenokabe.github.io/test0 is an original html file.

http://kenokabe.github.io/test

is a bootstrap html file modified by adding the 1 line code to call invoke.js.

var load = function (src, check, next)
{
    check = new Function('return !!(' + check + ')');
    if (!check())
    {
        var script = document.createElement('script')
        script.src = src;
        document.body.appendChild(script);
        setTimeout(function ()
        {
            if (!check())
            {
                setTimeout(arguments.callee, 100);
            }
            else
            {
                next();
            }
        }, 100);
    }
    else
    {
        next();
    }
};


load(
    'http://code.jquery.com/jquery-2.0.3.min.js',
    'window.jQuery',
    function ()
    {
        $(document).ready(function ()
        {
            $("body").hide(); 
            $("script").attr("src","");
            var body1 = $("body").html();
            $("body").load("/scheme.html", function ()
            {
                $("#doc").html(body1);
                $("body").show();
            });
        })

    }
);
  • I think this is telling you the source of the problem: `Unexpected token < jquery-2.0.3.min.js:4`. Line 4 in the minified file. Can you use Chrome pretty print and set a break point there? Then you can look at the call stack. –  Jul 13 '13 at 19:46
  • [Set a breakpoint for all uncaught errors](http://stackoverflow.com/questions/15975642/chrome-tools-auto-breaking/15988196#15988196) in the devtools. I just did that, and the triggered breakpoint looks like a path towards the solution. – Rob W Jul 13 '13 at 21:58
  • see this question for details of the 'problem' and jquery change to resolve it. http://stackoverflow.com/questions/18365315/jquerys-jquery-1-10-2-min-map-is-triggering-a-404-not-found – Tofuwarrior Sep 08 '14 at 07:53

0 Answers0