<commit_before>import { t, textDirection } from '../util/locale';
import { tooltip } from '../util/tooltip';
import { modeBrowse } from '../modes/index';
import { geoExtent } from '../geo/index';
import { svgIcon } from '../svg/index';
import { uiLoading } from './loading';


export function uiGeolocate(context) {
    var geoOptions = { enableHighAccuracy: false, timeout: 6000 /* 6sec */ },
        locating = uiLoading(context).message(t('geolocate.locating')).blocking(true),
        timeoutId;


    function click() {
        context.enter(modeBrowse(context));
        context.container().call(locating);
        navigator.geolocation.getCurrentPosition(success, error, geoOptions);<commit_msg>Don't allow geolocate while in walkthrough<commit_after>import { t, textDirection } from '../util/locale';
import { tooltip } from '../util/tooltip';
import { modeBrowse } from '../modes/index';
import { geoExtent } from '../geo/index';
import { svgIcon } from '../svg/index';
import { uiLoading } from './loading';


export function uiGeolocate(context) {
    var geoOptions = { enableHighAccuracy: false, timeout: 6000 /* 6sec */ },
        locating = uiLoading(context).message(t('geolocate.locating')).blocking(true),
        timeoutId;


    function click() {
        if (context.inIntro()) return;
        context.enter(modeBrowse(context));
        context.container().call(locating);
        navigator.geolocation.getCurrentPosition(success, error, geoOptions);
{'fraction_non_alphanumeric': 0.15285326086956522, 'fraction_numerical': 0.006793478260869565, 'mean_word_length': 3.6910828025477707, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '82229', 'n_tokens_mistral': 443, 'n_tokens_neox': 419, 'n_words': 97}