This script dynamically embeds YouTube players into reddit comments wherever a comment references a YouTube video URL. It is a prototype of functionality I would like to see added to RES.
In Chrome:
- Download the Personalized Web extension
- Create a new rule:
- Rule name:
YouTube embedded in reddit comments
- Match URLs:
^http://.+reddit.+\/
- In 'Add HTML', paste the contents of script.js in this gist
- Click Save button.
- Rule name:
- Re/load a Reddit page which has YouTube links in the comments. You should see a button next to these links which reveals an embedded YouTube player when clicked.