Run Snap in google sheets!

Open google sheets and click extensions. next click apps script and remove any code in it. paste the following code:

function showHTMLDialog() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var embedCode = sheet.getRange("A1").getValue();

var html = HtmlService.createHtmlOutput(embedCode)
.setTitle('SNAP PROJECT')
SpreadsheetApp.getUi().showModalDialog(html, 'SNAP PROJECT');

function onOpen() {
var ui = SpreadsheetApp.getUi();
var menu = ui.createMenu('Open Project')
.addItem('Run', 'showHTMLDialog')

save your code and reload your google sheet. now all you need to do is paste your embed link into cell A1 click the open project menu on the top and click run!

(after accepting permissions you need to run it again to work)

This is super weird. But this is brilliant :smiley:

Very cool. One more thing we can embed Snap! into. :~)