Merge branch 'pdf_embed_fixes' into 'dev'

make pdf preview 100% width and 300px height to match it openstreetmaps preview

See merge request hubzilla/core!1414
This commit is contained in:
M. Dent 2018-12-02 05:09:45 +01:00
commit 52424b0f9c

View File

@ -221,7 +221,11 @@ function oembed_fetch_url($embedurl){
if(strpos(strtolower($embedurl),'.pdf') !== false) {
$action = 'allow';
$j = [ 'html' => '<object data="' . $embedurl . '" type="application/pdf" width="500" height="720">' . '<a href="' . $embedurl . '">' . t('View PDF') . '</a></object>', 'width' => 500, 'height' => 720, 'type' => 'pdf' ];
$j = [
'html' => '<object data="' . $embedurl . '" type="application/pdf" style="width: 100%; height: 300px;"></object>',
'title' => t('View PDF'),
'type' => 'pdf'
];
}