projects
/
uzbl-mobile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ef4633
)
match against buttons values
author
Sylvester Johansson
<scj@archlinux.us>
Mon, 1 Jun 2009 17:29:53 +0000
(19:29 +0200)
committer
Sylvester Johansson
<scj@archlinux.us>
Mon, 1 Jun 2009 17:29:53 +0000
(19:29 +0200)
examples/scripts/linkfollow.js
patch
|
blob
|
history
diff --git
a/examples/scripts/linkfollow.js
b/examples/scripts/linkfollow.js
index
b90b82d
..
3b40f37
100644
(file)
--- a/
examples/scripts/linkfollow.js
+++ b/
examples/scripts/linkfollow.js
@@
-94,9
+94,17
@@
function Hints(){
this.test = test;
this.toString = toString;
this.numbers = numbers;
+ function matchAgainst(element){
+ if(element.node.nodeName == "INPUT"){
+ return element.node.title;
+ } else {
+ return element.node.textContent;
+ }
+ }
function test(element) {
// test all the regexp
- return words.every(function (regex) { return element.node.textContent.match(regex)});
+ var item = matchAgainst(element);
+ return words.every(function (regex) { return item.match(regex)});
}
}