Hosting breaks Javascript (?)

I previously hosted a static site on Dropbox, but I moved it to Bitbucket today (via these instructions). The hosting itself works just fine; I can access those hosted files as expected. But for some reason the Javascript functions that are called (via jQuery) on

$(document).ready()

aren't working properly any more. I also noticed that Bitbucket injects a Javascript snippet at the beginning of my HTML documents, which is almost certainly the culprit. When I view the Javascript console while at the Dropbox site, I get no error messages. But when I view the Javascript console while at the Bitbucket site, I get an error message: "SyntaxError: class is a reserved identifier" and a pointer to the jQuery file (over which I have no control, of course).

Does anyone know what that injected Javascript snippet is, why it would break my code, and how to work around it? Thanks!

3 answers

1 accepted

Does anyone know what that injected Javascript snippet is

The same document that you link to in the question says:

Finally, Atlassian injects a rum.js script into each Bitbucket website. This script captures internal web analytics and statistics.

No idea why your site is broken though. Maybe you should file a issue report to Atlassian ?

Oh, I guess I didn't notice that on the page, but I bet that you're right. I'll file an issue report. Thanks!

Seriously? Nobody?

If you want to post a link to the site, I'll take a glance at the JS myself, but I've never attempted using free online storage to host static sites.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,767 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you