Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NUTCH-1678 Remove dependency on org.apache.oro
- replace oro with java.util.regex classes in OutlinkExtractor, plugins parse-js and index-more - extend unit tests of parse-js - correct pointer to Java regex syntax (instead of "Perl5")
- Loading branch information
1 parent
69e9e92
commit b2d9058
Showing
12 changed files
with
169 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// test data for link extraction from "pure" JavaScript | ||
|
||
function selectProvider(form) { | ||
provider = form.elements['searchProvider'].value; | ||
if (provider == "any") { | ||
if (Math.random() > 0.5) { | ||
provider = "lucid"; | ||
} else { | ||
provider = "sl"; | ||
} | ||
} | ||
|
||
if (provider == "lucid") { | ||
form.action = "http://search.lucidimagination.com/p:nutch"; | ||
} else if (provider == "sl") { | ||
form.action = "http://search-lucene.com/nutch"; | ||
} | ||
|
||
days = 90; // cookie will be valid for 90 days | ||
date = new Date(); | ||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); | ||
expires = "; expires=" + date.toGMTString(); | ||
document.cookie = "searchProvider=" + provider + expires + "; path=/"; | ||
} |
Oops, something went wrong.