Chat post images
This commit is contained in:
@@ -1,6 +1,23 @@
|
||||
var days = ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"];
|
||||
var months = ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"]
|
||||
|
||||
function fancyText(text) {
|
||||
|
||||
// Add images and gifs.
|
||||
var regex = /(https:\/\/.[^ ]*\.(?:png|jpg|jpeg|gif))/ig;
|
||||
text = text.replace(regex, function(img) {
|
||||
return "<img src='" + img + "' />";
|
||||
});
|
||||
|
||||
// Add links.
|
||||
// regex = /(https:\/\/.[^ ]*\.(?:net|com|nl))/ig;
|
||||
// text = text.replace(regex, function(link) {
|
||||
// return "<a href='" + link + "'>LINK</a>";
|
||||
// });
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
function getCookie(key) {
|
||||
cookies = document.cookie.split("; ");
|
||||
for (var i in cookies) {
|
||||
|
||||
Reference in New Issue
Block a user