From 14d9bbaeff4acf9d039c1a0937a6df77218dda0a Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Tue, 6 Aug 2013 22:13:13 -0700 Subject: [PATCH] We're allowed to be funny. --- builds/4chan-X.user.js | 18 ++++++------------ builds/crx/script.js | 18 ++++++------------ src/Linkification/Linkify.coffee | 3 +-- 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index b9b1f506a..feb77829d 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -4327,6 +4327,12 @@ 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({ @@ -4661,12 +4667,6 @@ 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(_arg) { - var title; - - title = _arg.title; - return title; } } }, @@ -4710,12 +4710,6 @@ title: { api: function(uid) { return "https://vimeo.com/api/oembed.json?url=http://vimeo.com/" + uid; - }, - text: function(_arg) { - var title; - - title = _arg.title; - return title; } } }, diff --git a/builds/crx/script.js b/builds/crx/script.js index bdff208f6..aa7abc0da 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -4332,6 +4332,12 @@ 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({ @@ -4666,12 +4672,6 @@ 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(_arg) { - var title; - - title = _arg.title; - return title; } } }, @@ -4715,12 +4715,6 @@ title: { api: function(uid) { return "https://vimeo.com/api/oembed.json?url=http://vimeo.com/" + uid; - }, - text: function(_arg) { - var title; - - title = _arg.title; - return title; } } }, diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index 1ede82f6b..b18037368 100644 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -26,6 +26,7 @@ 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 @@ -300,7 +301,6 @@ 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}) -> title TwitchTV: regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/ @@ -341,7 +341,6 @@ 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}) -> title Vine: regExp: /.*(?:vine.co\/)([^#\&\?]*).*/