diff --git a/tests/playgrounds/advanced_playground.html b/tests/playgrounds/advanced_playground.html index 515ff557f..1fcbbd812 100644 --- a/tests/playgrounds/advanced_playground.html +++ b/tests/playgrounds/advanced_playground.html @@ -26,7 +26,6 @@ function createWorkspace(blocklyDiv, options) { var workspace = Blockly.inject(blocklyDiv, options); - workspace.configureContextMenu = configureContextMenu.bind(workspace); return workspace; } @@ -101,6 +100,8 @@ }, }; + Blockly.ContextMenuItems.registerCommentOptions(); + createPlayground( document.getElementById('root'), createWorkspace, @@ -125,23 +126,6 @@ document.body.style.backgroundColor = '#d6d6ff'; // Familliar lilac. } } - - function configureContextMenu(menuOptions, e) { - var workspace = this; - var screenshotOption = { - text: 'Download Screenshot', - enabled: workspace.getTopBlocks().length, - callback: function () { - downloadScreenshot(workspace); - }, - }; - menuOptions.push(screenshotOption); - - // Adds a default-sized workspace comment to the workspace. - menuOptions.push( - Blockly.ContextMenu.workspaceCommentOption(workspace, e), - ); - } start();