Skip to content

Commit

Permalink
Minor change social plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
piyushjindal committed Oct 16, 2023
1 parent da1eb55 commit 4d81438
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions blocks/embed/embed.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ main .embed .caption {

main .embed .social-plugin {
left: 0;
max-width:100%;
height:100%;
max-width: 100%;
height: 100%;
position: relative;
justify-content: left;
}
Expand Down
9 changes: 5 additions & 4 deletions blocks/embed/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@ const embedYoutube = (url, isLite) => {

/**
* Facebook, twitter social plugins embedding
* @param {*} url
* @param {*} urlParam
* @param {*} type
* @returns
*/
const embedSocialPlugins = (url, isLite, type) => {
const usp = new URLSearchParams(url.search);
let width = usp.get('width') || '360px';
const embedSocialPlugins = (urlParam, isLite, type) => {
const url = decodeURI(urlParam);
const usp = new URLSearchParams(url);
let width = usp.get('container_width') || usp.get('width') || '360px';
let height = usp.get('height') || usp.get('maxHeight') || '598px';

if (width.indexOf('px') === -1) {
Expand Down

0 comments on commit 4d81438

Please sign in to comment.