Advertisement
Guest User

Untitled

a guest
Sep 9th, 2011
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2. var vide, html;
  3. var div = document.getElementsByTagName("div")
  4. for( i=0; i < div.length; i++ )
  5. {
  6. if(div[i].className == 'postcolor')
  7. {
  8. if(div[i].innerHTML.indexOf("[video]")!=-1 && div[i].innerHTML.indexOf("[/video]")!=-1)
  9. {
  10. html = div[i].innerHTML;
  11. if (html.indexOf('smotri.com')) {
  12. vide = /\\[video\\]http:\\/\\/(.*?)\\/video\\/view\\/\\?id=(.*?)\\[\\/video\\]/g
  13. html = html.replace(vide, "<br><embed src='http://pics.$1/scrubber_custom8.swf?file=$2&bufferTime=3&autoStart=false&str_lang=rus&xmlsource=http://pics.$1/cskins/blue/skin_color_lightaqua.xml&xmldatasource=http://pics.$1/skin_ng.xml' quality='high' allowscriptaccess='always' allowfullscreen='true' wmode='opaque'  width='400' height='300' type='application/x-shockwave-flash'></embed><br>")
  14.   }
  15. if (html.indexOf('youtube.com')) {
  16. vide = /\\[video\\]http:\\/\\/(.*?)\\/watch\\?v=([^\\[]{11,110})\\[\\/video\\]/g
  17. html = html.replace(vide, "<br><embed src='http://$1/v/$2' type='application/x-shockwave-flash' wmode='transparent' allowfullscreen='true' allowscriptaccess='always' flashvars='fs=1&rel=0' width='425' height='350'></embed><br>")
  18.   }
  19. if (html.indexOf('rutube.ru')) {
  20. vide = /\\[video\\]http:\\/\\/(.*?)\\/tracks\\/([^\\[]{1,20})\\.html\\?v=([^\\[]{11,50})\\[\\/video\\]/g
  21. html = html.replace(vide, "<br><embed src='http://video.$1/$3' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed><br>")
  22.   }
  23. if (html.indexOf('vimeo.com')) {
  24. vide = /\\[video\\]http:\\/\\/(.*?)\\/([^\\[]{1,10})\\[\\/video\\]/g
  25. html = html.replace(vide, "<br><embed src='http://$1/moogaloop.swf?clip_id=$2&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;fullscreen=1' type='application/x-shockwave-flash' wmode='transparent' allowfullscreen='true' allowscriptaccess='always' width='400' height='300'></embed><br>")
  26.  }
  27. if (html.indexOf('dailymotion.com')) {
  28. vide = /\\[video\\]http:\\/\\/(.*?)\\/video\\/([^\\[]{6,110})\\[\\/video\\]/g
  29. html = html.replace(vide, "<br><embed src='http://$1/swf/video/$2' type='application/x-shockwave-flash' wmode='transparent' width='480' height='360' allowfullscreen='true'></embed><br>")
  30.  }
  31. div[i].innerHTML = html}}}
  32. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement