Sha256: 4c00d7578bcec0cb519a51b10a5576449eb1841fc846a9fec92d6dc17d3a5f32

Contents?: true

Size: 1.11 KB

Versions: 21

Compression:

Stored size: 1.11 KB

Contents

require 'sinatra'

get '/link' do
    <<-EOHTML
    <html>
        <body>
            <a href='/dom/#/test/?param=some-name'>DOM link</a>
        </body>
    </html>
    EOHTML
end

get '/link/inputtable' do
    <<-EOHTML
    <html>
        <body>
            <a href='/dom/#/test/?input1=value1&input2=value2'>DOM link</a>
        </body>
    </html>
    EOHTML
end

get '/dom/' do
    <<-EOHTML
    <html>
        <script>
            function getQueryVariable(variable) {
                var query = window.location.hash.split('?')[1];
                var vars = query.split('&');
                for (var i = 0; i < vars.length; i++) {
                    var pair = vars[i].split('=');
                    if (decodeURIComponent(pair[0]) == variable) {
                        return decodeURIComponent(pair[1]);
                    }
                }
            }
        </script>

        <body>
            <div id="container">
            </div>

            <script>
                document.getElementById('container').innerHTML = getQueryVariable('param');
            </script>
        </body>
    </html>
    EOHTML
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
arachni-1.6.1.3 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.6.1.2 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.6.1.1 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.6.1 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.6.0 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.5.1 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.5 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.4 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.3.2 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.3.1 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.3 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.2.1 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.2 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.1 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.0.6 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.0.5 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.0.4 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.0.3 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.0.2 spec/support/servers/arachni/element/link/link_dom.rb
arachni-1.0.1 spec/support/servers/arachni/element/link/link_dom.rb