bugfixed potential self ddos :/
This commit is contained in:
parent
9f684a7b68
commit
6981172789
1 changed files with 7 additions and 10 deletions
|
@ -86,14 +86,9 @@ function ComicBook(id, srcs, opts) {
|
||||||
return parseInt(location.hash.substring(1),10) - 1 || 0;
|
return parseInt(location.hash.substring(1),10) - 1 || 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setHash() {
|
function setHash(pageNo) {
|
||||||
|
location.hash = pageNo;
|
||||||
var pageNo = pointer + 1;
|
if (options.savePosition === true) { setLastPage(pageNo); };
|
||||||
|
|
||||||
if (getHash() !== '#'+pageNo) {
|
|
||||||
location.hash = pageNo;
|
|
||||||
if (options.savePosition === true) { setLastPage(pageNo); };
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -330,7 +325,9 @@ function ComicBook(id, srcs, opts) {
|
||||||
context.drawImage(page, offsetW, offsetH, page_width, page_height);
|
context.drawImage(page, offsetW, offsetH, page_width, page_height);
|
||||||
if (options.displayMode === "double" && typeof page2 === "object") { context.drawImage(page2, page_width + offsetW, offsetH, page_width, page_height); }
|
if (options.displayMode === "double" && typeof page2 === "object") { context.drawImage(page2, page_width + offsetW, offsetH, page_width, page_height); }
|
||||||
|
|
||||||
setHash(pointer + 1);
|
if (getHash() !== pointer) {
|
||||||
|
setHash(pointer + 1);
|
||||||
|
}
|
||||||
|
|
||||||
// apply any image enhancements previously defined
|
// apply any image enhancements previously defined
|
||||||
$.each(options.enhance, function(action, options) {
|
$.each(options.enhance, function(action, options) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue