gitbook-plugin-lightbox
Advanced tools
Comparing version 1.0.5 to 1.0.6
"use strict"; | ||
var _jquery = _interopRequireDefault(require("jquery")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var randomstring = require("randomstring"); | ||
@@ -29,8 +25,8 @@ | ||
page: function page(_page) { | ||
var content = (0, _jquery.default)(_page.content); | ||
content.find('img').each(function (index, img) { | ||
var target = (0, _jquery.default)(img); | ||
var $ = cheerio.load(_page.content); | ||
$('img').each(function (index, img) { | ||
var target = $(img); | ||
target.replaceWith(generateLightBoxHTML(target.attr('src'), target.attr('alt'))); | ||
}); | ||
_page.content = content.html(); | ||
_page.content = $.html(); | ||
return _page; | ||
@@ -37,0 +33,0 @@ } |
{ | ||
"name": "gitbook-plugin-lightbox", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": " A gitbook plugin to show image by lightbox.", | ||
@@ -19,4 +19,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"jquery": "^3.3.1", | ||
"lightbox2": "~2.10.0", | ||
"cheerio": "^1.0.0-rc.2", | ||
"randomstring": "~1.1.5" | ||
@@ -34,3 +33,5 @@ }, | ||
"eslint-plugin-promise": "^4.0.1", | ||
"eslint-plugin-standard": "^4.0.0" | ||
"eslint-plugin-standard": "^4.0.0", | ||
"jquery": "^3.3.1", | ||
"lightbox2": "~2.10.0" | ||
}, | ||
@@ -37,0 +38,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
103082
12
414
+ Addedcheerio@^1.0.0-rc.2
+ Addedboolbase@1.0.0(transitive)
+ Addedcheerio@1.0.0(transitive)
+ Addedcheerio-select@2.1.0(transitive)
+ Addedcss-select@5.1.0(transitive)
+ Addedcss-what@6.1.0(transitive)
+ Addeddom-serializer@2.0.0(transitive)
+ Addeddomelementtype@2.3.0(transitive)
+ Addeddomhandler@5.0.3(transitive)
+ Addeddomutils@3.1.0(transitive)
+ Addedencoding-sniffer@0.2.0(transitive)
+ Addedentities@4.5.0(transitive)
+ Addedhtmlparser2@9.1.0(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addednth-check@2.1.1(transitive)
+ Addedparse5@7.2.1(transitive)
+ Addedparse5-htmlparser2-tree-adapter@7.1.0(transitive)
+ Addedparse5-parser-stream@7.1.2(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedundici@6.21.0(transitive)
+ Addedwhatwg-encoding@3.1.1(transitive)
+ Addedwhatwg-mimetype@4.0.0(transitive)
- Removedjquery@^3.3.1
- Removedlightbox2@~2.10.0
- Removedjquery@3.7.1(transitive)
- Removedlightbox2@2.10.0(transitive)