Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jupyter.js

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jupyter.js - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

dist/.DS_Store

2

package.json
{
"name": "jupyter.js",
"version": "1.0.5",
"version": "1.0.6",
"description": "Enables live code blocks in markdown files",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -42,2 +42,3 @@

code,
els, i, il,
srcEl;

@@ -58,7 +59,8 @@ //console.log(cmd);

case 'init-editors':
document.querySelectorAll('pre > code').forEach(function(item, index) {
if (item.firstChild.innerHTML !== '/* jupyter:active */') return;
els = document.querySelectorAll('pre > code');
for (i=0, il=els.length; i<il; i++) {
if (els[i].firstChild.innerHTML !== '/* jupyter:active */') return;
var _cm = cm,
language = item.className.split('-')[1],
code = item.textContent.split('\n').slice(1),
language = els[i].className.split('-')[1],
code = els[i].textContent.split('\n').slice(1),
cmOptions = {

@@ -75,8 +77,8 @@ mode: _cm.types[language],

code.unshift(code.pop());
item.setAttribute('data-editor_index', index);
item.classList.add('active');
item.innerHTML = '<textarea>'+ code.join('\n') +'</textarea>'+
els[i].setAttribute('data-editor_index', i);
els[i].classList.add('active');
els[i].innerHTML = '<textarea>'+ code.join('\n') +'</textarea>'+
'<div data-cmd="active-play-toggle"></div>'+
'<sidebar><div class="rows"></div></sidebar>';
textarea = item.querySelector('textarea');
textarea = els[i].querySelector('textarea');
editor = CodeMirror.fromTextArea(textarea, cmOptions);

@@ -95,7 +97,7 @@ /*

*/
_cm.editors[index] = editor;
_cm.editors[i] = editor;
//if (index === 1) jupyter.sandbox(editor);
//console.log(index, editor.getValue());
});
}
break;

@@ -102,0 +104,0 @@ case 'explore-arguments':

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc