nodebb-plugin-youtube-lite
-
I have the regex times adjusted.
with me it runs smoothly on 0.7.1the regular expression is
<a href=".(?:youtube.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.|.*[?&]v=)|youtu.be/)([^"&?/ ]{11})</a>the following URL will be found in a <A>:
https://www.youtube.com/watch?t=61&v=JozAmXo2bDE
https://www.youtube.com/watch?v=VH2QAMMSL40
http://www.youtube.com/embed/NLqAF9hrVbY
http://youtu.be/NLqAF9hrVbY
http://www.youtube.com/sandalsResorts#p/c/54B8C800269D7C1B/0/FJUvudQsKCMinfos:
https://github.com/ogerly/nodebb-plugin-youtube-lite/blob/master/library.js -
edit in library.js
this regex is better:
.....var regularUrl = /<a href="http.?:.*(youtube.com|.*be/|.*embed/|watch?.v=|(\w{11})).?</a>/g;
......
-
@ogerly said:
<a href="http.?:.*(youtube.com|.*be/|.*embed/|watch?. v=|(\w{11})). ?</a>