New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

epubjs

Package Overview
Dependencies
Maintainers
2
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

epubjs - npm Package Compare versions

Comparing version 0.3.15 to 0.3.16

10

lib/contents.js

@@ -683,2 +683,12 @@ "use strict";

}, {
key: "cfiFromRange",
value: function cfiFromRange(range, ignoreClass) {
return new _epubcfi2.default(range, this.cfiBase, ignoreClass).toString();
}
}, {
key: "cfiFromNode",
value: function cfiFromNode(node, ignoreClass) {
return new _epubcfi2.default(node, this.cfiBase, ignoreClass).toString();
}
}, {
key: "map",

@@ -685,0 +695,0 @@ value: function map(layout) {

16

lib/rendition.js

@@ -78,3 +78,4 @@ "use strict";

minSpreadWidth: 800,
stylesheet: null
stylesheet: null,
script: null
});

@@ -120,2 +121,6 @@

if (this.settings.script) {
this.book.spine.hooks.content.register(this.injectScript.bind(this));
}
// this.hooks.display.register(this.afterDisplay.bind(this));

@@ -742,2 +747,11 @@ this.themes = new _themes2.default(this);

}
}, {
key: "injectScript",
value: function injectScript(doc, section) {
var script = doc.createElement("script");
script.setAttribute("type", "text/javascript");
script.setAttribute("src", this.settings.script);
script.textContent = " "; // Needed to prevent self closing tag
doc.getElementsByTagName("head")[0].appendChild(script);
}
}]);

@@ -744,0 +758,0 @@

2

package.json
{
"name": "epubjs",
"version": "0.3.15",
"version": "0.3.16",
"description": "Parse and Render Epubs",

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

@@ -636,2 +636,10 @@ import EventEmitter from "event-emitter";

cfiFromRange(range, ignoreClass){
return new EpubCFI(range, this.cfiBase, ignoreClass).toString();
}
cfiFromNode(node, ignoreClass){
return new EpubCFI(node, this.cfiBase, ignoreClass).toString();
}
map(layout){

@@ -638,0 +646,0 @@ var map = new Mapping(layout);

@@ -39,3 +39,4 @@ import EventEmitter from "event-emitter";

minSpreadWidth: 800,
stylesheet: null
stylesheet: null,
script: null
});

@@ -81,2 +82,6 @@

if (this.settings.script) {
this.book.spine.hooks.content.register(this.injectScript.bind(this));
}
// this.hooks.display.register(this.afterDisplay.bind(this));

@@ -641,2 +646,11 @@ this.themes = new Themes(this);

}
injectScript(doc, section) {
let script = doc.createElement("script");
script.setAttribute("type", "text/javascript");
script.setAttribute("src", this.settings.script);
script.textContent = " "; // Needed to prevent self closing tag
doc.getElementsByTagName("head")[0].appendChild(script);
}
}

@@ -643,0 +657,0 @@

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

Sorry, the diff of this file is not supported yet

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

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