diff --git a/inc/instance-config.php b/inc/instance-config.php index c2df3b5b..1dde57c0 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -136,6 +136,7 @@ $config['additional_javascript'][] = 'js/infinite-scroll.js'; $config['additional_javascript'][] = 'js/download-original.js'; $config['additional_javascript'][] = 'js/thread-watcher.js'; + $config['additional_javascript'][] = 'js/youtube.js'; //$config['font_awesome_css'] = '/netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css'; @@ -392,10 +393,11 @@ EOT; mod_page(_('Board configuration'), 'mod/settings.html', array('board'=>$board, 'rules'=>prettify_textarea($rules), 'css'=>prettify_textarea($css), 'token'=>make_secure_link_token('settings/'.$board['uri']), 'languages'=>$possible_languages)); }; + $config['embedding'] = array( array( - '/^https?:\/\/(\w+\.)?youtube\.com\/watch\?v=([a-zA-Z0-9\-_]{10,11})(&.+)?$/i', - '' + '/^https?:\/\/(\w+\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9\-_]{10,11})(&.+)?$/i', + $config['youtube_js_html'] ), array( '/^https?:\/\/(\w+\.)?vimeo\.com\/(\d{2,10})(\?.+)?$/i',