Javascript codes for website and third-party application widgets