From 0e1b8c099cfd88c727951b4a2368c3cd6f936c97 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Mon, 16 Dec 2013 14:03:30 -0700 Subject: [PATCH] Forgot a return Also consistency. --- builds/4chan-X.user.js | 15 ++++++++------- builds/crx/script.js | 15 ++++++++------- src/Linkification/Linkify.coffee | 11 ++++++----- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index adb8608ce..33056dba4 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -5682,15 +5682,16 @@ LiveLeak: { regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/, el: function(a) { - var ret; + var el; - ret = $.el('iframe', { + el = $.el('iframe', { width: "640", height: "360", src: "http://www.liveleak.com/ll_embed?i=" + a.dataset.uid, frameborder: "0" }); - return ret.setAttribute("allowfullscreen", "true"); + el.setAttribute("allowfullscreen", "true"); + return el; } }, MediaCrush: { @@ -5850,13 +5851,13 @@ YouTube: { regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/, el: function(a) { - var ret; + var el; - ret = $.el('iframe', { + el = $.el('iframe', { src: "//www.youtube.com/embed/" + a.dataset.uid + (a.dataset.option ? '#' + a.dataset.option : '') + "?wmode=opaque" }); - ret.setAttribute("allowfullscreen", "true"); - return ret; + el.setAttribute("allowfullscreen", "true"); + return el; }, title: { api: function(uid) { diff --git a/builds/crx/script.js b/builds/crx/script.js index 9a495460c..2949e8dcc 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -5687,15 +5687,16 @@ LiveLeak: { regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/, el: function(a) { - var ret; + var el; - ret = $.el('iframe', { + el = $.el('iframe', { width: "640", height: "360", src: "http://www.liveleak.com/ll_embed?i=" + a.dataset.uid, frameborder: "0" }); - return ret.setAttribute("allowfullscreen", "true"); + el.setAttribute("allowfullscreen", "true"); + return el; } }, MediaCrush: { @@ -5855,13 +5856,13 @@ YouTube: { regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/, el: function(a) { - var ret; + var el; - ret = $.el('iframe', { + el = $.el('iframe', { src: "//www.youtube.com/embed/" + a.dataset.uid + (a.dataset.option ? '#' + a.dataset.option : '') + "?wmode=opaque" }); - ret.setAttribute("allowfullscreen", "true"); - return ret; + el.setAttribute("allowfullscreen", "true"); + return el; }, title: { api: function(uid) { diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index c128b161e..368654f77 100755 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -288,12 +288,13 @@ Linkify = LiveLeak: regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/ el: (a) -> - ret = $.el 'iframe', + el = $.el 'iframe', width: "640", height: "360", src: "http://www.liveleak.com/ll_embed?i=#{a.dataset.uid}", frameborder: "0" - ret.setAttribute "allowfullscreen", "true" + el.setAttribute "allowfullscreen", "true" + el MediaCrush: regExp: /.*(?:mediacru.sh\/)([0-9a-z_]+)/i @@ -408,10 +409,10 @@ Linkify = YouTube: regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/ el: (a) -> - ret = $.el 'iframe', + el = $.el 'iframe', src: "//www.youtube.com/embed/#{a.dataset.uid}#{if a.dataset.option then '#' + a.dataset.option else ''}?wmode=opaque" - ret.setAttribute "allowfullscreen", "true" - ret + el.setAttribute "allowfullscreen", "true" + el title: api: (uid) -> "https://gdata.youtube.com/feeds/api/videos/#{uid}?alt=json&fields=title/text(),yt:noembed,app:control/yt:state/@reasonCode" text: (data) -> data.entry.title.$t