'); printWindow.document.write('
' + content + '
'); printWindow.document.write(' '); printWindow.document.close(); printWindow.focus(); setTimeout(function() { printWindow.print(); printWindow.close(); }, 500); } function downloadPreContent() { var content = ""; var preElements = document.querySelectorAll("pre"); preElements.forEach(function(pre) { content += pre.textContent + "\n\n"; }); var blob = new Blob([content], { type: 'text/plain' }); var anchor = document.createElement('a'); anchor.download = postTitle + '.txt'; // Use the post title as the filename anchor.href = window.URL.createObjectURL(blob); anchor.style.display = 'none'; document.body.appendChild(anchor); anchor.click(); document.body.removeChild(anchor); } function downloadPreContentAsCSV() { var content = ""; var preElements = document.querySelectorAll("pre"); preElements.forEach(function(pre) { // Assuming each line in `pre` is a row and columns are separated by commas var rows = pre.textContent.trim().split("\n"); rows.forEach(function(row) { content += row + "\r\n"; // Use Windows-style line endings for compatibility }); }); var blob = new Blob([content], { type: 'text/csv;charset=utf-8;' }); var anchor = document.createElement('a'); anchor.download = postTitle + '.csv'; // Use the post title as the filename anchor.href = window.URL.createObjectURL(blob); anchor.style.display = 'none'; document.body.appendChild(anchor); anchor.click(); document.body.removeChild(anchor); } function downloadPreContentAsExcel() { var workbook = XLSX.utils.book_new(); var preElements = document.querySelectorAll("pre"); preElements.forEach(function(pre, index) { // Convert the text content of each
 to a workbook
        var csv = pre.textContent;
        var new_workbook = XLSX.read(csv, {type: 'string'});

        // Assuming there's only one sheet in the new workbook
        var first_sheet_name = new_workbook.SheetNames[0];
        var worksheet = new_workbook.Sheets[first_sheet_name];

        // Append the worksheet to the main workbook
        XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet' + (index + 1));
    });

    // Write the workbook and trigger a download
    XLSX.writeFile(workbook, postTitle + '.xlsx');
}


function downloadPreContentAsJSON() {
    var content = [];
    var preElements = document.querySelectorAll("pre");
    preElements.forEach(function(pre) {
        // Assuming each line in `pre` is a separate data entry
        var lines = pre.textContent.trim().split("\n");
        lines.forEach(function(line) {
            // Convert each line to an object or use as is if it's already JSON formatted
            try {
                content.push(JSON.parse(line)); // If each line is a JSON string
            } catch (e) {
                content.push(line); // If each line is just a string, not JSON formatted
            }
        });
    });

    var blob = new Blob([JSON.stringify(content, null, 2)], { type: 'application/json' });
    var anchor = document.createElement('a');
    anchor.download = postTitle + '.json'; // Use the post title as the filename
    anchor.href = window.URL.createObjectURL(blob);
    anchor.style.display = 'none';
    document.body.appendChild(anchor);
    anchor.click();
    document.body.removeChild(anchor);
}

function downloadPreContentAsXML() {
    var content = '\n\n';
    var preElements = document.querySelectorAll("pre");
    preElements.forEach(function(pre, index) {
        // Assuming each line in `pre` is a separate data entry and XML-safe
        var lines = pre.textContent.trim().split("\n");
        lines.forEach(function(line, lineIndex) {
            content += '    ' + line + '\n';
        });
    });
    content += '';

    var blob = new Blob([content], { type: 'application/xml' });
    var anchor = document.createElement('a');
    anchor.download = postTitle + '.xml'; // Use the post title as the filename
    anchor.href = window.URL.createObjectURL(blob);
    anchor.style.display = 'none';
    document.body.appendChild(anchor);
    anchor.click();
    document.body.removeChild(anchor);
}

function copyToClipboard(button) {
    var preElement = document.querySelector('pre.quicklist');
    if (preElement) {
        navigator.clipboard.writeText(preElement.innerText)
            .then(() => {
                // Log success and change button text
                console.log('Text copied to clipboard');
                var originalText = button.innerText;
                button.innerText = 'List Copied';

                // Reset button text after 3 seconds
                setTimeout(function() {
                    button.innerText = originalText;
                }, 3000);
            })
            .catch(err => {
                // Log any errors during the copy process
                console.error('Failed to copy text: ', err);
            });
    } else {
        // Log an error if the 
 element isn't found
        console.error('No 
 element with class "quicklist" found');
    }
}






		
		


			
		
		
				
				
		
	

List of Gluten-Free Foods

Are you looking for an alphabetical list of Gluten-Free Foods that you can easily copy or download in popular formats like PDF, CSV, XML, JSON, and more? Fruits (e.g., apples, bananas, berries) Vegetables (e.g., carrots, spinach, potatoes) Meat (e.g., beef, chicken, pork) Fish and Seafood (e.g., salmon, shrimp, tuna) Dairy (e.g., milk, cheese, yogurt) Eggs …

Read more

List of Foods Without Red Dye 40

Are you looking for an alphabetical list of Foods Without Red Dye 40 that you can easily copy or download in popular formats like PDF, CSV, XML, JSON, and more? Apples Bananas Blueberries Broccoli Brown rice Carrots Cauliflower Celery Chicken breast Cucumbers Eggs Green beans Oatmeal Oranges Pears Plain yogurt Potatoes Quinoa Spinach Strawberries Sweet …

Read more

List of Foods Not to Eat After Appendix Surgery

Are you looking for an alphabetical list of Foods Not to Eat After Appendix Surgery that you can easily copy or download in popular formats like PDF, CSV, XML, JSON, and more? Spicy foods Fried foods High-fat foods Raw vegetables High-fiber foods (like beans and whole grains) Dairy products (if you are lactose intolerant) Carbonated …

Read more

List of Fruits

Are you looking for an alphabetical list of Fruits that you can easily copy or download in popular formats like PDF, CSV, XML, JSON, and more? Apple Apricot Banana Blackcurrant Blueberry Boysenberry Cantaloupe Cherry Cloudberry Coconut Cranberry Dragonfruit Durian Elderberry Fig Gooseberry Grape Grapefruit Guava Honeydew Jackfruit Kiwi Lemon Lime Longan Lychee Mango Miracle Fruit …

Read more

List of Kitchen Spices

Are you looking for a list of kitchen spices that you can easily copy or download in popular formats? These spices are essential in many cuisines around the world and are used to add flavor, color, and aroma to dishes. Each spice has its unique properties and can be used in various combinations to create …

Read more

List of Kitchen Herbs

Are you looking for a list of kitchen herbs that you can easily copy or download in popular formats? These herbs are widely used in cooking and can add distinct flavors and aromas to various dishes. They are often used fresh but can also be found in dried forms. Basil Thyme Oregano Rosemary Parsley Cilantro …

Read more

List of Cheeses

Are you looking for a list of cheeses you can easily copy or download in popular formats? From cheddar to camembert, gouda to gorgonzola, there are countless varieties of cheese to discover and savor. Abondance Ackawi Afuega’l Pitu Aged Cheddar Aged Gouda Ahumado de Pria Ailsa Craig Airag Airedale Aisy Cendré Allgäuer Bergkäse Alverca Ambert …

Read more

List of Vegetables

While some items on this list, such as tomatoes and avocados, are technically fruits, they’re often used in cooking as vegetables due to their culinary applications. Artichoke Arugula Asparagus Aubergine (Eggplant) Avocado Bamboo Shoots Basil Beetroot Bell Pepper Bok Choy Broccoli Brussels Sprouts Butternut Squash Cabbage Carrot Cauliflower Celery Chard Chicory Collard Greens Corn Courgette …

Read more