|
|
@ -201,7 +201,7 @@ var OS = OneeSama.prototype;
|
|
|
|
|
|
|
|
|
|
|
|
var break_re = new RegExp("(\\S{" + DEFINES.WORD_LENGTH_LIMIT + "})");
|
|
|
|
var break_re = new RegExp("(\\S{" + DEFINES.WORD_LENGTH_LIMIT + "})");
|
|
|
|
/* internal refs, embeds */
|
|
|
|
/* internal refs, embeds */
|
|
|
|
var ref_re = />>(\d+|>\/watch\?v=[\w-]{11}(?:#t=[\dhms]{1,9})?|>\/soundcloud\/[\w-]{1,40}\/[\w-]{1,80}|>\/@\w{1,15}\/\d{4,20}(?:\?s=\d+)?|>\/(?:a|sysint|nap)\/\d{0,10})/;
|
|
|
|
var ref_re = />>(\d+|>\/s\/(?:\w|\d)(?:\w|\d|\/)*|>\/watch\?v=[\w-]{11}(?:#t=[\dhms]{1,9})?|>\/soundcloud\/[\w-]{1,40}\/[\w-]{1,80}|>\/@\w{1,15}\/\d{4,20}(?:\?s=\d+)?|>\/(?:a|sysint|nap)\/\d{0,10})/;
|
|
|
|
|
|
|
|
|
|
|
|
OS.hook = function (name, func) {
|
|
|
|
OS.hook = function (name, func) {
|
|
|
|
var hs = this.hooks[name];
|
|
|
|
var hs = this.hooks[name];
|
|
|
@ -241,10 +241,14 @@ OS.red_string = function (ref) {
|
|
|
|
dest = 'https://www.youtube.com/' + ref.slice(2);
|
|
|
|
dest = 'https://www.youtube.com/' + ref.slice(2);
|
|
|
|
linkClass = 'embed watch';
|
|
|
|
linkClass = 'embed watch';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (prefix == '>/s') {
|
|
|
|
else if (prefix2 == '>/sou') {
|
|
|
|
dest = 'https://soundcloud.com/' + ref.slice(13);
|
|
|
|
dest = 'https://soundcloud.com/' + ref.slice(13);
|
|
|
|
linkClass = 'embed soundcloud';
|
|
|
|
linkClass = 'embed soundcloud';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (prefix == '>/s') {
|
|
|
|
|
|
|
|
dest ="/"+ ref.slice(2);
|
|
|
|
|
|
|
|
linkClass = 'embed'
|
|
|
|
|
|
|
|
}
|
|
|
|
else if (prefix == '>/@') {
|
|
|
|
else if (prefix == '>/@') {
|
|
|
|
var bits = ref.slice(3).split('/');
|
|
|
|
var bits = ref.slice(3).split('/');
|
|
|
|
dest = 'https://twitter.com/' + bits[0] + '/status/' + bits[1];
|
|
|
|
dest = 'https://twitter.com/' + bits[0] + '/status/' + bits[1];
|
|
|
|