From cd533799ea05648b6e6b8ab60f5752ca7fbf7a5a Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Fri, 24 May 2013 23:59:39 -0700 Subject: [PATCH] Add WM Mode for YouTube videos, #85 http://stackoverflow.com/questions/886864/differences-between-using-wmode-transparent-opaque-or-window-for-an-embe --- builds/4chan-X.js | 2 +- builds/4chan-X.user.js | 2 +- builds/crx/script.js | 2 +- src/Linkification/Linkify.coffee | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builds/4chan-X.js b/builds/4chan-X.js index 0533ed65c..7be0cdedc 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -4418,7 +4418,7 @@ regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/, el: function() { return $.el('iframe', { - src: "//www.youtube.com/embed/" + this.name + (this.option ? '#' + this.option : '') + src: "//www.youtube.com/embed/" + this.name + (this.option ? '#' + this.option : '') + "?wmode=opaque" }); }, title: { diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index c892b8fb0..1e2c35e3f 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -4402,7 +4402,7 @@ regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/, el: function() { return $.el('iframe', { - src: "//www.youtube.com/embed/" + this.name + (this.option ? '#' + this.option : '') + src: "//www.youtube.com/embed/" + this.name + (this.option ? '#' + this.option : '') + "?wmode=opaque" }); }, title: { diff --git a/builds/crx/script.js b/builds/crx/script.js index b7fc37ff6..e35fcfc2f 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -4404,7 +4404,7 @@ regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/, el: function() { return $.el('iframe', { - src: "//www.youtube.com/embed/" + this.name + (this.option ? '#' + this.option : '') + src: "//www.youtube.com/embed/" + this.name + (this.option ? '#' + this.option : '') + "?wmode=opaque" }); }, title: { diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index 8862fd11d..411239dbd 100644 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -151,7 +151,7 @@ Linkify = regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/ el: -> $.el 'iframe', - src: "//www.youtube.com/embed/#{@name}#{if @option then '#' + @option else ''}" + src: "//www.youtube.com/embed/#{@name}#{if @option then '#' + @option else ''}?wmode=opaque" title: api: -> "https://gdata.youtube.com/feeds/api/videos/#{@name}?alt=json&fields=title/text(),yt:noembed,app:control/yt:state/@reasonCode" text: -> JSON.parse(@responseText).entry.title.$t