This commit is contained in:
Aevann1 2021-07-21 13:13:59 +02:00
parent 46d310e775
commit 2ca54d9d37
2 changed files with 9 additions and 20 deletions

View file

@ -722,6 +722,15 @@ $(document).ready(function() {
});
});
$(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');
});
});
// Text Formatting
// Bold Text

View file

@ -3,26 +3,6 @@
<head>
<script>
//yt embed
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';
}
}
var myUrl = $('#embedURL').text();
myId = getId(myUrl);
$('#ytEmbed').html('<iframe width="100%" height="475" src="//www.youtube.com/embed/' + myId + '" frameborder="0" allowfullscreen></iframe>');
// Expand Images on Desktop
function expandDesktopImage(image, link) {