remotes/1693045480750635534/spooky-22
Aevann1 2021-07-21 13:05:52 +02:00
parent 5fce6c4f6a
commit 8c23383bc1
2 changed files with 22 additions and 13 deletions

View File

@ -3,24 +3,24 @@
<head>
<script>
//yt embed
//yt embed
function getId(url) {
var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;
var match = url.match(regExp);
function getId(url) {
var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;
var match = url.match(regExp);
if (match && match[2].length == 11) {
return match[2];
} else {
return 'error';
}
}
if (match && match[2].length == 11) {
return match[2];
} else {
return 'error';
}
}
var myUrl = $('#embedURL').text();
var myUrl = $('#embedURL').text();
myId = getId(myUrl);
myId = getId(myUrl);
$('#ytEmbed').html('<iframe width="100%" height="475" src="//www.youtube.com/embed/' + myId + '" frameborder="0" allowfullscreen></iframe>');
$('#ytEmbed').html('<iframe width="100%" height="475" src="//www.youtube.com/embed/' + myId + '" frameborder="0" allowfullscreen></iframe>');
// Expand Images on Desktop

View File

@ -3,6 +3,15 @@
<head>
<script>
$(document).ready(function() {
$('#submitform').submit(function() {
// disable button
$("#create_button").prop("disabled", true);
// add spinner to button
$("#create_button").html('<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Creating post');
});
});
//part of submit page js