We're allowed to be funny.

This commit is contained in:
Zixaphir 2013-08-06 22:13:13 -07:00
parent c325b9eeda
commit 14d9bbaeff
3 changed files with 13 additions and 26 deletions

View File

@ -4327,6 +4327,12 @@
ExpandComment.callbacks.push(this.node); ExpandComment.callbacks.push(this.node);
} }
if (Conf['Title Link']) { if (Conf['Title Link']) {
this.types.Vimeo.api.text = this.types.SoundCould.api.text = function(_arg) {
var title;
title = _arg.title;
return title;
};
$.sync('CachedTitles', Linkify.titleSync); $.sync('CachedTitles', Linkify.titleSync);
} }
return Post.prototype.callbacks.push({ return Post.prototype.callbacks.push({
@ -4661,12 +4667,6 @@
title: { title: {
api: function(uid) { api: function(uid) {
return "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/" + uid; return "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/" + uid;
},
text: function(_arg) {
var title;
title = _arg.title;
return title;
} }
} }
}, },
@ -4710,12 +4710,6 @@
title: { title: {
api: function(uid) { api: function(uid) {
return "https://vimeo.com/api/oembed.json?url=http://vimeo.com/" + uid; return "https://vimeo.com/api/oembed.json?url=http://vimeo.com/" + uid;
},
text: function(_arg) {
var title;
title = _arg.title;
return title;
} }
} }
}, },

View File

@ -4332,6 +4332,12 @@
ExpandComment.callbacks.push(this.node); ExpandComment.callbacks.push(this.node);
} }
if (Conf['Title Link']) { if (Conf['Title Link']) {
this.types.Vimeo.api.text = this.types.SoundCould.api.text = function(_arg) {
var title;
title = _arg.title;
return title;
};
$.sync('CachedTitles', Linkify.titleSync); $.sync('CachedTitles', Linkify.titleSync);
} }
return Post.prototype.callbacks.push({ return Post.prototype.callbacks.push({
@ -4666,12 +4672,6 @@
title: { title: {
api: function(uid) { api: function(uid) {
return "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/" + uid; return "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/" + uid;
},
text: function(_arg) {
var title;
title = _arg.title;
return title;
} }
} }
}, },
@ -4715,12 +4715,6 @@
title: { title: {
api: function(uid) { api: function(uid) {
return "https://vimeo.com/api/oembed.json?url=http://vimeo.com/" + uid; return "https://vimeo.com/api/oembed.json?url=http://vimeo.com/" + uid;
},
text: function(_arg) {
var title;
title = _arg.title;
return title;
} }
} }
}, },

View File

@ -26,6 +26,7 @@ Linkify =
ExpandComment.callbacks.push @node ExpandComment.callbacks.push @node
if Conf['Title Link'] if Conf['Title Link']
@types.Vimeo.api.text = @types.SoundCould.api.text = ({title}) -> title
$.sync 'CachedTitles', Linkify.titleSync $.sync 'CachedTitles', Linkify.titleSync
Post::callbacks.push Post::callbacks.push
@ -300,7 +301,6 @@ Linkify =
div div
title: title:
api: (uid) -> "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/#{uid}" api: (uid) -> "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/#{uid}"
text: ({title}) -> title
TwitchTV: TwitchTV:
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/ regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/
@ -341,7 +341,6 @@ Linkify =
src: "//player.vimeo.com/video/#{a.dataset.uid}?wmode=opaque" src: "//player.vimeo.com/video/#{a.dataset.uid}?wmode=opaque"
title: title:
api: (uid) -> "https://vimeo.com/api/oembed.json?url=http://vimeo.com/#{uid}" api: (uid) -> "https://vimeo.com/api/oembed.json?url=http://vimeo.com/#{uid}"
text: ({title}) -> title
Vine: Vine:
regExp: /.*(?:vine.co\/)([^#\&\?]*).*/ regExp: /.*(?:vine.co\/)([^#\&\?]*).*/