docs/.vitepress/theme/composables/op.ts

8b470c0fb271ea1682707d86aad4f75a06455370
wotaku/docs/.vitepress/theme/composables/op.ts
taskylizard chore: update license0dddca8d19 1 year ago

28 lines · 782 bytes

 1/**
 2*  All Rights Reserved
 3*
 4*  Copyright (c) 2025 taskylizard
 5*
 6*  All rights reserved. This code and its associated files may not be copied, modified, distributed, sublicensed, or used in any form, in whole or in part, without prior written permission from the copyright holder.
 7*/
 8import type { App, InjectionKey } from 'vue'
 9import { Internal } from '../internal/browser'
10
11export const opSymbol: InjectionKey<Internal> = Symbol('op')
12
13export function createOpProvider(app: App) {
14  // Disable in dev
15  if (import.meta.env.DEV) return
16
17  const op = new Internal({
18    clientId: 'e0e39d6b-2692-45a0-9422-4d668f113f70',
19    trackScreenViews: true,
20    trackOutgoingLinks: true,
21    trackAttributes: true,
22    trackHashChanges: true
23  })
24
25  op.init()
26
27  app.provide(opSymbol, op)
28}
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form