<commit_before>import { bodyLoader } from 'src/util/loader'
import { remoteFunction } from 'src/util/webextensionRPC'
import * as rendering from './rendering'
import * as interactions from 'src/sidebar-overlay/content_script/interactions'

export async function init() {
    await bodyLoader()
    setTimeout(() => {
        remoteFunction('followAnnotationRequest')()
    }, 500)
}

export function setupAnchorFallbackOverlay() {}

browser.runtime.onMessage.addListener(request => {
    if (request.type !== 'direct-link') {
        return
    }

    ;(async () => {
        const highlightSuccessful = await rendering.highlightAnnotation({
            annotation: request.annotation,
        })
        if (highlightSuccessful) {
            interactions.scrollToHighlight({ isDark: true })
        } else {
            setupAnchorFallbackOverlay()
        }
    })()
})

init()<commit_msg>fixing mistake i pushed<commit_after>import { bodyLoader } from 'src/util/loader'
import { remoteFunction } from 'src/util/webextensionRPC'
import * as rendering from './rendering'
import * as interactions from 'src/sidebar-overlay/content_script/interactions'

export async function init() {
    await bodyLoader()
    setTimeout(() => {
        remoteFunction('followAnnotationRequest')()
    }, 500)
}

export function setupAnchorFallbackOverlay() {}

browser.runtime.onMessage.addListener(request => {
    if (request.type !== 'direct-link') {
        return
    }

    ;(async () => {
        const highlightSuccessful = await rendering.highlightAnnotation({
            annotation: request.annotation,
        })
        if (highlightSuccessful) {
            interactions.scrollToHighlight({ isDark: false })
        } else {
            setupAnchorFallbackOverlay()
        }
    })()
})

init()
{'fraction_non_alphanumeric': 0.1203342618384401, 'fraction_numerical': 0.003342618384401114, 'mean_word_length': 3.0269058295964126, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5925567', 'n_tokens_mistral': 485, 'n_tokens_neox': 478, 'n_words': 102}