Cranberry Orange Sauce


Wow your guests at your next holiday meal with this deceptively complex-tasting, make ahead Cranberry Orange Sauce . It only takes 10 minutes to whip up! The best part is that you can make this in advance and either freeze it or store it in the refrigerator.










About This Recipe



When first making my own cranberry sauce, I learned that it’s one of THE easiest and most beautiful holiday side dishes ever, producing “ooos and ahhhs” every year it shows up at the holiday table.



My recipe includes fresh or frozen cranberries, fresh orange juice and zest, honey, and several autumnal spices. You can even toss in a little bit of fresh, minced rosemary if you’d like, too. The smell is out of this world!



Want to throw a fun twist on the recipe? Try our Apple Cranberry Sauce instead.








My daughter, age 14 now, has been making this Cranberry Orange Sauce for our Thanksgiving and Christmas dinners for many years now. Homemade cranberry sauce is THAT easy. It really only takes 10 minutes to come together!





Ingredients



Gather up these fresh ingredients to make homemade cranberry sauce…








Cranberries – Use fresh or frozen cranberries. Fresh ones are often on sale around the holidays, but feel free to use frozen any time of year. There is no significant taste difference.



Orange – The zest and freshly squeezed juice makes a huge flavor impact in this recipe. It just won’t be the same without it.



Seasonings – I chose to add in a small amounts of warm autumnal spices including cinnamon, cloves, and nutmeg. You can also add in a bit of fresh, minced rosemary. These work together to create a complex flavor profile that enhances almost any holiday main dish!



Sweetener – It’s imperative to add some sort of sweetener to cranberries. Otherwise, they are too tangy to eat! I chose to use honey, since it’s more all natural and also adds a little more depth of flavor that straight up white sugar.







How to Make Cranberry Orange Sauce



We offer two cooking methods for this sauce, stove top or Instant Pot.



Stovetop Method:



In a medium saucepan, combine the cranberries, honey, 1/2 cup water, orange zest and juice, cinnamon, cloves, nutmeg, and optional rosemary.



Bring the mixture to a boil over medium-high heat, then reduce heat to medium-low. Cook, stirring occasionally, until the cranberries have popped and the mixture has thickened, about 5 to 10 minutes.










Instant Pot Method



Turn on the Sauté function. Combine the cranberries, honey, 1⁄2 cup water, orange zest and juice, cinnamon, cloves, nutmeg, and optional rosemary.



Bring the mixture to a boil. Cook, stirring occasionally, until the cranberries have popped and the mixture has thickened, about 5 to 10 minutes.





















What to Do With Leftover Cranberry Sauce




Here are 5 ideas to do with your leftover cranberry sauce:

Freeze it for the next holiday. If you wrap it tightly, it can last in the freezer for 6 months and rewarms quite well.
Use it on a deli sandwich or pressed into a panini with leftover roasted turkey , smoked Gouda cheese, and argula.
Add it as a layer in our 4 ingredient Turkey Stuffing Casserole or Chicken and Stuffing Casserole .
Make Pan Seared Pork Chops and serve it on the side.
Smear it on toast with a drizzle of honey on top. (Tip: Sometimes I add cream cheese and then the cranberry sauce on my toast. Yum!)













How to Serve Cranberry Sauce



Cranberry sauce is normally served as a small side dish along with a savory meat like turkey or ham, especially at a holiday table.



Serve up our cranberry orange sauce alongside one of these delicious main dishes.



Holiday Ham with Cranberry-Orange Glaze








Roasted Turkey Breast








Maple Glazed Pork Loin



Or try Instant Pot Pork Loin .

























Ultimate No-Fuss Thanksgiving Guide




We’ve created a one-stop shop for all of your thanksgiving needs!
Our guide includes simple recipes, fun activities for the whole family, ideas for leftovers, and more.
Thanksgiving Guide




















FAQs













Can you freeze cranberry sauce? You can definitely freeze homemade cranberry sauce! In fact, we double the recipe at Thanksgiving and freeze half for Christmas! To freeze your sauce, let it cool completely and then seal and freeze it in a freezer bag, a freezer container with lid, or a mason jar (leave 1-inch of headroom at the top). When you’re ready to use it later, let the cranberry sauce thaw in the refrigerator or use one of these 3 safe ways to defrost it . Warm it up over low heat on the stovetop or in the slow cooker or warm in 30 second increments in the microwave. How far in advance can you make cranberry sauce? You can make cranberry sauce ahead of time and store it for several days or even weeks, depending on how you plan to store it and your preferences. Here are your options for making it in advance: Refrigerator : Make it up to 2-4 days before serving, store in an airtight container, and keep chilled in the fridge. (Keep in mind, cranberry sauce typically thickens as it cools.) Freezer : Cranberry sauce can be frozen for up to 2-3 months. Cool compeltely and then freeze in an airtight, freezer-safe container or freezer bag. Thaw it in the refrigerator when you’re ready to use it. When you’re ready to use it later, warm it up over low heat on the stovetop or in the slow cooker or warm in 30 second increments in the microwave. How much cranberry sauce per person? On average, estimate about 1/4 to 1/3 cup (2-3 ounces) of cranberry sauce per person as a general guideline for a traditional Thanksgiving or holiday meal. Feel free to make more if you have a crowd of cranberry sauce enthusiasts, though. Can you use frozen cranberries to make cranberry sauce? Yes, you can use frozen cranberries instead of fresh to make homemade cranberry sauce. There’s really no textural or flavor difference. Is cranberry sauce good for you? Cranberry sauce can be good for you, especially if you make it yourself. Canned cranberries is highly processed and contains a lot of sugar. But, our homemade Cranberry Orange Sauce is one of the healthier recipes you’ll find on the internet. It includes fresh, antioxidant-rich, and fiber-rich cranberries, fresh orange juice and zest, anti-inflammatory pantry seasonings like cinnamon, and all-natural honey. We don’t overdo the sweetener like many recipes. We also don’t cook it for long, so the cranberries retain more nutrients. How long does homemade cranberry sauce last? If you’re storing cranberry sauce in the refrigerator, it will last for 1-2 weeks, although I personally think it tastes best within the first few days. You can freeze it for up to 6-9 months in an air-tight container.














More Holiday Dishes You’ll Love




























Instant Pot Mashed Potatoes
































Homemade Stuffing
































Bacon Wrapped Green Beans
































Pumpkin Dump Cake






















From my family to yours, I hope you enjoy this beautiful, aromatic, and EASY side dish at your next holiday meal.




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









Cranberry Orange Sauce




This cranberry sauce with fresh orange juice is made with all real food ingredients, comes together in just 10 minutes, and can be frozen ahead of time. So delicious!








Yield: 2 cups (6 servings)







Prep: 5 minutes Cook: 5 minutes Total: 10 minutes












Print Recipe

Rate



Pin for Later






Email













Units:

US M









Ingredients







12 -ounce bag of fresh cranberries, rinsed and sorted (sub: frozen cranberries)
1/2 cup honey
Zest of 1 medium orange (about 1 teaspoon )
1 tablespoon freshly squeezed orange juice
1/4 teaspoon cinnamon
Pinch of ground cloves
Pinch of ground nutmeg
1 teaspoon fresh, finely minced rosemary (optional)











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:
Stovetop Method:

In a medium saucepan, combine the cranberries, honey, 1/2 cup water, orange zest and juice, cinnamon, cloves, nutmeg, and optional rosemary.
Bring the mixture to a boil over medium-high heat, then reduce heat to medium-low.
Cook, stirring occasionally, until the cranberries have popped and the mixture has thickened, about 5 to 10 minutes.

Instant Pot Method:

Add the cranberries, honey, 1⁄2 cup water, orange zest and juice, cinnamon, cloves, nutmeg, and optional rosemary to the Instant Pot.
Turn on the Sauté function. Bring the mixture to a boil.
Cook, stirring occasionally, until the cranberries have popped and the mixture has thickened, about 5 to 10 minutes.

Freeze For Later: Let sauce cool completely. Seal and freeze in a freezer bag or freezer container with lid. Seal and freeze.
Prepare From Frozen: Thaw in the refrigerator. Warm gently over low heat on the stove, in a crock pot, or in the microwave.












Notes/Tips


On average, estimate about 1/4 to 1/3 cup (2-3 ounces) of cranberry sauce per person as a general guideline for a traditional Thanksgiving or holiday meal.
If you’re storing cranberry sauce in the refrigerator, it will last for 1-2 weeks, although I personally think it tastes best within the first few days.
You can freeze it for up to 6-9 months in an air-tight container.
This sauce is not super sweet. If you like yours sweeter, feel free to add more honey at the end, stir, and taste.


 
 









(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 or Instant Pot








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();
}
});
}());

(function(){
var buttonClass = 'tasty-recipes-convert-button',
buttonActiveClass = 'tasty-recipes-convert-button-active',
buttons = document.querySelectorAll('.tasty-recipes-convert-button');
if ( ! buttons ) {
return;
}
buttons.forEach(function(button){
button.addEventListener('click', function(event){
event.preventDefault();
var recipe = event.target.closest('.tasty-recipes');
if ( ! recipe ) {
return;
}
var otherButtons = recipe.querySelectorAll('.' + buttonClass);
otherButtons.forEach(function(bt){
bt.classList.remove(buttonActiveClass);
});
button.classList.add(buttonActiveClass);
var unitType = button.dataset.unitType;
var d