Fixing js errors public link master

some fixes while testing link to public folder.

@karlitschek @butonic @MTGap can you review please? THX