made the screenshot function work via url