| 
1 |  | -/**  | 
2 |  | - * If you change the base URL here, you should probably also change it in places where it's still hard coded:  | 
3 |  | - * - README.md,  | 
4 |  | - * - CONTRIBUTING.md,  | 
5 |  | - * - sandbox/index.html,  | 
6 |  | - * - test/utils.test.js.  | 
7 |  | - */  | 
8 |  | -const CC_DEV_HUB_BASE_URL = 'https://www.clever.cloud/developers/';  | 
9 |  | - | 
10 | 1 | /**  | 
11 | 2 |  * @param {Record<string, any>} a  | 
12 | 3 |  * @param {Record<string, any>} b  | 
@@ -256,39 +247,6 @@ export function sleep(delay) {  | 
256 | 247 |   });  | 
257 | 248 | }  | 
258 | 249 | 
 
  | 
259 |  | -/**  | 
260 |  | - * Rely on this helper for every reference to the Clever Cloud docs website  | 
261 |  | - *  | 
262 |  | - * @param {string} [path]  | 
263 |  | - * @returns {string} href  | 
264 |  | - */  | 
265 |  | -export function generateDocsHref(path = '') {  | 
266 |  | -  /**  | 
267 |  | -   * Ensure "/doc" is appended after the base URL, then append the provided path  | 
268 |  | -   * If you change the base URL here, you should probably also change it in places where it's still hard coded:  | 
269 |  | -   * - README.md,  | 
270 |  | -   * - CONTRIBUTING.md,  | 
271 |  | -   * - sandbox/index.html,  | 
272 |  | -   * - test/utils.test.js.  | 
273 |  | -   */  | 
274 |  | -  const CC_DOCS_BASE_URL = CC_DEV_HUB_BASE_URL.replace(/\/$/, '') + '/doc/';  | 
275 |  | -  // if a '/' is present at the beginning, the path is considered absolute and it is appended right after the origin  | 
276 |  | -  // we want the path to always be appended after the existing path of the base URL so we remove the first '/' so that it's considered relative  | 
277 |  | -  return new URL(path.replace(/^\//, ''), CC_DOCS_BASE_URL).href;  | 
278 |  | -}  | 
279 |  | - | 
280 |  | -/**  | 
281 |  | - * Rely on this helper for every reference to the Clever Cloud developer hub website  | 
282 |  | - *  | 
283 |  | - * @param {string} [path]  | 
284 |  | - * @returns {string} href  | 
285 |  | - */  | 
286 |  | -export function generateDevHubHref(path = '') {  | 
287 |  | -  // if a '/' is present at the beginning, the path is considered absolute and it is appended right after the origin  | 
288 |  | -  // we want the path to always be appended after the existing path of the base URL so we remove the first '/' so that it's considered relative  | 
289 |  | -  return new URL(path.replace(/^\//, ''), CC_DEV_HUB_BASE_URL).href;  | 
290 |  | -}  | 
291 |  | - | 
292 | 250 | /**  | 
293 | 251 |  * Checks if a given DOM element is currently visible within a given container's bounds.  | 
294 | 252 |  *  | 
 | 
0 commit comments