diff options
author | Chris Austin | 2011-03-02 21:06:00 +0000 |
---|---|---|
committer | Chris Austin | 2011-03-02 21:06:00 +0000 |
commit | f80d928f29a67bfad5d8779e0d916627e5c035d7 (patch) | |
tree | 3eae5c4a5e0e05a8062c9bdaeffca2bad7056034 /org.eclipse.ua.tests/data/help | |
parent | 6954a216bfa05fb8ce639426c60a2c5d211e1512 (diff) | |
download | eclipse.platform.ua-f80d928f29a67bfad5d8779e0d916627e5c035d7.tar.gz eclipse.platform.ua-f80d928f29a67bfad5d8779e0d916627e5c035d7.tar.xz eclipse.platform.ua-f80d928f29a67bfad5d8779e0d916627e5c035d7.zip |
Bug 319907 - [Help] Promote main help servlets to public API
Diffstat (limited to 'org.eclipse.ua.tests/data/help')
-rw-r--r-- | org.eclipse.ua.tests/data/help/jsp/server.js | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/org.eclipse.ua.tests/data/help/jsp/server.js b/org.eclipse.ua.tests/data/help/jsp/server.js deleted file mode 100644 index 5b1fd51ce..000000000 --- a/org.eclipse.ua.tests/data/help/jsp/server.js +++ /dev/null @@ -1,45 +0,0 @@ - -var defaultName = "http://help.eclipse.org/helios/"; - -function getHelpPath() { - var path = getCookie(); - if (path !== null) return decodeURIComponent(path); - return defaultName; -} - -function showHelpPath() { - var pathNode = document.getElementById("path"); - var pathValue=document.createTextNode("Testing help system: " + getHelpPath() + "index.jsp"); - pathNode.appendChild(pathValue); -} - -// Patches every anchor in a page -function patchAnchors() { - var doclinks = document.getElementsByTagName("a"); - for (var i = 0; i < doclinks.length; i++) { - var slash = doclinks[i].href.indexOf('/', 8); - slash = doclinks[i].href.indexOf('/', slash + 1); - doclinks[i].href = getHelpPath() + doclinks[i].href.substring(slash + 1); - } -} - -function getCookie() { - var nameEquals = "server="; - var cookies = document.cookie.split(";"); - for (var i=0;i<cookies.length;++i) { - var cookie = cookies[i]; - if (cookie.charAt(0) == ' ') { - cookie = cookie.substring(1, cookie.length); - } - if (cookie.indexOf(nameEquals) == 0) { - return cookie.substring(nameEquals.length, cookie.length); - } - } - return null; -} - -function setCookie(value) { - var date = new Date(); - date.setTime(date.getTime()+(365*24*60*60*1000)); - document.cookie = "server=" + value + "; expires=" + date.toGMTString(); -}
\ No newline at end of file |