react-oembed-container
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -15,2 +15,5 @@ 'use strict'; | ||
* a predictable manner. | ||
* | ||
* The keys of this object are substrings that will be matched against | ||
* any detected script tag URLs. | ||
*/ | ||
@@ -41,2 +44,18 @@ var embeds = { | ||
} | ||
}, | ||
'instagram.com': { | ||
isLoaded: function isLoaded() { | ||
return window.instgrm !== undefined; | ||
}, | ||
reload: function reload() { | ||
return window.instgrm.Embeds.process(); | ||
} | ||
}, | ||
'twitter.com': { | ||
isLoaded: function isLoaded() { | ||
return window.twttr !== undefined; | ||
}, | ||
reload: function reload() { | ||
return window.twttr.widgets.load(); | ||
} | ||
} | ||
@@ -43,0 +62,0 @@ }; |
{ | ||
"name": "react-oembed-container", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "React container for locating and injecting oembed scripts in string content.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -7,2 +7,5 @@ /** | ||
* a predictable manner. | ||
* | ||
* The keys of this object are substrings that will be matched against | ||
* any detected script tag URLs. | ||
*/ | ||
@@ -29,2 +32,10 @@ const embeds = { | ||
}, | ||
'instagram.com': { | ||
isLoaded: () => window.instgrm !== undefined, | ||
reload: () => window.instgrm.Embeds.process(), | ||
}, | ||
'twitter.com': { | ||
isLoaded: () => window.twttr !== undefined, | ||
reload: () => window.twttr.widgets.load(), | ||
}, | ||
}; | ||
@@ -31,0 +42,0 @@ |
56920
825