Created
June 20, 2016 21:45
-
-
Save fahmi182/a66b4117fa24dc588006d2b0dcae7774 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if your markup = sample | |
// | |
// <div class="video-container"> | |
// <div class="embed"> | |
// <iframe width="1200" height="675" src="https://www.youtube.com/embed/qLJP3X2yOLk?feature=oembed" frameborder="0" allowfullscreen></iframe> | |
// </div> | |
// </div> | |
// | |
{ | |
"rules": [{ | |
"class": "SocialEmbedRule", | |
"selector": "//div[@class='video-container']|//div[@class='embed' and iframe]", | |
"properties": { | |
"socialembed.url": { | |
"type": "string", | |
"selector": "iframe", | |
"attribute": "src" | |
} | |
}, | |
"socialembed.height": { | |
"type": "int", | |
"selector": "iframe", | |
"attribute": "height" | |
}, | |
"socialembed.width": { | |
"type": "int", | |
"selector": "iframe", | |
"attribute": "width" | |
} | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment