This file contains 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
<script> | |
var iframely = window.iframely = window.iframely || {}; | |
var widgets = iframely.widgets = iframely.widgets || {}; | |
function iframelyLoaded() { | |
iframely.events.on('heightChanged', function(iframe, oldHeight, newHeight) { | |
// your handler here, like | |
// adjustScroll(newHeight - oldHeight); | |
// iframe is a dom element, heights are numbers |
This file contains 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
function exec_body_scripts(body_el) { | |
function nodeName(elem, name) { | |
return elem.nodeName && elem.nodeName.toUpperCase() === | |
name.toUpperCase(); | |
} | |
function evalScript(elem) { | |
var data = (elem.text || elem.textContent || elem.innerHTML || "" ), | |
script = document.createElement("script"); |
This file contains 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
// Include Iframely embed.js in your page using preferred method. E.g.: | |
// <script src="//cdn.iframe.ly/embed.js?api_key=[your key here]"></script> | |
// Add following methods to your component. | |
componentDidMount: function() { | |
// Builds widget after embed code rendered. | |
window.iframely && iframely.load(); | |
}, |
This file contains 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
<script type="text/javascript"> | |
function loadIframelyEmbedJs() { | |
// Replace 'iframe.ly' with your custom CDN if available. | |
if (document.querySelectorAll("[data-iframely-url]").length === 0 | |
&& document.querySelectorAll("iframe[src*='iframe.ly']").length === 0) return; | |
var iframely = window.iframely = window.iframely || {}; | |
if (iframely.load) { | |
iframely.load(); | |
} else { | |
var ifs = document.createElement('script'); ifs.type = 'text/javascript'; ifs.async = true; |
This file contains 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
<script type="text/javascript"> | |
function loadIframelyEmbedJs() { | |
var iframely = window.iframely = window.iframely || {}; | |
var widgets = iframely.widgets = iframely.widgets || {}; | |
if (widgets.load) { | |
widgets.load(); | |
} else { | |
var ifs = document.createElement('script'); ifs.type = 'text/javascript'; ifs.async = true; | |
ifs.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + '//cdn.iframe.ly/embed.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ifs, s); |
This file contains 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
<style> | |
.centering-fullwidth { | |
width: 100%; | |
} | |
.constraint-container { | |
width: 500px; | |
margin: auto; | |
} | |
</style> |
This file contains 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
<style> | |
.centering-fullwidth { | |
width: 100%; | |
-webkit-justify-content: center; | |
-ms-flex-pack: center; | |
justify-content: center; | |
display: -webkit-flex; | |
display: -ms-flexbox; | |
display: flex; | |
} |
This file contains 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
// This function implements anonymous creation logic. | |
function loadOrCreateAnonymousProfile(req, res, next) { | |
var sess = req.session, | |
auth = sess && sess.auth; | |
if (!auth || !auth.userId) { | |
dbCounter('anonymousUsers', function(err, counter) { | |
if (err) { | |
console.log('Error getting anonymous users counter', err); | |
next(); |
NewerOlder