I use the following Javascript snippet to autoembed images, videos and links in my forums. I wish to use this for the same purpose on my index page which uses VBA 4.1.2. The code only works in the .postbody class in the threadbit
Code:
selector: '.postbody',
no matter how I try to edit this part I always break it as I know next to nothing about coding. Also I don't know what class to use, firebug does not make it obvious. I was thinking it would be postcontent but I have no idea how to add a second selector... Looking for a little assistance.
Any help would be appreciated
Link:
http://www.fatwillie.net
Code:
<script type="text/javascript">
var _path = 'http://scripts.embed.ly/anywhere/';
var _embedly={
key: 'xxxxxxxxxxxxxxxxxxxx', // Change XXXXXXXXXX to be your Embedly Key, http://embed.ly/pricing
method: 'replace',
endpoint: 'preview',
theme: 'dark',
selector: '.postbody',
excludes:/((http:\/\/(.*amazon\..*\/gp\/product\/.*|.*amazon\..*\/.*\/dp\/.*|.*amazon\..*\/dp\/.*|.*amazon\..*\/o\/ASIN\/.*|.*amazon\..*\/gp\/offer-listing\/.*|.*amazon\..*\/.*\/ASIN\/.*|.*amazon\..*\/gp\/product\/images\/.*|.*amazon\..*\/gp\/aw\/d\/.*|www\.amzn\.com\/.*|amzn\.com\/.*|www\.facebook\.com\/photo\.php.*|www\.facebook\.com\/video\/video\.php.*|www\.facebook\.com\/v\/.*))|(https:\/\/(www\.facebook\.com\/photo\.php.*|www\.facebook\.com\/video\/video\.php.*|www\.facebook\.com\/v\/.*|apps\.facebook\.com\/.*)))/i
};
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
g.src=_path+'anywhere.js';s.parentNode.insertBefore(g,s); }(document,'script'));
</script>