Skip to content

Instantly share code, notes, and snippets.

@wrr
Created March 23, 2022 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wrr/7c8c2a4b0b0a891f194710d07e90dc0b to your computer and use it in GitHub Desktop.
Save wrr/7c8c2a4b0b0a891f194710d07e90dc0b to your computer and use it in GitHub Desktop.
Open external URL when Shapespark view menu item is clicked
<script>
(function() {
var viewer = WALK.getViewer();
viewer.onViewSwitchStarted(function(viewName) {
if (viewName === 'PUT-THE-NAME-OF-YOUR-VIEW-MENU-ITEM-HERE') {
viewer.openUrl('https://example.com', false);
}
});
}());
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment