mirror of
https://github.com/wassname/jupyter_contrib_nbextensions.git
synced 2026-07-30 12:10:38 +08:00
Only execute python when notebook is trusted
This commit is contained in:
@@ -34,8 +34,7 @@ define([
|
||||
var execute_python = function(cell,text) {
|
||||
/* never execute code in untrusted notebooks */
|
||||
if (IPython.notebook.trusted === false ) {
|
||||
console.log("Trust check:", IPython.notebook.trusted);
|
||||
// return text
|
||||
return text
|
||||
}
|
||||
/* always clear stored variables if notebook is dirty */
|
||||
if (IPython.notebook.dirty === true ) delete cell.metadata.variables;
|
||||
|
||||
Reference in New Issue
Block a user