Browse Source

chore: docs update

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/6566/head
Pranav C 1 year ago
parent
commit
1fba7f84fa
  1. 20
      packages/noco-docs/src/modules/tele.js

20
packages/noco-docs/src/modules/tele.js

@ -59,6 +59,24 @@ if (ExecutionEnvironment.canUseDOM) {
document.body.removeEventListener('keydown', keydownListener, true);
document.body.addEventListener('click', clickListener, true);
document.body.addEventListener('keydown', keydownListener, true);
const url = new URL(location.href);
const origin = url.searchParams.get('origin');
const search = url.searchParams.get('search');
if(origin && search) {
push({
event: 'cloud/search',
$current_url: location.href,
path: location.pathname,
hash: location.hash,
search_query: search
});
url.searchParams.delete('origin');
url.searchParams.delete('search');
window.history.replaceState({}, document.title, url.toString());
}
}
export function onRouteDidUpdate({ location, previousLocation }) {
@ -75,5 +93,3 @@ export function onRouteDidUpdate({ location, previousLocation }) {
});
}
}

Loading…
Cancel
Save