<commit_before>_Drop = Drop.createContext classPrefix: 'drop'

isMobile = $(window).width() < 567

init = ->
    setupHero()
    setupExamples()

setupHero = ->
    drop = new _Drop
        target: $('.hero .drop-target')[0]
        classes: 'drop-theme-arrows-bounce-dark drop-hero'
        position: 'bottom center'
        constrainToWindow: false
        constrainToScrollParent: false
        openOn: ' '
        content: '''
            <h1>Drop</h1>
            <h2>The best dropdown library on<br/>either side of the Mississippi.</h2>
            <p>
                <a class="button" href="http://github.com/HubSpot/drop">★ On Github</a>
            </p>
        '''

    $ -> setTimeout (-> drop.open()), 500

    # drop1 = drop2 = undefined

    # drop1 = new _Drop
    #     target: $('.drop-demo .drop-target')[0]
    #     classes: 'drop-theme-arrows-bounce'
    #     position: 'bottom right'
    #     constrainToWindow: false
    #     constrainToScrollParent: false
    #     openOn: 'click'
    #     content: '<div class="drop-target">Click Me</div>'

    # drop1.once 'open', ->
    #     drop2 = new _Drop
    #         target: $(drop1.dropContent).find('.drop-target')[0]
    #         classes: 'drop-theme-arrows-bounce'
    #         position: 'bottom left'
    #         constrainToWindow: false
    #         constrainToScrollParent: false
    #         openOn: 'click'
    #         content: '<div style="height: 100px; width: 100px"></div>'

    # drop1.on 'close', ->
    #     drop2.close?()

setupExamples = ->
    $('.example').each ->
        $example = $ @
        theme = $example.data('theme')

        $target = $example.find('.drop-target')
        $target.addClass theme

        content = $example.find('.drop-content').html()

        drop = new _Drop
            target: $target[0]
            classes: theme
            position: 'bottom center'
            constrainToWindow: true
            constrainToScrollParent: false
            openOn: 'click'
            content: content

init()
<commit_msg>Remove comment<commit_after>_Drop = Drop.createContext classPrefix: 'drop'

isMobile = $(window).width() < 567

init = ->
    setupHero()
    setupExamples()

setupHero = ->
    drop = new _Drop
        target: $('.hero .drop-target')[0]
        classes: 'drop-theme-arrows-bounce-dark drop-hero'
        position: 'bottom center'
        constrainToWindow: false
        constrainToScrollParent: false
        openOn: ' '
        content: '''
            <h1>Drop</h1>
            <h2>The best dropdown library on<br/>either side of the Mississippi.</h2>
            <p>
                <a class="button" href="http://github.com/HubSpot/drop">★ On Github</a>
            </p>
        '''

    $ -> setTimeout (-> drop.open()), 500

setupExamples = ->
    $('.example').each ->
        $example = $ @
        theme = $example.data('theme')

        $target = $example.find('.drop-target')
        $target.addClass theme

        content = $example.find('.drop-content').html()

        drop = new _Drop
            target: $target[0]
            classes: theme
            position: 'bottom center'
            constrainToWindow: true
            constrainToScrollParent: false
            openOn: 'click'
            content: content

init()

{'fraction_non_alphanumeric': 0.14168440255396778, 'fraction_numerical': 0.012161751292186074, 'mean_word_length': 1.883435582822086, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 39, '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': '2957160', 'n_tokens_mistral': 1011, 'n_tokens_neox': 963, 'n_words': 210}