Looking for an easy breakfast idea ? We love this easy Breakfast Egg Muffin recipe. It’s made with simple ingredients that you likely have in your kitchen. These make a fabulous, freezer-friendly breakfast. For sure worth a try!
Reasons You’ll Love this Recipe
Easy Breakfast Egg Muffins have been a reader favorite for a LONG time. Here is why:
They come together quickly.
Made from ingredients you likely have on hand.
They are budget-friendly.
Make-ahead breakfast .
Similar to our Spinach and Bacon Mini Quiche recipe, it’s super easy to include your kids in the preparation.
For many reasons, we think you are going to LOVE this recipe. Serve with some Cinnamon Toast made in the Oven for a divine meal!
Ingredients
Here are the main ingredients in Breakfast Egg Muffins.
Ingredient Notes:
Bread – This is a great way to use up stale bread.
Milk – You can use your milk of choice.
Tip: Let kiddos help with the assembly. They love it!
How to Freeze and Thaw Breakfast Egg Muffins
Freeze For Later: Bake according to instructions and let fully cool. Place muffins in a single layer in a gallon-sized freezer container or bag. Seal well, squeezing out excess air, and freeze.
Prepare From Frozen: Wrap a muffin in a moist paper towel and microwave in 30 seconds increments until heated through (about 1-2 minutes). Or thaw in the refrigerator and warm in the microwave.
FAQs
What variations can I make with Breakfast Egg Muffins? Try different combinations of vegetables (cooked), cheeses, and meats to create new flavors. You can also experiment with herbs and spices. Can I freeze Breakfast Egg Muffins? Yes. Bake according to instructions and let fully cool. Place muffins in a single layer in a gallon-sized freezer container or bag. Seal well, squeezing out excess air, and freeze. To reheat, wrap a muffin in a moist paper towel and microwave in 30 seconds increments until heated through (about 1-2 minutes). Or thaw in the refrigerator and warm in the microwave. Can I make Breakfast Egg Muffins in silicone liners? Yes. They will cook just fine when you use silicone muffin liners.
Make 6 Grab-and-Go Breakfasts 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!
More Breakfast Recipes
Egg-in-a-Hole: A Classic Breakfast Idea
Cheddar Chive Egg Bites
Bacon and Spinach Mini Quiches
Fluffy Egg Casserole with Bacon
Did you make this? Snap a photo and tag us on Instagram at @thrivinghome so we can see your creations and cheer you on!
★ ★ ★ ★ ★
4.8 from 32 reviews
Breakfast Egg Muffins
We love this easy Breakfast Egg Muffin recipe. It’s made with simple ingredients that you likely have in your kitchen. These make a fabulous, freezer friendly breakfast. For sure worth a try!
Yield: 12 muffins
Prep: 10 minutes Cook: 18 minutes Total: 28 minutes
Print Recipe
Rate
Pin for Later
Email
Units:
US M
Ingredients
3 – 4 pieces whole wheat bread, torn into small pieces (enough to fill muffin tins almost to top)
3 – 4 slices deli ham (look for preservative-free), chopped into bite-sized pieces
1 cup shredded cheddar cheese
8 large eggs
1 cup milk
2 teaspoons ground mustard
1/2 teaspoon ground pepper (or more or less to taste)
dried parsley, for garnish
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:
Preheat oven to 400°F. Grease a muffin tin very well or use a silicone muffin tin.
Drop bread pieces evenly in muffin tins until they come about 2/3 of the way up the tin.
Sprinkle ham pieces evenly in each tin.
Sprinkle cheese evenly in each tin.
Whisk together eggs, milk, ground mustard, and pepper.
Pour egg mixture evenly in each muffin tin.
Sprinkle a little dried parsley on the top of each one to add a pop of color.
Bake for 15-18 minutes or until golden brown on top and cooked through the middle.
Freeze For Later: Bake according to instructions and let fully cool. Place muffins in a single layer in a gallon-sized freezer container or bag. Seal well, squeezing out excess air, and freeze.
Prepare From Frozen: Wrap a muffin in a moist paper towel and microwave in 30 seconds increments until heated through (about 1-2 minutes). Or thaw in the refrigerator and warm in the microwave.
Notes/Tips
A great way to store these breakfast muffins in the fridge or freezer is in our favorite reusable freezer bags .
This is a great way to use up stale bread.
You can use your milk of choice.
Using silicone liners helps prevent sticking.
(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;
}
} );
}());
Nutrition Information
Serving Size: 1 muffin
© Author: Polly Conner
Cuisine:
American
Method:
Baking
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,.tasty-recipes-quick-links a.button{background-color:#f9f9f9;background-color:var(--tr-button-color,#f9f9f9);border:1px solid #aaa;border-color:var(--tr-button-color,#aaa);border-radius:0;color:#aaa;color:var(--tr-button-text-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-quick-links a.button{display:inline-block;margin-left:.625em;margin-right:.625em}.tasty-recipes-quick-links a.button+span{display:none}.tasty-recipes-entry-content .tasty-recipes-buttons a:hover,.tasty-recipes-image-button-container .tasty-recipes-buttons .button:hover,.tasty-recipes-quick-links a.button:hover{background-color:var(--tr-button-text-color,#aaa);color:var(--tr-button-color,#f9f9f9);text-decoration:none}.tasty-recipes-image-button-container .tasty-recipes-buttons .button:hover{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}}.tasty-recipe-responsive-iframe-container-36027616{position:relative;overflow:hidden;padding-top:56.25%}.tasty-recipe-responsive-iframe-container-36027616 iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:0}
body{ --tr-star-color:#32414e; }
.tasty-recipes-rating-solid.tasty-recipes-clip-10{-webkit-clip-path:polygon(0 0,10% 0,10% 100%,0 100%);clip-path:polygon(0 0,10% 0,10% 100%,0 100%)}.tasty-recipes-rating-solid.tasty-recipes-clip-20{-webkit-clip-path:polygon(0 0,20% 0,20% 100%,0 100%);clip-path:polygon(0 0,20% 0,20% 100%,0 100%)}.tasty-recipes-rating-solid.tasty-recipes-clip-30{-webkit-clip-path:polygon(0 0,30% 0,30% 100%,0 100%);clip-path:polygon(0 0,30% 0,30% 100%,0 100%)}.tasty-recipes-rating-solid.tasty-recipes-clip-40{-webkit-clip-path:polygon(0 0,40% 0,40% 100%,0 100%);clip-path:polygon(0 0,40% 0,40% 100%,0 100%)}.tasty-recipes-rating-solid.tasty-recipes-clip-50{-webkit-clip-path:polygon(0 0,50% 0,50% 100%,0 100%);clip-path:polygon(0 0,50% 0,50% 100%,0 100%)}.tasty-recipes-rating-solid.tasty-recipes-clip-60{-webkit-clip-path:polygon(0 0,60% 0,60% 100%,0 100%);clip-path:polygon(0 0,60% 0,60% 100%,0 100%)}.tasty-recipes-rating-solid.tasty-recipes-clip-70{-webkit-clip-path:polygon(0 0,70% 0,70% 100%,0 100%);clip-path:polygon(0 0,70% 0,70% 100%,0 100%)}.tasty-recipes-rating-solid.tasty-recipes-clip-80{-webkit-clip-path:polygon(0 0,80% 0,80% 100%,0 100%);clip-path:polygon(0 0,80% 0,80% 100%,0 100%)}.tasty-recipes-rating-solid.tasty-recipes-clip-90{-webkit-clip-path:polygon(0 0,90% 0,90% 100%,0 100%);clip-path:polygon(0 0,90% 0,90% 100%,0 100%)}.tasty-recipes-rating-outline{display:inline-block;height:1em;line-height:1;width:1em}.tasty-recipes-rating-outline.tasty-recipes-clip-0 svg{fill:url(#tasty-recipes-clip-0)}.tasty-recipes-rating-outline.tasty-recipes-clip-10 svg{fill:url(#tasty-recipes-clip-10)}.tasty-recipes-rating-outline.tasty-recipes-clip-20 svg{fill:url(#tasty-recipes-clip-20)}.tasty-recipes-rating-outline.tasty-recipes-clip-30 svg{fill:url(#tasty-recipes-clip-30)}.tasty-recipes-rating-outline.tasty-recipes-clip-40 svg{fill:url(#tasty-recipes-clip-40)}.tasty-recipes-rating-outline.tasty-recipes-clip-50 svg{fill:url(#tasty-recipes-clip-50)}.tasty-recipes-rating-outline.tasty-recipes-clip-60 svg{fill:url(#tasty-recipes-clip-60)}.tasty-recipes-rating-outline.tasty-recipes-clip-70 svg{fill:url(#tasty-recipes-clip-70)}.tasty-recipes-rating-outline.tasty-recipes-clip-80 svg{fill:url(#tasty-recipes-clip-80)}.tasty-recipes-rating-outline.tasty-recipes-clip-90 svg{fill:url(#tasty-recipes-clip-90)}.tasty-recipes-rating-outline.tasty-recipes-clip-100 svg{fill:url(#tasty-recipes-clip-100)}.comment-content .tasty-recipes-rating-outline.tasty-recipes-clip-100 svg{fill:currentColor}.tasty-recipes,.tasty-recipes-ratings{--tr-star-size:18px;--tr-star-margin:0px}.tasty-recipes-rating,.tasty-recipes-ratings-buttons{color:#f2b955;color:var(--tr-star-color,#f2b955)}.tasty-recipes-comment-form{border:none;margin:0;padding:0}.tasty-recipes-entry-header div.tasty-recipes-rating p,.tasty-recipes-rating-stars,.tasty-recipes-ratings,.tasty-recipes-ratings-buttons{display:inline-flex;font-size:1.1em;font-size:var(--tr-star-size);gap:.3em;gap:var(--tr-star-margin)}.tasty-recipes-entry-header div.tasty-recipes-rating p span.tasty-recipes-rating,.tasty-recipes-rating-stars span.tasty-recipes-rating,.tasty-recipes-ratings span.tasty-recipes-rating,.tasty-recipes-ratings-buttons span.tasty-recipes-rating{cursor:pointer;display:inline-block;font-size:1.1em;font-size:var(--tr-star-size);margin:0;width:1.1em;width:var(--tr-star-size)}.tasty-recipes-entry-header div.tasty-recipes-rating p{display:flex;justify-content:center}.tasty-recipes-ratings-buttons{flex-direction:row-reverse}.tasty-recipes-ratings-buttons input[type=radio]{clip:auto;display:inline-block!important;width:1.1em!important;width:var(--tr-star-size)!important}.tasty-recipes-ratings-buttons>span{position:relative}.tasty-recipes-ratings-buttons>span i{font-style:normal}.tasty-recipes-ratings-buttons>span .unchecked{display:inline-block}.tasty-recipes-ratings-buttons>input:checked~span .unchecked,.tasty-recipes-ratings-buttons>span .checked{display:none}.tasty-recipes-ratings-buttons>input:checked~span .checked{display:inline-block}@media only screen and (min-width:1024px){.tasty-recipes-ratings-buttons:not(:hover)>input:checked~span .unchecked,.tasty-recipes-ratings-buttons>:hover .unchecked,.tasty-recipes-ratings-buttons>:hover~span .unchecked{display:none}.tasty-recipes-ratings-buttons:not(:hover)>input:checked~span .checked,.tasty-recipes-ratings-buttons>:hover .checked,.tasty-recipes-ratings-buttons>:hover~span .checked{display:inline-block}}.tasty-recipes-ratings-buttons>input{cursor:pointer;height:100%;margin:0;margin-left:calc((var(--tr-star-size)+var(--tr-star-margin))*-1);opacity:0;position:relative;z-index:2}.tasty-recipes-rating a,.tasty-recipes-rating a:link{background:none;outline:none;text-decoration:none}.tasty-recipes-screen-reader{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.tasty-recipes-rating-link{align-items:center;display:inline-flex}.tasty-recipes-rating-link .rating-label{font-size:80%;padding-left:.4em}.tasty-recipes-selected-minimum-rating .comment-form-comment .required{display:none}.tasty-recipes-has-ratings{text-decoration:none!important}
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' );
const printButton = document.querySelector( '.tasty-recipes-print-button' );
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;
});
};
document.addEventListener( 'DOMContentLoaded', () => {
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

