Skip to content

Instantly share code, notes, and snippets.

@wrr
Created November 7, 2019 19:33
Show Gist options
  • Save wrr/a750cb19b557223f8ebd51a8a3948d92 to your computer and use it in GitHub Desktop.
Save wrr/a750cb19b557223f8ebd51a8a3948d92 to your computer and use it in GitHub Desktop.
Add custom Shapespark menu button
<script>
var viewer = WALK.getViewer();
var button = viewer.addMenuButton(
'https://cdnjs.cloudflare.com/ajax/libs/webicons/2.0.0/webicons/webicon-facebook.png');
button.addEventListener('click', function() {
viewer.openUrl(
'https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdemo.shapespark.com%2Fsofa-facebook-share', true)
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment