Fix javadoc search js
Cannot use --no-module-directories as that would break any links
to the main java documentation
@@ -42,7 +42,7 @@ allprojects {
options {
author = true
version = true
- links 'https://docs.oracle.com/javase/9/docs/api/'
+ links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
tagletPath single(utilProject.sourceSets.main.output.classesDirs)
taglets 'ManualTaglet'
taglets 'DochubTaglet'
@@ -54,14 +54,15 @@ allprojects {
addBooleanOption("-allow-script-in-comments", true)
header = '''
| <script type="text/javascript">
- | <!-- Set the location hash in the classFrame -->
+ | function setLocationHash() {
| try {
| locationHash = top.location.hash;
| if (window.name == "classFrame" && locationHash != "") {
| window.location.hash = locationHash;
| }
| } catch (error) {}
- | <!-- GA Tracking code -->
+ | };
+ | function setGATrackingCode() {
| if (window.name == "" || window.name == "classFrame") {
| var _elqQ = _elqQ || [];
| _elqQ.push(["elqSetSiteId", "413370795"]);
@@ -72,6 +73,22 @@ allprojects {
| else if (window.attachEvent) window.attachEvent("onload", async_load);
| })();
| }
+ | };
+ | function setSearchUrlPrefix() {
+ | if (typeof getURLPrefix === 'function') {
+ | var getURLPrefixOri = getURLPrefix;
+ | getURLPrefix = function(ui) {
+ | var urlPrefix = getURLPrefixOri(ui);
+ | return (urlPrefix && urlPrefix != "undefined/" ? urlPrefix: "");
+ | };
+ | } else {
+ | window.setTimeout(setSearchUrlPrefix, 500 );
+ | }
+ | };
+ | setLocationHash();
+ | setGATrackingCode();
+ | setSearchUrlPrefix();
+ |
| </script>'''.stripMargin()
}
}
