1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

[Click2Flash] Fix playing YouTube videos with Qt5

Closes #1283
This commit is contained in:
David Rosca 2014-04-09 22:52:41 +02:00
parent 646f9a2013
commit e4512ae14f

View File

@ -233,24 +233,23 @@ void ClickToFlash::load()
qz_c2f_substituteElement.width = this.width;
qz_c2f_substituteElement.height = this.height;
qz_c2f_substituteElement.type = "application/futuresplash";
this.parentNode.replaceChild(qz_c2f_substituteElement, this);
setTimeout(function(){
qz_c2f_parentNode.replaceChild(qz_c2f_clone, qz_c2f_substituteElement);
}, 250);
*/
acceptedUrl = m_url;
acceptedArgNames = m_argumentNames;
acceptedArgValues = m_argumentValues;
m_element.setAttribute("type", "application/futuresplash");
QString js = "var qz_c2f_clone=this.cloneNode(true);var qz_c2f_parentNode=this.parentNode;"
"var qz_c2f_substituteElement=document.createElement(this.tagName);"
"qz_c2f_substituteElement.width=this.width;qz_c2f_substituteElement.height=this.height;"
"qz_c2f_substituteElement.type=\"application/futuresplash\";"
"this.parentNode.replaceChild(qz_c2f_substituteElement,this);setTimeout(function(){"
"qz_c2f_parentNode.replaceChild(qz_c2f_clone,qz_c2f_substituteElement);},250);";