mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-09-20 12:44:40 -04:00
better targeting
This commit is contained in:
parent
21383e0964
commit
4e4159717b
1 changed files with 4 additions and 8 deletions
|
@ -42,13 +42,9 @@ var umbraIntervalFunc = function() {
|
||||||
var target = null;
|
var target = null;
|
||||||
|
|
||||||
var navlinks = document.querySelectorAll("div.nav > a");
|
var navlinks = document.querySelectorAll("div.nav > a");
|
||||||
if (navlinks) {
|
for (link in navlinks) {
|
||||||
if (navlinks.length > 1) {
|
if (link.textContent.indexOf("Next") > 0) {
|
||||||
target = navlinks[1];
|
target = link;
|
||||||
} else {
|
|
||||||
if (navlinks[0].textContent.startsWith("Next")) {
|
|
||||||
target = navlinks[0];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +58,7 @@ var umbraIntervalFunc = function() {
|
||||||
clickedSomething = true;
|
clickedSomething = true;
|
||||||
umbraState.idleSince = null;
|
umbraState.idleSince = null;
|
||||||
var target_page = re.exec(document.querySelector("div.nav").textContent);
|
var target_page = re.exec(document.querySelector("div.nav").textContent);
|
||||||
console.log('clicked ' + target_page);
|
console.log('clicked ' + target_page[1]);
|
||||||
umbraAlreadyClicked[target_page] = true;
|
umbraAlreadyClicked[target_page] = true;
|
||||||
} else if (where > 0) {
|
} else if (where > 0) {
|
||||||
somethingLeftBelow = true;
|
somethingLeftBelow = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue