mirror of
https://github.com/rystaf/mlmym.git
synced 2024-11-05 06:43:21 +00:00
fix youtube link false positive
This commit is contained in:
parent
5a24937781
commit
f1f2305e82
|
@ -92,6 +92,7 @@ function formSubmit(e) {
|
|||
}
|
||||
|
||||
function parse_youtube(url){
|
||||
if (url.indexOf("youtu") == -1) return false
|
||||
var regExp = /^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/|shorts\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*/;
|
||||
var match = url.match(regExp);
|
||||
if (match && match.length > 1) {
|
||||
|
|
|
@ -48,6 +48,6 @@
|
|||
{{ template "sidebar.html" . }}
|
||||
</main>
|
||||
{{ end }}
|
||||
<script src="/_/static/utils.js?1"></script>
|
||||
<script src="/_/static/utils.js?2"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
</div>
|
||||
{{ end }}
|
||||
|
||||
<script src="/_/static/utils.js?1"></script>
|
||||
<script src="/_/static/utils.js?2"></script>
|
||||
{{ template "sidebar.html" . }}
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue