af_redditimgur: gifv: fix iframe not being wide enough, fix indenting
This commit is contained in:
parent
c68013b132
commit
299aeb3094
1 changed files with 41 additions and 40 deletions
|
@ -49,6 +49,7 @@ class Af_RedditImgur extends Plugin {
|
|||
if (strpos($aentry->getAttribute("property"), "og:image:width") !== FALSE) {
|
||||
$width = $aentry->getAttribute("content");
|
||||
}
|
||||
|
||||
if (strpos($aentry->getAttribute("property"), "og:image:height") !== FALSE) {
|
||||
$height = $aentry->getAttribute("content");
|
||||
}
|
||||
|
@ -61,8 +62,8 @@ class Af_RedditImgur extends Plugin {
|
|||
$iframe = $doc->createElement('iframe');
|
||||
$iframe->setAttribute("src", str_replace("http:", "", $entry->getAttribute("href")));
|
||||
$iframe->setAttribute("frameborder", "0");
|
||||
$iframe->setAttribute("width", $width);
|
||||
$iframe->setAttribute("height", $height);
|
||||
$iframe->setAttribute("width", $width + 64);
|
||||
$iframe->setAttribute("height", $height + 64);
|
||||
|
||||
$br = $doc->createElement('br');
|
||||
$entry->parentNode->insertBefore($iframe, $entry);
|
||||
|
|
Loading…
Reference in a new issue