File size: 3,203 Bytes
00a1bca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Crawler Test - Infinite Loop</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            background: #f0f0f0;
        }
        .page {
            max-width: 800px;
            margin: 0 auto;
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .navigation {
            margin-top: 20px;
            padding: 10px;
            background: #f8f8f8;
            border-radius: 4px;
        }
        a {
            color: #0066cc;
            text-decoration: none;
            padding: 5px 10px;
            margin-right: 10px;
            border: 1px solid #0066cc;
            border-radius: 4px;
            display: inline-block;
        }
        a:hover {
            background: #0066cc;
            color: white;
        }
    </style>
</head>
<body>
    <div id="content"></div>

    <script>
        // Define page contents
        const pages = {
            'home': {
                title: 'Home Page',
                content: '<p>Welcome to the crawler test page.</p>',
                links: [
                    { text: 'Go to Loop 1', href: '?page=loop1' },
                ]
            },
            'loop1': {
                title: 'Loop Page 1',
                content: '<p>This is loop page 1.</p>',
                links: [
                    { text: 'Back to Home', href: '?page=home' },
                    { text: 'Go to Loop 2', href: '?page=loop2' },
                ]
            },
            'loop2': {
                title: 'Loop Page 2',
                content: `
                    <p>This is loop page 2 with some dummy text.</p>
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
                    Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
                    <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris 
                    nisi ut aliquip ex ea commodo consequat.</p>
                `,
                links: [
                    { text: 'Back to Loop 1', href: '?page=loop1' },
                    { text: 'Back to Home', href: '?page=home' },
                ]
            }
        };

        // Get current page from URL params
        const urlParams = new URLSearchParams(window.location.search);
        const currentPage = urlParams.get('page') || 'home';

        // Render page content
        const content = document.getElementById('content');
        const page = pages[currentPage] || pages['home'];
        
        content.innerHTML = `
            <div class="page">
                <h1>${page.title}</h1>
                ${page.content}
                <div class="navigation">
                    ${page.links.map(link => 
                        `<a href="${link.href}">${link.text}</a>`
                    ).join('')}
                </div>
            </div>
        `;
    </script>
</body>
</html>