diff options
Diffstat (limited to 'plugins/LinkPreview/LinkPreviewPlugin.php')
-rw-r--r-- | plugins/LinkPreview/LinkPreviewPlugin.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/LinkPreview/LinkPreviewPlugin.php b/plugins/LinkPreview/LinkPreviewPlugin.php index d887ca040..6f7c99a38 100644 --- a/plugins/LinkPreview/LinkPreviewPlugin.php +++ b/plugins/LinkPreview/LinkPreviewPlugin.php @@ -52,6 +52,12 @@ class LinkPreviewPlugin extends Plugin $user = common_current_user(); if ($user) { $action->script('plugins/LinkPreview/linkpreview.js'); + $data = json_encode(array( + 'api' => common_config('oohembed', 'endpoint'), + 'width' => common_config('attachments', 'thumbwidth'), + 'height' => common_config('attachments', 'thumbheight'), + )); + $action->inlineScript('$(function() {SN.Init.LinkPreview && SN.Init.LinkPreview('.$data.');})'); } return true; } |