Use STATIC_URL to resolve script URL instead of hard coding

I found the true source of the problem this time. Here's a patch.