X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fon-line%2Fjavascript%2Fprelude.js;h=69479641cd5af9ee32d8ae20aa3d678ee60df6d6;hb=d42f916052e67304e8b46e537b9a4bbaf2c2607e;hp=12862e545024b4b116acc010a9f5555063c6667c;hpb=d1132a3652b678eeece55c9163f21091ec42ae84;p=helm.git diff --git a/helm/on-line/javascript/prelude.js b/helm/on-line/javascript/prelude.js index 12862e545..69479641c 100644 --- a/helm/on-line/javascript/prelude.js +++ b/helm/on-line/javascript/prelude.js @@ -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" + + "¶m.topurl=" + topurl + + "&xmluri=" + + escape( + topurl + "/html/library/index.html" + + "?cicuri=" + cicuri + + "&theoryuri=" + theoryuri + + "&mode=" + mode + + "&processorURL=" + getUwoboURL() + + "&getterURL=" + getGetterURL() + + "&UNICODEvsSYMBOL=" + getUNICODEvsSYMBOL() + ); } function selectUwoboURL(ss)