aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorM. Dent <dentm42@gmail.com>2018-12-02 05:09:45 +0100
committerM. Dent <dentm42@gmail.com>2018-12-02 05:09:45 +0100
commit52424b0f9c14b6f1c58d963df0479332520be4ef (patch)
tree7373370ba79789c9ecac0e0041054443f6acebbc /include
parent132547a9d980b12dab4cc1fecc2d286ef9050723 (diff)
parentdf843523850237b0be1eadee99b01b20685917f4 (diff)
downloadvolse-hubzilla-52424b0f9c14b6f1c58d963df0479332520be4ef.tar.gz
volse-hubzilla-52424b0f9c14b6f1c58d963df0479332520be4ef.tar.bz2
volse-hubzilla-52424b0f9c14b6f1c58d963df0479332520be4ef.zip
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
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'
+ ];
}