2
0
mirror of https://github.com/boostorg/website.git synced 2026-01-27 19:32:16 +00:00
Files
website/development/doc/javascript/common.js
Matias Capeletto 8d237bd14b safari fix
[SVN r7306]
2007-06-29 02:36:31 +00:00

36 lines
960 B
JavaScript

/*===========================================================================
Copyright (c) 2007 Matias Capeletto
Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
===========================================================================*/
/* Common Functions and configuration */
(function() {
// Add the base url if it is relative
function format_url(sUrl,sBaseUrl)
{
return ( sUrl.substring(0,7) == 'http://' ) ? sUrl : ( sBaseUrl + sUrl );
}
// Add '/' to the end if necesary
function format_base_url(sBaseUrl)
{
return ( sBaseUrl!='' && sBaseUrl.charAt(sBaseUrl.length-1)!='/' ) ?
( sBaseUrl + '/' ) : sBaseUrl;
}
// Public Interface
boostscript.common.format_url = format_url;
boostscript.common.format_base_url = format_base_url;
boostscript.common.loaded = true;
})();