Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit ff84447

Browse files
committed
confirm sharing
1 parent 79e26b9 commit ff84447

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

runestone/activecode/js/activecode.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ ActiveCode.prototype.createControls = function () {
306306
this.shareButt = butt;
307307
ctrlDiv.appendChild(butt);
308308
$(butt).click((function() {
309+
if (! confirm("You are about to share this code with ALL of your students. Are you sure you want to continue?")) {
310+
return;
311+
}
309312
let data = {
310313
divid: this.divid,
311314
code: this.editor.getValue(),
@@ -739,7 +742,7 @@ ActiveCode.prototype.showCodelens = function () {
739742
myVars.curInstr = 0;
740743
myVars.codeDivWidth = 350;
741744
myVars.codeDivHeight = 400;
742-
var srcURL = '//pythontutor.com/iframe-embed.html';
745+
var srcURL = 'https://pythontutor.com/iframe-embed.html';
743746
var embedUrlStr = $.param.fragment(srcURL, myVars, 2 /* clobber all */);
744747
var myIframe = document.createElement('iframe');
745748
myIframe.setAttribute("id", this.divid + '_codelens');

0 commit comments

Comments
 (0)