How to apply this script to content subsequently loaded within the page?
Take a look at the Mutation Observer API, or use this jQuery plugin (provides fallbacks for unsupported browsers): https://github.com/kapetan/jquery-observe
Take a look at the Mutation Observer API, or use this jQuery plugin (provides fallbacks for unsupported browsers): https://github.com/kapetan/jquery-observe
How to apply this script to content subsequently loaded within the page?
I had a little success modifying a script meant to pause videos, to autoplay them instead. It works on pages where the video loads with the page, but fails on vk.com (where I want it to work) because videos are loaded within the page depending on the link clicked.
Any advice to make it work on dynamically added videos would be appreciated.