]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/on-line/javascript/prelude.js
Two parameters used but not declared. Fixed.
[helm.git] / helm / on-line / javascript / prelude.js
index 12862e545024b4b116acc010a9f5555063c6667c..69479641cd5af9ee32d8ae20aa3d678ee60df6d6 100644 (file)
@@ -75,6 +75,11 @@ function getUNICODEvsSYMBOL()
    return document.UNICODEvsSYMBOL.radioUNICODEvsSYMBOL[1].value;
 }
 
+function chopSlash(url)
+{
+  return url.slice(0,url.lastIndexOf('/'));
+}
+
 function refreshLinks()
 {
   var search = top.location.search;
@@ -93,18 +98,38 @@ function refreshLinks()
   if (theoryuri == "-1") theoryuri = getDefaultParam("theoryuri");
   if (mode == "-1") mode = getDefaultParam("mode");
 
-  document.links[2].search = "?getterURL=" + getGetterURL();
-  
-  document.links[3].search = 
-    "?processorURL=" + getUwoboURL() +
-    "&getterURL=" + getGetterURL();
-
-  document.links[4].href = "../html/library/index.html?cicuri=" + cicuri
-     + "&theoryuri=" + theoryuri
-     + "&mode=" + mode
-     + "&processorURL=" + getUwoboURL()
-     + "&getterURL=" + getGetterURL()
-     + "&UNICODEvsSYMBOL=" + getUNICODEvsSYMBOL();
+  document.links[2].href =
+   document.links[2].protocol + '//' +
+   document.links[2].host +
+   document.links[2].pathname +
+   "?getterURL=" + getGetterURL();
+
+  document.links[3].href = 
+   document.links[3].protocol + '//' +
+   document.links[3].host +
+   document.links[3].pathname +
+   "?processorURL=" + getUwoboURL() +
+   "&getterURL=" + getGetterURL();
+
+  var topurl =
+   chopSlash(chopSlash(
+    document.location.protocol + '//' +
+    document.location.host +
+    document.location.pathname));
+  document.links[4].href =
+     getUwoboURL() + "apply" +
+      "?keys=RT" +
+      "&param.topurl=" + topurl +
+      "&xmluri=" +
+      escape(
+       topurl + "/html/library/index.html" +
+       "?cicuri=" + cicuri +
+       "&theoryuri=" + theoryuri +
+       "&mode=" + mode +
+       "&processorURL=" + getUwoboURL() +
+       "&getterURL=" + getGetterURL() +
+       "&UNICODEvsSYMBOL=" + getUNICODEvsSYMBOL()
+      );
 }
 
 function selectUwoboURL(ss)