Changed profile buttons

This commit is contained in:
Lars van Hijfte
2017-01-30 12:44:15 +01:00
parent 877637fcc9
commit c8450f3cb3
5 changed files with 38 additions and 36 deletions

View File

@@ -23,14 +23,14 @@ function placeFriendButtons() {
icon1 = "fa-handshake-o";
break;
case "1":
value1 = "delete";
class1 = "red";
text1 = "Verwijder";
icon1 = "fa-times";
value2 = userID;
class2 = "green";
text2 = "Chat";
icon2 = "fa-comment-o";
value1 = userID;
class1 = "green";
text1 = "Chat";
icon1 = "fa-comment-o";
value2 = "delete";
class2 = "red";
text2 = "Verwijder";
icon2 = "fa-times";
break;
case "2":
value1 = "delete";
@@ -39,14 +39,14 @@ function placeFriendButtons() {
icon1 = "fa-cross";
break;
case "3":
value1 = "delete";
class1 = "red";
text1 = "Weiger";
icon1 = "fa-times";
value2 = "accept";
class2 = "green";
text2 = "Accepteer";
icon2 = "fa-check";
value1 = "accept";
class1 = "green";
text1 = "Accepteer";
icon1 = "fa-check";
value2 = "delete";
class2 = "red";
text2 = "Weiger";
icon2 = "fa-times";
break;
default:
console.log(friendshipStatus);

View File

@@ -5,14 +5,14 @@ function fancyText(text) {
// Add images and gifs.
var regex = /(https?:\/\/.[^ ]*)/ig;
text = text.replace(regex, function(link) {
if (link.match(/(https:\/\/.[^ ]*\.(?:png|jpg|jpeg|gif))/ig)) {
if (link.match(/(https?:\/\/.[^ ]*\.(?:png|jpg|jpeg|gif))/ig)) {
return "<img alt='" + link + "' src='" + link + "' />";
} else if (link.match(/(https:\/\/.[^ ]*\.(?:mp4))/ig)) {
} else if (link.match(/(https?:\/\/.[^ ]*\.(?:mp4))/ig)) {
return "<video width='100%'>" +
"<source src='"+ link +"' type='video/mp4'>" +
"<b>Je browser ondersteund geen video</b>" +
"</video><button onclick='$(this).prev().get(0).play();'>Speel af</button>";
} else if (link.match(/(https:\/\/.[^ ]*\.(?:ogg))/ig)) {
} else if (link.match(/(https?:\/\/.[^ ]*\.(?:ogg))/ig)) {
return "<video width='100%'>" +
"<source src='"+ link +"' type='video/ogg'>" +
"<b>Je browser ondersteund geen video</b>" +