@internetarchive/bookreader 5.0.0-44-a1 → 5.0.0-44-a4
Sign up to get free protection for your applications and to get access to all the features.
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +10 -10
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReader/plugins/plugin.search.js +1 -1
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.url.js +1 -1
- package/BookReader/plugins/plugin.url.js.map +1 -1
- package/BookReaderDemo/IADemoBr.js +0 -8
- package/package.json +6 -6
- package/src/BookNavigator/downloads/downloads.js +7 -5
- package/src/BookNavigator/search/search-provider.js +1 -0
- package/src/BookNavigator/search/search-results.js +4 -0
- package/src/plugins/search/plugin.search.js +8 -0
- package/src/plugins/url/UrlPlugin.js +1 -0
@@ -217,6 +217,12 @@ BookReader.prototype.search = async function(term = '', overrides = {}) {
|
|
217
217
|
cache: true,
|
218
218
|
beforeSend: xhr => { this.searchXHR = xhr; },
|
219
219
|
}));
|
220
|
+
|
221
|
+
if (!this.searchTerm) {
|
222
|
+
this.bookreader?.urlPlugin?.removeUrlParam('q');
|
223
|
+
} else {
|
224
|
+
this.bookreader?.urlPlugin?.setUrlParam('q', this.searchTerm);
|
225
|
+
}
|
220
226
|
};
|
221
227
|
|
222
228
|
/**
|
@@ -230,6 +236,7 @@ BookReader.prototype._cancelSearch = function () {
|
|
230
236
|
this.searchXHR = null;
|
231
237
|
this.searchCancelled = true;
|
232
238
|
this.searchResults = [];
|
239
|
+
this.bookreader?.urlPlugin?.removeUrlParam('q');
|
233
240
|
};
|
234
241
|
|
235
242
|
/**
|
@@ -243,6 +250,7 @@ BookReader.prototype.cancelSearchRequest = function () {
|
|
243
250
|
this.searchView.toggleSearchPending();
|
244
251
|
this.trigger('SearchCanceled', { term: this.searchTerm, instance: this });
|
245
252
|
}
|
253
|
+
this?.urlPlugin?.removeUrlParam('q');
|
246
254
|
};
|
247
255
|
|
248
256
|
/**
|