diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index feb77829d..159f0fbb0 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -4327,12 +4327,6 @@ ExpandComment.callbacks.push(this.node); } 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); } return Post.prototype.callbacks.push({ @@ -4667,6 +4661,9 @@ title: { api: function(uid) { return "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/" + uid; + }, + text: function(_) { + return _.title; } } }, @@ -4710,6 +4707,9 @@ title: { api: function(uid) { return "https://vimeo.com/api/oembed.json?url=http://vimeo.com/" + uid; + }, + text: function(_) { + return _.title; } } }, diff --git a/builds/crx/script.js b/builds/crx/script.js index aa7abc0da..d191b5e49 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -4332,12 +4332,6 @@ ExpandComment.callbacks.push(this.node); } 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); } return Post.prototype.callbacks.push({ @@ -4672,6 +4666,9 @@ title: { api: function(uid) { return "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/" + uid; + }, + text: function(_) { + return _.title; } } }, @@ -4715,6 +4712,9 @@ title: { api: function(uid) { return "https://vimeo.com/api/oembed.json?url=http://vimeo.com/" + uid; + }, + text: function(_) { + return _.title; } } }, diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index b18037368..b2151e945 100644 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -26,7 +26,6 @@ Linkify = ExpandComment.callbacks.push @node if Conf['Title Link'] - @types.Vimeo.api.text = @types.SoundCould.api.text = ({title}) -> title $.sync 'CachedTitles', Linkify.titleSync Post::callbacks.push @@ -301,6 +300,7 @@ Linkify = div title: api: (uid) -> "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/#{uid}" + text: (_) -> _.title TwitchTV: regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/ @@ -341,6 +341,7 @@ Linkify = src: "//player.vimeo.com/video/#{a.dataset.uid}?wmode=opaque" title: api: (uid) -> "https://vimeo.com/api/oembed.json?url=http://vimeo.com/#{uid}" + text: (_) -> _.title Vine: regExp: /.*(?:vine.co\/)([^#\&\?]*).*/