[ Launch: bar chart ] f5636ea1caacf50bdcddca99710f3280 by joshuarule[ Launch: reddit base ] 6633418 by enjalot[ Launch: simple histogram ] 6631652 by enjalot
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
async getSkus(starting_after, result = []) { | |
const skus = await stripe.skus.list({starting_after: starting_after}); | |
result.push(skus) | |
if(skus.length === 100) { | |
return getSkus(skus[skus.length], result); | |
} | |
return result | |
} | |
let skus = getSkus(); |
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
import React, { Component, Fragment } from 'react'; | |
import ReactDOM from 'react-dom' | |
const modalRoot = document.getElementById('modal-root') | |
export default class Modal extends Component { | |
render() { | |
const {isVisible} = this.props | |
return ReactDOM.createPortal( | |
<Fragment> |
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
const gallery = { | |
type: { | |
"default": { | |
maxSlides: 10, // static | |
galleryTitle: string, // max 20 char | |
autoPlay: boolean, | |
slideDuration: number in seconds min 3 - 10, | |
slides: [ | |
{ | |
slideTitle: string, // optional |
[ Launch: reddit base ] f181cec949f90a5b8410376e9156deb0 by joshuarule[ Launch: reddit base ] 6633418 by enjalot[ Launch: simple histogram ] 6631652 by enjalot
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
body, | |
html { | |
height: 100%; | |
} | |
body { | |
display: flex; | |
flex-direction: column; | |
} |
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
facebookHelper.prototype.getMedia = function (post) { | |
console.log(post.type); | |
console.log(post.caption); | |
var imageUrl = post.type == "link" ? (post.picture ? this.cleanImageUrl(post.picture.match(/(url=)(.+)$/)[2]) : null) : (this.fbFeedUrl + "{objectId}/picture?type=normal&redirect=true&access_token={token}" | |
.replace("{objectId}", post.object_id) | |
.replace("{token}", this.accessToken)); | |
if (post.type == "link" || post.type == "photo" || post.type == "event") { | |
return imageUrl ? this.imgTemplate.replace(/{url}/g, imageUrl).replace(/{description}/g, post.description) : "" | |
+ (post.type == "link" ? | |
this.linkTemplate.replace(/{linkText}/g, post.name ? post.name : post.story).replace(/{href}/g, post.link) + (post.description ? this.descriptionTemplate.replace(/{description}/g, post.description) : '') |
-
Between the
<body>
tags, before<div data-montage-id="montageVersion"></div>
, add the following markup:<h1>Temperature Converter</h1> <div data-montage-id="tempConverter"></div>
The data-montage-id
custom data attribute is used to identify elements in the markup whose behavior you want to control. The objects that control these elements are located within the script block in the head
area of the HTML document.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="edit" contenteditable="true">test</div> | |
<button onclick="toogleSelectionText()">select/deselect</button> | |
<script id="jsbin-javascript"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="edit" contenteditable="true">test</div> | |
<button onclick="toogleSelectionText()">select/deselect</button> | |
<script id="jsbin-javascript"> |
NewerOlder