Culture

From Anarchy In Action
Revision as of 14:40, 18 March 2024 by D A Earwig (talk | contribs) (Probably last test)
<iframe id="github-iframe" src=""></iframe>
<script>
    // Fetch the raw content of the file from GitHub
    fetch('https://raw.githubusercontent.com/AnarchyInAction/TheGoldenPath/main/Data/FoodAgricultureWater')
        .then(function(response) {
            // Check if the response is successful
            if (response.ok) {
                // Return the response text
                return response.text();
            }
            // Throw an error if the response is not successful
            throw new Error('Network response was not ok.');
        }).then(function(data) {
            // Get the iframe element
            var iframe = document.getElementById('github-iframe');
            // Set the srcdoc attribute with the fetched content
            iframe.srcdoc = data;
        }).catch(function(error) {
            // Log any errors to the console
            console.error('There was a problem with the fetch operation:', error);
        });
</script>