Skip to content

Commit

Permalink
v3.0.6
Browse files Browse the repository at this point in the history
Another fix for plugin.search.js. The path GET param should not have a trailing slash.
  • Loading branch information
rchrd2 committed Mar 9, 2018
1 parent 216ada4 commit 07851f3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BookReader/BookReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function BookReader(options) {
this.setup(options);
}

BookReader.version = "3.0.5";
BookReader.version = "3.0.6";

// Mode constants
BookReader.constMode1up = 1;
Expand Down
5 changes: 3 additions & 2 deletions BookReader/plugins/plugin.search.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ BookReader.prototype.search = function(term, options) {

// Remove subPrefix from end of path
var path = this.bookPath;
if (this.bookPath.length - this.bookPath.lastIndexOf(this.subPrefix) == this.subPrefix.length) {
path = this.bookPath.substr(0, this.bookPath.length - this.subPrefix.length);
var subPrefixWithSlash = '/' + this.subPrefix;
if (this.bookPath.length - this.bookPath.lastIndexOf(subPrefixWithSlash) == subPrefixWithSlash.length) {
path = this.bookPath.substr(0, this.bookPath.length - subPrefixWithSlash.length);
}

var urlParams = {
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 3.0.6
- Another fix for plugin.search.js. The path GET param should not have a trailing slash.

# 3.0.5
- Hotfix for plugin.search.js. Fixes issue where search results were not rendered on page flip.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bookreader",
"version": "3.0.5",
"version": "3.0.6",
"description": "The Internet Archive BookReader.",
"repository": {
"type": "git",
Expand Down

0 comments on commit 07851f3

Please sign in to comment.