aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-12-01 21:37:33 +0100
committerMario Vavti <mario@mariovavti.com>2018-12-01 21:37:33 +0100
commitdf843523850237b0be1eadee99b01b20685917f4 (patch)
treedb2620159fbeedab9c1c5c5dfbd553d4c5401c3a /include
parentcded6b11366e15d6d4ac3eb6d9f86f4d0a60fa7c (diff)
downloadvolse-hubzilla-df843523850237b0be1eadee99b01b20685917f4.tar.gz
volse-hubzilla-df843523850237b0be1eadee99b01b20685917f4.tar.bz2
volse-hubzilla-df843523850237b0be1eadee99b01b20685917f4.zip
make pdf preview 100% width and 300px height to match it openstreetmaps preview
Diffstat (limited to 'include')
-rwxr-xr-xinclude/oembed.php6
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'
+ ];
}