Cheese Sauce for Broccoli

This fast and easy cheese sauce for broccoli completely transforms this cruciferous veggie, leaving my family always asking for more! It also works as a delicious cheese sauce for baked potatoes, pasta, or even chicken. Best of all, NO VELVEETA!








Why You’ll Love This Recipe



This real cheese sauce for broccoli is something I’ve been making almost every week for years. Let me make my case for why you should too.




Made from all real food ingredients . Velveeta cheese (the main ingredient of most quick “cheese” sauces) is filled with additives and preservatives.



This homemade cheese sauce is super versatile and can be used for all kinds of dishes.



This cheese sauce stores really well in the fridge AND even in the freezer. I’ve tested it many times and was shocked that it rewarmed so well.



It’s relatively cheap and fast to make this sauce, making it a valuable part of a nutritious weeknight dinner.



Easy enough to memorize ! Even my middle school daughter can make this sauce now.



This recipe is very easy to double or triple for feeding more people.










Ingredients



Now you can see why I keep these ingredients on hand at all times and whip up this cheese sauce regularly for a weeknight dinner. Here’s what you’ll need…









Ingredient Notes




Milk – I use 2% milk, but you can use whatever you have on hand.



Cream cheese – This lends creaminess. I use full-fat plain cream cheese. Low fat will work, but it just may not be as smooth of a sauce.



Shredded cheddar cheese – Or you can use another shredded cheese to mix things up, like Colby jack, pepper jack (for a spicy twist!), mozzarella, or Monterey jack.






Step-by-Step Instructions



Done in just 7-8 minutes with a few basic ingredients, you’ll never make cheese sauce with Velveeta again. Trust me! Just follow these 4 easy steps.














Make Roux













A roux–a mixture of flour and butter that’s cooked together–is the foundation of this recipe (similar to our Crock Pot Chicken Pot Pie ) and will add flavor and help thicken the cheese sauce.



To make the roux, melt butter in a saucepan over medium-low heat. Whisk in the flour, stirring constantly to prevent lumps, until the mixture darkens a little, about 1 to 2 minutes.




















Stir in the milk













Turn up heat to medium-high. Pour in the milk and continue whisking to break up any lumps. When the milk thickens to the consistency of thin gravy (approximately 3-5 minutes), turn off the heat and remove from the burner.




















Stir in the Cheeses and Seasoning













Stir in the cream cheese until fairly smooth. Then stir in the shredded cheddar, a little at a time, until well incorporated. Lastly, stir in the salt and pepper. If it’s still too thick, add more milk. Taste and adjust seasoning.




















Serve













Serve warm over steamed broccoli, pasta, baked potatoes, nachos, chicken, or whatever you want! Store cooled leftovers in the fridge or freezer for later.









What Else Can I Use This Broccoli Cheese Sauce For?



Aside from serving it over steamed broccoli, there are many other options!



Cheese Sauce for Baked Potatoes



I often serve this over Crock Pot Baked Potatoes topped with steamed broccoli, more shredded cheese, some bacon bits, chopped chives, and sour cream. It’s a cheap and satisfying meal the family will love! Similar to a Baked Potato Bar , just lay out all the topping options and let your crew build your baked potato however they like.



Cheese Sauce for Pasta



Another favorite way to serve it is over whole grain pasta on really busy nights. I boil the pasta and add in some broccoli during the last 2-3 minutes of the cook time. While those cook, I whip up the cheese sauce and BOOM…another cheap, weeknight meal is done.




















So Many Other Ways to Serve It!



Here are a few more ideas. Serve it with:




Instant Pot Brown Rice



Steamed cauliflower



Savory Chicken



Dipping sauce for Oven Fried Chicken Tenders .



Baked Nachos



Grilled Asparagus





Bottom Line: Cheese Sauce for Broccoli makes just about anything more delicious, including those roasted vegetables your picky eaters turn their noses up at.





How to Store Leftovers



I’ve stored leftover cheese sauce both in the fridge and freezer. In both cases, the sauce reheated just fine! I honestly couldn’t believe it worked. So, don’t toss the leftovers. Just stick them in a glass freezer container for next time.














If freezing, thaw in the fridge or using the defrost setting in the microwave, and then rewarm in the microwave or over low heat in a pan on the stovetop. You might have to stir in a little milk to thin it back out when you warm it up.










FAQs



What types of cheese can I use to make homemade cheese sauce? You can use all sorts of cheeses like Colby jack, pepper jack (for a spicy twist!), mozzarella, or Monterey jack. How do I store cheese sauce? This cheese sauce stores really well in the fridge AND even in the freezer. I’ve tested it many times and was shocked that it rewarmed so well. Is Cheese Sauce gluten-free? You can use a 1:1 gluten-free all purpose flour in place of the whole wheat flour to make this gluten-free. How do I prevent cheese sauce from becoming lumpy? To prevent lumps in your cheese sauce, make sure to whisk the flour into the melted butter thoroughly, and add the milk slowly while continuing to whisk.





















Make 6 Dump-and-Go Freezer Meals in 1 Hour!





Try a 1 Hour Freezer Prep Session ($6.99 value) for FREE!

Includes:


Shopping & equipment lists
Step-by-Step instructions & video tutorial
Serving suggestions & dietary substitutions & more



Please enable JavaScript in your browser to complete this form.

Name *
Email *
GDPR Agreement *

I agree to receive emails from Thriving Home *







Send it my way!













Did you make this? Snap a photo and tag us on Instagram at @thrivinghome so we can see your creations and cheer you on!






















★ ★ ★ ★ ★



5 from 1 review









Cheese Sauce for Broccoli




This fast and easy cheese sauce for broccoli completely transforms this cruciferous veggie, leaving my family always asking for more! It also works as a delicious cheese sauce for baked potatoes, pasta, or even chicken. Best of all, NO VELVEETA!








Yield: 1.5-2 cups (or 6 servings for broccoli)







Prep: 3 minutes Cook: 7 minutes Total: 10 minutes












Print Recipe

Rate



Pin for Later






Email













Units:

US M









Ingredients




1 tablespoon butter
1 tablespoon flour (Recommended: white whole wheat flour)
1 cup milk (I used 2%)
1 tablespoon cream cheese
Pinch of sea salt
pinch of ground pepper (optional)
1 cup shredded cheddar cheese (sub: Colby Jack, Monterey Jack, Pepper Jack, or Mozzarella)








Cook Mode

Prevent your screen from going dark













Before You Begin! If you make this, please leave a review and rating letting us know how you liked this recipe! This helps our business thrive & continue providing free recipes.






Instructions




Make It Now:

Melt the butter in a medium sauté pan over medium-low heat. Whisk in the flour, stirring constantly to prevent lumps, until the mixture darkens a little, about 1 to 2 minutes.
Turn up heat to medium-high. Pour in the milk and continue whisking to break up any lumps. When the milk thickens to the consistency of thin gravy (approximately 3-5 minutes), turn off the heat and remove from the burner.
Stir in the cream cheese until fairly smooth. Then stir in the shredded cheddar, a little at a time, until well incorporated. Lastly, stir in the salt and pepper. If it’s still too thick, add more milk. Taste and adjust seasoning.
Serve warm over steamed broccoli, pasta, baked potatoes, chicken, or whatever you want! Store cooled leftovers in the fridge or freezer for later (see tips below).

Freeze For Later: Freeze leftovers in an air-tight freezer container for up to 3 months.
Prepare From Frozen: Thaw in the refrigerator or using the defrost setting on the microwave. Warm up in the microwave or over low heat in a pan on the stove, stirring occasionally. Add more milk to thin it out when rewarming, if needed.

















Notes/Tips

Gluten-Free Version: You can use a 1:1 gluten-free all purpose flour in place of the whole wheat flour to make this gluten-free.
Can You Make This Dairy-Free? I haven’t tested this as a completely dairy-free sauce. I do know that plain almond milk will work in place of the dairy milk and plain cashew cream cheese (like KiteHill) would work in place of the cream cheese. But I don’t think the dairy-free shredded “cheese” would work well in place of the normal shredded cheese. However, if you have success with a dairy-free version, please let me know in in the comments below!
To Make This Into Alfredo Sauce: I often tweak this to use as an Alfredo sauce by stirring in 1 teaspoon of minced garlic during Step 1 (while making the roux). Then, I use grated Parmesan cheese in place of the shredded cheddar cheese. It’s delicious!
Cream Cheese: I use full-fat plain cream cheese. Low fat will work, but it just may not be as smooth of a sauce.
Shredded cheddar cheese – Or you can use another shredded cheese to mix things up, like Colby jack, pepper jack (for a spicy twist!), mozzarella, or Monterey jack.
If freezing, thaw in the fridge or using the defrost setting in the microwave, and then rewarm in the microwave or over low heat in a pan on the stovetop. You might have to stir in a little milk to thin it back out when you warm it up.








(function(){
window.addEventListener( 'message', function( event ){
if ( ( 'https://nutrifox.com' !== event.origin && 'https://nutrifox.test' !== event.origin ) ||
typeof event.data !== 'string' ) {
return;
}
var payload = JSON.parse( event.data );
switch ( payload.event ) {
case 'setHeight':
var iframe = document.getElementById( 'nutrifox-label-' + payload.recipeId );
iframe.style.height = payload.height + 'px';
break;
}
} );
}());









© Author: Rachel Tiemeyer



Cuisine:
American






Method:
Stove top








Did you make this?



Snap a photo and tag us on Instagram at @thrivinghome so we can see your creations and cheer you on!






















Rate Recipe
























Tag Us on Instagram























.tasty-recipes-print-button{background-color:#667;border:none;display:inline-block;padding:.5em 1em;text-decoration:none}body:not(.tasty-recipes-print-view) .tasty-recipes-print-button.tasty-recipes-print-above-card{color:#fff;display:none}body:not(.tasty-recipes-print-view) .tasty-recipes-print-button.tasty-recipes-print-above-card:hover{background-color:#b2b2bb;color:#fff;display:inline-block;padding:.5em 1em;text-decoration:none}.tasty-recipes-image-button-container{display:flex;flex-direction:column;flex-wrap:wrap;float:right;margin-left:10px}body.tasty-recipes-print-view .tasty-recipes-buttons,body.tasty-recipes-print-view .tasty-recipes-cook-mode{display:none}.tasty-recipes-image-button-container .tasty-recipes-buttons{margin-bottom:10px;margin-top:10px}.tasty-recipes-image-button-container .tasty-recipes-button-wrap{box-sizing:border-box;margin-bottom:10px}.tasty-recipes-image-button-container .tasty-recipes-buttons a{background-color:#f9f9f9;border:1px solid #aaa;border-radius:0;color:#aaa;cursor:pointer;display:block;font-size:16px;font-weight:700;line-height:16px;margin-top:0;padding:8px;text-align:center;text-decoration:none;text-transform:uppercase}.tasty-recipes-image-button-container .tasty-recipes-buttons .button:hover{background-color:#aaa;border:1px solid #aaa;color:#fff;opacity:1}.tasty-recipes-image-button-container .tasty-recipes-buttons a:hover{background-color:#979599;text-decoration:none}.tasty-recipes-image-button-container .tasty-recipes-buttons svg{display:none}.tasty-recipes-yield-scale{border:1px solid #979599;border-radius:2px;color:#979599;font-size:.7rem;margin-left:3px;padding:0 4px}.tasty-recipes-units-scale-container{display:flex;flex-wrap:wrap}.tasty-recipes-convert-container{padding:0 1em 1em 0}.tasty-recipes-convert-container .tasty-recipes-convert-label{align-self:center;color:#979599;font-size:.6rem;text-transform:uppercase}.tasty-recipes-convert-container button{background:transparent;border:1px solid #353547;border-radius:2px;color:#353547;letter-spacing:0;margin-left:5px;min-width:34px;padding:2px 4px;text-align:center}.tasty-recipes-convert-container button.tasty-recipes-convert-button-active{background-color:#000;border-color:#000;color:#fff}.tasty-recipes-convert-container button:focus{outline:none}.tasty-recipes-scale-container{display:flex;padding:0 0 1em}.tasty-recipes-scale-container .tasty-recipes-scale-label{align-self:center;color:#979599;font-size:.6rem;text-transform:uppercase}.tasty-recipes-scale-container button{background:transparent;border:1px solid #353547;border-radius:2px;color:#353547;cursor:pointer;letter-spacing:0;margin-left:5px;min-width:34px;padding:2px 4px}.tasty-recipes-scale-container button.tasty-recipes-scale-button-active{background-color:#000;border-color:#000;color:#fff}.tasty-recipes-scale-container button:focus{outline:none}.tasty-recipes-ingredients-header{margin:1em 0}@media only screen and (min-width:520px){.tasty-recipes-ingredients-header{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between}}.tasty-recipes-ingredients-header .tasty-recipes-ingredients-clipboard-container{align-items:baseline;display:inline-flex}.tasty-recipes-ingredients-header h3{margin:0 10px 10px 0}.tasty-recipes-ingredients-clipboard-container .tasty-recipes-copy-button{background:transparent;border:none;color:#353547;height:24px;padding:0;position:relative;width:24px}.tasty-recipes-ingredients-clipboard-container .tasty-recipes-copy-button:hover{opacity:.5}.tasty-recipes-instructions-header{align-items:baseline;display:flex;flex-wrap:wrap;justify-content:space-between;margin:1em 0}.tasty-recipes-entry-content .tasty-recipes-instructions h3{margin:0 0 1rem}@media only screen and (min-width:520px){.tasty-recipes-entry-content .tasty-recipes-instructions h3{margin:0}}button[name=tasty-recipes-video-toggle]{background:#979599;border:#979599;border-radius:2px;display:inline-block;font-size:14px;height:30px;line-height:20px;margin:0;padding:0;text-align:center;vertical-align:middle;width:86px}button[name=tasty-recipes-video-toggle] span{padding:0 4px;pointer-events:none}button[name=tasty-recipes-video-toggle][aria-checked=false] :last-child,button[name=tasty-recipes-video-toggle][aria-checked=true] :first-child{background:#fff;border-radius:2px;color:#979599;padding:2px 4px}button[name=tasty-recipes-video-toggle][aria-checked=false] :first-child,button[name=tasty-recipes-video-toggle][aria-checked=true] :last-child{color:#fff}label[for=tasty-recipes-video-toggle]{color:#979599;font-size:.6rem;line-height:30px;padding-right:8px;text-transform:uppercase;user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;-o-user-select:none;vertical-align:middle}.tasty-recipe-responsive-iframe-container{margin:10px 0}.tasty-recipes-equipment{display:flex;flex-wrap:wrap;justify-content:space-evenly}.tasty-recipes-equipment>h3{flex:0 0 100%}.tasty-recipes-equipment .tasty-link-card{flex:0 0 50%;padding:1.5rem 1rem;text-align:center}@media screen and (min-width:500px){.tasty-recipes-equipment .tasty-link-card{flex:0 0 33%}}.tasty-recipes-equipment .tasty-link-card p{font-size:1em;font-weight:700;margin-bottom:0}.tasty-recipes-equipment .tasty-link-card p a{color:initial}.tasty-recipes-equipment .tasty-link-card span{font-size:.9em}.tasty-recipes .tasty-recipes-nutrition ul{list-style-type:none;margin:0;padding:0}.tasty-recipes .tasty-recipes-nutrition ul:after{clear:both;content:" ";display:block}.tasty-recipes .tasty-recipes-nutrition li{float:left;list-style-type:none;margin-bottom:0;margin-left:0;margin-right:16px}.tasty-recipes-plug{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;margin-bottom:1em;text-align:center}.tasty-recipes-plug a{box-shadow:none;text-decoration:none}.tasty-recipes-plug a img{background:transparent;box-shadow:none;display:inline-block;height:auto;margin:5px 0 0 8px;padding:0;width:150px}.tasty-recipes-footer-content{padding:1.5em;text-align:center}.tasty-recipes-footer-content .tasty-recipes-footer-copy{margin-left:0}.tasty-recipes-footer-content img,.tasty-recipes-footer-content svg{width:60px}.tasty-recipes-entry-content .tasty-recipes-entry-footer h3{font-size:1.25em;margin:0 0 .25em;padding:0}.tasty-recipes-entry-footer p{font-size:.75em;margin:0}.tasty-recipes-entry-footer p a{border-bottom:none;box-shadow:none;text-decoration:underline}.tasty-recipes-flash-message{background-color:#fff;border-radius:4px;box-shadow:0 .3px .4px 0 rgba(0,0,0,.024),0 .9px 1.5px 0 rgba(0,0,0,.05),0 3.5px 6px 0 rgba(0,0,0,.1);color:#313135;display:inline-block;font-size:13px;letter-spacing:0;line-height:1.2em;margin-left:10px;padding:4px 10px}@media screen and (min-width:500px){.tasty-recipes-flash-message{padding:4px 10px}}.tasty-recipes-flash-message p{margin:0;padding:0;text-transform:none}@media screen and (min-width:500px){.tasty-recipes-footer-content{align-items:center;display:flex;justify-content:center;padding:1.5em 0;text-align:left}.tasty-recipes-footer-content .tasty-recipes-footer-copy{margin-left:.8em}}@media print{.tasty-recipes-no-print,.tasty-recipes-no-print *{display:none!important}}[data-tr-ingredient-checkbox]{cursor:pointer;list-style-position:outside;list-style-type:none!important;margin-left:0!important}[data-tr-ingredient-checkbox] .tr-ingredient-checkbox-container{position:relative}[data-tr-ingredient-checkbox] .tr-ingredient-checkbox-container input[type=checkbox]+label{display:inline-block;position:relative;vertical-align:middle}[data-tr-ingredient-checkbox] .tr-ingredient-checkbox-container input[type=checkbox]{clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}[data-tr-ingredient-checkbox] .tr-ingredient-checkbox-container input[type=checkbox]+label:before{border:1px solid;border-radius:2px;content:"";display:inline-block;height:20px;margin-right:10px;position:relative;width:20px}[data-tr-ingredient-checkbox] .tr-ingredient-checkbox-container input[type=checkbox]:checked+label:after{border-bottom:2px solid;border-left:2px solid;content:"";display:inline-block;height:6px;left:4px;position:absolute;top:4px;transform:rotate(-45deg);width:12px}[data-tr-ingredient-checkbox] .tr-ingredient-checkbox-container input[type=checkbox]:focus+label:before{box-shadow:0 0 8px #5e9ed6;outline:1px solid #5d9dd5}[data-tr-ingredient-checkbox=checked]{opacity:.8;text-decoration:line-through}.tasty-recipes-cook-mode__container{align-items:center;display:flex;line-height:100%}.tasty-recipes-cook-mode__container label{font-size:inherit}.tasty-recipes-cook-mode__switch{display:inline-block;height:17px;margin-right:10px;position:relative;width:30px}.tasty-recipes-cook-mode__switch-slider{background-color:#737373;bottom:0;cursor:pointer;display:block;left:0;opacity:.4;position:absolute;right:0;top:0;transition:.4s}.tasty-recipes-cook-mode__switch-slider:before{background-color:#fff;bottom:2px;content:"";height:13px;left:2px;position:absolute;transition:.4s;width:13px}.tasty-recipes-cook-mode__switch input{display:none}.tasty-recipes-cook-mode__switch input:checked+span{opacity:1}.tasty-recipes-cook-mode__switch input:checked+span:before{transform:translateX(13px)}.tasty-recipes-cook-mode__switch-round{border-radius:34px}.tasty-recipes-cook-mode__switch-round:before{border-radius:50%}.tasty-recipes-cook-mode__label{font-weight:700}@media only screen and (max-width:767px){#shop-with-instacart-v1{transform:scale(.75);transform-origin:top left}}



window.tasty_recipes_min_rating = 4;
(function(){


var bothEquals = function( d1, d2, D ) {
var ret = 0;
if (d1 d2)d2=D+1;else d1=D+1;break}else if(x D){d1=d2;n1=n2}if(!mixed)return[0,n1,d1];var q=Math.floor(n1/d1);return[q,n1-q*d1,d1]};frac.cont=function cont(x,D,mixed){var sgn=x D){if(Q_1>D){Q=Q_2;P=P_2}else{Q=Q_1;P=P_1}}if(!mixed)return[0,sgn*P,Q];var q=Math.floor(sgn*P/Q);return[q,sgn*P-q*Q,Q]};


window.tastyRecipesVulgarFractions = JSON.parse(decodeURIComponent("%7B%22%C2%BC%22%3A%221%2F4%22%2C%22%C2%BD%22%3A%221%2F2%22%2C%22%C2%BE%22%3A%223%2F4%22%2C%22%E2%85%93%22%3A%221%2F3%22%2C%22%E2%85%94%22%3A%222%2F3%22%2C%22%E2%85%95%22%3A%221%2F5%22%2C%22%E2%85%96%22%3A%222%2F5%22%2C%22%E2%85%97%22%3A%223%2F5%22%2C%22%E2%85%98%22%3A%224%2F5%22%2C%22%E2%85%99%22%3A%221%2F6%22%2C%22%E2%85%9A%22%3A%225%2F6%22%2C%22%E2%85%9B%22%3A%221%2F8%22%2C%22%E2%85%9C%22%3A%223%2F8%22%2C%22%E2%85%9D%22%3A%225%2F8%22%2C%22%E2%85%9E%22%3A%227%2F8%22%7D"));

window.tastyRecipesFormatAmount = function(amount, el) {
if ( parseFloat( amount ) === parseInt( amount ) ) {
return amount;
}
var roundType = 'frac';
if (typeof el.dataset.amountShouldRound !== 'undefined') {
if ('false' != el.dataset.amountShouldRound) {
if ( 'number' === el.dataset.amountShouldRound ) {
roundType = 'number';
} else if ('frac' === el.dataset.amountShouldRound) {
roundType = 'frac'
} else if ('vulgar' === el.dataset.amountShouldRound) {
roundType = 'vulgar'
} else {
roundType = 'integer';
}
}
}
if ('number' === roundType) {
amount = Number.parseFloat(amount).toPrecision(2);
} else if ('integer' === roundType) {
amount = Math.round(amount);
} else if ('frac' === roundType || 'vulgar' === roundType) {
var denom = 8;
if (typeof el.dataset.unit !== 'undefined') {
var unit = el.dataset.unit;
if (['cups','cup','c'].includes(unit)) {
denom = 4;
if (0.125 === amount) {
denom = 8;
}
if ("0.1667" === Number.parseFloat( amount ).toPrecision(4)) {
denom = 6;
}
}
if (['tablespoons','tablespoon','tbsp'].includes(unit)) {
denom = 2;
}
if (['teaspoons','teaspoon','tsp'].includes(unit)) {
denom = 8;
}
}
var amountArray = frac.cont( amount, denom, true );
var newAmount = '';
if ( amountArray[1] !== 0 ) {
newAmount = amountArray[1] + '/' + amountArray[2];
if ('vulgar' === roundType) {
Object.keys(window.tastyRecipesVulgarFractions).forEach(function(vulgar) {
if (newAmount === window.tastyRecipesVulgarFractions[vulgar]) {
newAmount = vulgar;
}
});
}
}
if ( newAmount ) {
newAmount = ' ' + newAmount;
}
if ( amountArray[0] ) {
newAmount = amountArray[0] + newAmount;
}
amount = newAmount;
}
return amount;
}


window.tastyRecipesUpdatePrintLink = () => {
const printLinks = document.querySelectorAll( '.tasty-recipes-print-link' );
const printButtons = document.querySelectorAll( '.tasty-recipes-print-button' );

// Use the first print button found as the canonical URL source.
const printButton = document.querySelector( '.tasty-recipes-print-button' );

// If no print button is available, we can't reliably update its href.
if ( ! printButton ) {
return;
}

const printURL = new URL( printButton.href );
const searchParams = new URLSearchParams( printURL.search );

const unitButton = document.querySelector( '.tasty-recipes-convert-button-active' );
const scaleButton = document.querySelector( '.tasty-recipes-scale-button-active' );

let unit = '';
let scale = '';

if ( unitButton ) {
unit = unitButton.dataset.unitType;
searchParams.delete('unit');
searchParams.set( 'unit', unit );
}

if ( scaleButton ) {
scale = scaleButton.dataset.amount;
searchParams.set( 'scale', scale );
}

const paramString = searchParams.toString();
const newURL = '' === paramString ? printURL.href : printURL.origin + printURL.pathname + '?' + paramString;

printLinks.forEach( ( el ) => {
el.href = newURL;
});

printButtons.forEach( ( el ) => {
el.href = newURL;
});
}

// When the document loads, look for unit and scale parameters and setup the recipe card
// to reflect those values.
document.addEventListener( 'DOMContentLoaded', () => {

// Only reflect URL parameters on the print view.
if ( ! window.location.href.includes( '/print/' ) ) {
return;
}

const searchParams = new URLSearchParams( window.location.search );

const unit = searchParams.get( 'unit' );
const scale = searchParams.get( 'scale' );

if ( unit && ( 'metric' === unit || 'usc' === unit ) ) {
document.querySelector( '.tasty-recipes-convert-button[data-unit-type="' + unit + '"]' ).click();
}

if ( scale && Number(scale) > 0 ) {
document.querySelector( '.tasty-recipes-scale-button[data-amount="' + Number(scale) + '"]' ).click();
}
});
}())