Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Denis Salem
VenC
Commits
afe6a358
Commit
afe6a358
authored
Dec 17, 2018
by
Denis Salem
Browse files
fix infinite scroll blocking
parent
165b50c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
changelog.md
View file @
afe6a358
...
...
@@ -149,8 +149,8 @@
DONE | Chapters engine.
DONE | Fix pattern (i.e .:GetEntryTitle:.) access in template's metadata.
DONE | Infinite scroll use html anchor instead of harcoded indexing.
WIP
| Prevent Infinite scroll to block when ressource isn't available.
TODO |
Fix
unit test.
DONE
| Prevent Infinite scroll to block when ressource isn't available.
TODO |
rewrite
unit test
s
.
TODO | Open with navigator manual.
TODO | Client-side search engine.
TODO | Reorganize themes dependencies in setup (adding default templates, scripts, and pages to include).
...
...
@@ -175,5 +175,4 @@
TODO | Improve Feed.
TODO | Print out what's going on while FTP transfert.
TODO | Fix gvim / -ex.
TODO | run local server as daemon.
TODO | Warn about entry title duplicates.
src/share/themes/dummy/assets/VenC-Infinite-Scroll-1.1.0.js
View file @
afe6a358
...
...
@@ -40,7 +40,7 @@ var VENC_INFINITE_SCROLL = {
console
.
log
(
"
VenC: There is more than one infinite scroll hook in DOM. Aborting...
"
)
}
console
.
log
(
"
getPage
Hook
"
,
this
.
pageHook
);
console
.
log
(
"
VenC:
Hook
"
,
this
.
pageHook
);
},
getContent
:
function
()
{
if
(
window
.
XMLHttpRequest
)
{
// code for IE7+, Firefox, Chrome, Opera, Safari
...
...
@@ -50,7 +50,7 @@ var VENC_INFINITE_SCROLL = {
this
.
xmlhttp
=
new
ActiveXObject
(
"
Microsoft.XMLHTTP
"
);
}
this
.
xmlhttp
.
onreadystatechange
=
this
.
domUpdate
;
this
.
xmlhttp
.
open
(
"
GET
"
,
this
.
pageHook
,
true
);
this
.
xmlhttp
.
open
(
"
GET
"
,
this
.
pageHook
,
true
);
this
.
xmlhttp
.
send
();
},
dontWait
:
false
,
...
...
@@ -81,6 +81,9 @@ function VENC_INFINITE_SCROLL_UPDATE_DOM() {
VENC_INFINITE_SCROLL
.
queue
++
;
VENC_INFINITE_SCROLL
.
imageDefaultSetup
(
images
[
k
]);
images
[
k
].
loaded
=
false
;
images
[
k
].
onerror
=
function
(
e
)
{
this
.
onload
(
e
);
}
images
[
k
].
onload
=
function
(
e
)
{
this
.
loaded
=
true
;
VENC_INFINITE_SCROLL
.
queue
--
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment