mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-20 23:56:34 -04:00
better targeting
This commit is contained in:
parent
ab5535f70d
commit
359e61a836
@ -42,13 +42,9 @@ var umbraIntervalFunc = function() {
|
||||
var target = null;
|
||||
|
||||
var navlinks = document.querySelectorAll("div.nav > a");
|
||||
if (navlinks) {
|
||||
if (navlinks.length > 1) {
|
||||
target = navlinks[1];
|
||||
} else {
|
||||
if (navlinks[0].textContent.startsWith("Next")) {
|
||||
target = navlinks[0];
|
||||
}
|
||||
for (link in navlinks) {
|
||||
if (link.textContent.indexOf("Next") > 0) {
|
||||
target = link;
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +58,7 @@ var umbraIntervalFunc = function() {
|
||||
clickedSomething = true;
|
||||
umbraState.idleSince = null;
|
||||
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;
|
||||
} else if (where > 0) {
|
||||
somethingLeftBelow = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user