diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-12-01 20:37:33 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-12-02 10:18:37 +0100 |
commit | defa2d9df191131ae62c80dc2b951d373c29007f (patch) | |
tree | c3eecc98b7aa974d9eca952ad5adb69c11e4e4d0 | |
parent | 05c422ef233ace1e827a7b5a82b466581e45c89c (diff) | |
download | volse-hubzilla-defa2d9df191131ae62c80dc2b951d373c29007f.tar.gz volse-hubzilla-defa2d9df191131ae62c80dc2b951d373c29007f.tar.bz2 volse-hubzilla-defa2d9df191131ae62c80dc2b951d373c29007f.zip |
make pdf preview 100% width and 300px height to match it openstreetmaps preview
(cherry picked from commit df843523850237b0be1eadee99b01b20685917f4)
-rwxr-xr-x | include/oembed.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/oembed.php b/include/oembed.php index e5557dc11..426197c5f 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -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' + ]; } |