From: Claudio Sacerdoti Coen Date: Thu, 26 Jun 2003 12:43:58 +0000 (+0000) Subject: dropBodySuffix function added X-Git-Tag: camera_ready~46 X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=commitdiff_plain;h=d5b54e7fea59642c4389b035828ca21ebe199bbd dropBodySuffix function added --- diff --git a/helm/on-line/javascript/utils.js b/helm/on-line/javascript/utils.js index bb018ad0e..a4ca9cc35 100644 --- a/helm/on-line/javascript/utils.js +++ b/helm/on-line/javascript/utils.js @@ -1,3 +1,11 @@ +function dropBodySuffix(url) +{ var length = url.length; + if (url.slice(length - 5, length) == '.body') + return (url.slice(0, length - 5)); + else + return url; +} + function chopSlash(url) { return url.slice(0,url.lastIndexOf('/'));