mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 13:30:33 +02:00
Add files via upload
This commit is contained in:
parent
15e9d08bff
commit
8ad8457ebe
1 changed files with 483 additions and 437 deletions
|
@ -53,6 +53,39 @@
|
|||
var $ChatInputText; // The text field for entering text.
|
||||
var userName;
|
||||
|
||||
// Note soundcloud and vimeo integration is disabled since we cannot support mp4/mp3 encoding at this time
|
||||
|
||||
// Soundcloud oembed jQuery api modified for embdeding by class name
|
||||
/*
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
(function ($) {
|
||||
$.fn.scembed = function(){
|
||||
var datasource = 'https://soundcloud.com/oembed';
|
||||
return this.each(function () {
|
||||
var container = $(this);
|
||||
var mediasource = $(container).attr("sc_url");
|
||||
var params = 'url=' + mediasource + '&format=json&iframe=true&maxwidth=480&maxheight=120&auto_play=false&show_comments=false';
|
||||
$.ajaxopts = $.extend($.ajaxopts, {
|
||||
url: datasource,
|
||||
data: params,
|
||||
dataType: 'json',
|
||||
success: function (data, status, raw) {
|
||||
$(container).html(data.html);
|
||||
},
|
||||
error: function (data, e1, e2) {
|
||||
$(container).html("Can't retrieve player for " + mediasource);
|
||||
},
|
||||
});
|
||||
$.ajax($.ajaxopts);
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
$(function(){
|
||||
$("div.sc-embed").scembed();
|
||||
});
|
||||
});
|
||||
*/
|
||||
//Start George Function
|
||||
//Function provided by George Deac
|
||||
//linky function
|
||||
|
@ -150,12 +183,25 @@
|
|||
case protocol === "hifi":
|
||||
elContent = elContent.replace(this, "<br/><a href=\"javascript:gotoHiFi('" + this + "');\">" + this + "</a>");
|
||||
break;
|
||||
case !!this.match(/^(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?(?=.*v=((\w|-){11}))(?:\S+)?$/):
|
||||
case !!this.match(/(https?:\/\/)?(www\.)?(youtube\.com\/watch\?v=|youtu\.be\/)([^& \n<]+)(?:[^ \n<]+)?/g):
|
||||
var youtubeMatch = this.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);
|
||||
if (youtubeMatch && youtubeMatch[2].length == 11 && this.match(/^(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?(?=.*v=((\w|-){11}))(?:\S+)?$/)) {
|
||||
if (youtubeMatch && youtubeMatch[2].length == 11) {
|
||||
elContent = "<br/><iframe class=\"z-depth-2\" width='420' height='236' src='https://www.youtube.com/embed/" + youtubeMatch[2] + "' frameborder='0'></iframe><br/><a href=\"javascript:gotoURL('" + this + "');\">" + this + "</a>";
|
||||
break;
|
||||
}
|
||||
//case !!this.match(/(https?:\/\/)?(www\.)?(vimeo\.com)/):
|
||||
// var vimeoMatch = this.match(/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/);
|
||||
// if(vimeoMatch && vimeoMatch[5]){
|
||||
// elContent = "<br/><iframe title=\"vimeo-player\" src='https://player.vimeo.com/video/"+ vimeoMatch[5] + "' width='420' height='236' frameborder='0' allowfullscreen></iframe><br/><a href=\"javascript:gotoURL('" + this + "');\">" + this + "</a>";
|
||||
// break;
|
||||
// }
|
||||
//case !!this.match(/(https?:\/\/)?(www\.)?(snd\.sc|soundcloud\.com)/):
|
||||
// sndscMatch = matches.match(/^.*(https?:\/\/)?(www\.)?(snd\.sc|soundcloud\.com)([^#\&\?]*).*/);
|
||||
// if(sndscMatch && sndscMatch[4]){
|
||||
// elContent = "<br/><div class='sc-embed' sc_url='https://soundcloud.com"+ sndscMatch[4] + "'></div><br/><a href=\"javascript:gotoURL('" + this + "');\">" + this + "</a>";
|
||||
// break;
|
||||
// }
|
||||
|
||||
// else fall through to default
|
||||
default:
|
||||
elContent = elContent.replace(this, "<br/><a href=\"javascript:gotoURL('" + this + "');\">" + this + "</a>");
|
||||
|
|
Loading…
Reference in a new issue