Discover ways to cook dinner frozen shrimp on the stovetop in 10 minutes! You’ll get completely juicy, seasoned shrimp able to function an appetizer or entree.
Watching that bag of frozen shrimp and don’t know what to do with it? Nicely, you’re in the suitable place! I’m sharing my fool-proof methodology for cooking frozen shrimp on the range. (And thaw it beforehand!)
Shrimp is a unbelievable protein as a result of it’s wholesome, fast to cook dinner, and shops nicely within the freezer. It’s additionally extremely versatile. I can flip my frozen shrimp into a fast appetizer, toss it into pasta, and even use it to construct a flavorful rice bowl.
With my easy ideas and cooking methodology, you’ll have juicy, tender, sautéed shrimp on the desk very quickly.
Thaw the Shrimp First
It’s greatest to thaw the shrimp earlier than cooking it to keep away from rubbery, overcooked shrimp. Rubbery shrimp occurs whenever you cook dinner fish from frozen, and the outer layer begins cooking earlier than the within has totally thawed. In consequence, the surface can grow to be overcooked by the point the within is completed.
The easiest way to thaw frozen uncooked shrimp is to put them within the fridge for 12 hours to permit them to defrost. When you don’t have these further hours readily available, although, don’t fear! Right here’s my fast methodology for defrosting shrimp:
- Place the shrimp in a big bowl of chilly water.
- Set a timer for quarter-hour and stir the bowl each 5 minutes to interrupt up clumps that freeze collectively. The shrimp needs to be defrosted in about 15 to twenty minutes, relying on the scale of the shrimp (bigger shrimp can take as much as 20 minutes).
- Pat the thawed shrimp dry. That is vital; in any other case, the shrimp will steam as an alternative of cooking (except you intend to boil or steam them).
What Components Are Wanted
Whereas I really like making quite a lot of shrimp dishes and cooking shrimp in numerous methods (as I’ll focus on afterward), typically it’s greatest to return to the fundamentals. For my traditional frozen shrimp recipe, I take advantage of the next predominant elements:
- Frozen shrimp (thawed): I take advantage of medium, frozen, deveined shrimp (which implies the principle central vein is eliminated). You should use both tail-on or peeled shrimp!
- Smoked paprika: I personally love utilizing smoked paprika for this shrimp recipe. It offers the shrimp an additional layer of taste and provides some spice to the dish. If I don’t have smoked paprika readily available, I can all the time go for commonplace paprika as an alternative.
- My traditional seasoning combination: I mix garlic powder, onion powder, cumin, and kosher salt to create a savory, earthy taste profile.
- Butter: Butter provides richness when cooking shrimp. You too can substitute the butter with olive oil, if desired, for dietary wants or taste desire.
See the checklist of full elements with actual quantities within the recipe card under.
Time to Get Cooking
As soon as the shrimp are thawed and also you’ve gathered all of the elements, it’s time to begin sautéing them on the stovetop. Right here’s a step-by-step walkthrough of completely cook dinner frozen shrimp:
- Place the shrimp in a big bowl of very chilly water for quarter-hour, stirring each 5 minutes to interrupt up clumps that freeze collectively. (After quarter-hour, rinse off any remaining ice.)
- Pat the shrimp fully dry. In a medium bowl, combine the shrimp with the salt, smoked paprika, garlic powder, onion powder, and cumin.
- In a big skillet, warmth the butter on medium-high warmth. Add the shrimp and cook dinner for 1-2 minutes per facet till simply opaque and cooked by way of.
- Spritz with lemon juice from the wedges and serve instantly.
Dietary Notes
This frozen shrimp recipe is pescatarian and dairy-free with olive oil.
Featured 5-Star Assessment
⭐⭐⭐⭐⭐
“This was the perfect shrimp recipe! Really easy, fast & scrumptious!”
– Valorie
20 Extra Methods to Cook dinner Frozen Shrimp
Whereas my primary cooking recipe is nice, I like to vary issues up and get inventive with shrimp recipes in my kitchen. Listed below are all my favourite cooking strategies and methods to arrange shrimp to make a scrumptious, wholesome, seafood-inspired entree or appetizer.
Right here’s a recipe that knocked us off our ft: and it sounds deceptively easy. However this actually is the right sauteed shrimp…and it takes simply 3 minutes to cook dinner! It’s straightforward as soon as you understand a number of tips on how lengthy to cook dinner shrimp and season it.
Right here’s a enjoyable solution to cook dinner shrimp with out all the effort of a shrimp boil: strive Outdated Bay Steamed Shrimp! Fact be advised, this methodology is a mix of boiling and steaming: nevertheless it leads to fantastically succulent, seasoned shrimp. Get this: the cook dinner time is barely 2 to three minutes!
Why not strive baked shrimp within the oven? This methodology is so straightforward and the shrimp come out juicy and completely seasoned with garlic and herbs. Transfer over, shrimp recipes! This one is the right wholesome, quick and straightforward dinner.
Grilled shrimp is likely one of the quickest and best methods to cook dinner this tasty shellfish. The one half that takes time is preheating the grill! Thaw your frozen shrimp when you preheat, then grill them up with this good seasoning mix.
Broiled Shrimp is out of this world good. It's tender, juicy, and so quick to cook dinner. You don’t even have to preheat the oven! It’s completely seasoned with garlic and lemon.
Shrimp are one of many easiest paths to a quick and straightforward dinner, and this Cajun Shrimp recipe makes them style irresistible in minutes. Toss these infants with slightly Cajun seasoning and sauté them up in a skillet. The flavour is so savory, garlicky and irresistible, you’ll hardly consider the prep time: it takes solely 5 minutes to place collectively!
The preferred manner to make use of boiled shrimp is for shrimp cocktail, however you can boil it for any sort of preparation. The benefit of boiling? It retains nicely at room temperature, making it good to take a seat out on a platter of shrimp cocktail whereas entertaining.
There’s nothing just like the candy savory mixture of honey garlic glaze and juicy shrimp. The perfect half? It takes 10 minutes to make. This one is hits all of the comforting, satisfying dinner notes with a lightning quick prep velocity.
Right here’s an concept that has straightforward weeknight meal written throughout it: pesto shrimp! Seems this vivid inexperienced, garlicky sauce is the right pairing for this succulent shellfish. Serve with noodles or rice and sauteed veggies or a salad.
Shrimp, butter, garlic, lemon, and white wine: what could possibly be higher? Sure, it’s the Italian American shrimp scampi, a traditional that’s been stealing hearts and minds for many years. Juicy, garlicky shrimp swim in a wealthy, tangy butter sauce. Sop it up with crusty bread, or pour it over pasta: both manner, it’s divine.
What’s higher than shrimp tacos? Their carefree vibe makes any dinner extra festive, even when it’s simply any outdated Tuesday. What we love about this straightforward shrimp taco recipe is that it’s each quick household dinner recipe for weeknights and entertaining.
Need a meal to impress…with slightly kick? Attempt Shrimp Fra Diavolo! This Italian-style dish stars tender shrimp that swim in a garlicky, spicy tomato sauce. “Fra diavolo” interprets to “brother satan” in Italian, alluding to the extreme warmth of this dish. However make it selfmade and you’ll customise the spiciness to your style!
Searching for a straightforward, tasty 30 minute meal that’s successful each time? Attempt these traditional Shrimp Fajitas! This Tex Mex favourite is a recipe for dinnertime success. The fajita veggies are seasoned to perfection, and the shrimp are juicy and buttery.
Right here’s our new favourite solution to cook dinner it: Cilantro Lime Shrimp! This recipe takes solely 10 minutes to make and comes out fantastically tangy and recent! It pairs completely with Mexican-style flavors: strive with refried beans, rice, in tacos, or with chips and salsa.
Searching for a enjoyable, flavorful solution to eat frozen shrimp for dinner? Do that BBQ Shrimp recipe! This fast and straightforward methodology makes a daring, tangy sauce for the shrimp to swim in, flavored with barbecue sauce and some extras. It’s the right quick dinner for nights the place you don’t wish to suppose too arduous, and also you may have already got lots of the elements readily available.
A meal in a sheet pan by no means actually will get outdated, does it? Introducing the Mediterranean Sheet Pan Shrimp dinner! Mix juicy shrimp with colourful Mediterranean veggies like cherry tomatoes and tangy artichoke, then high it off with a squeeze of lemon and a hearty sprinkle of feta cheese. Serve with orzo, couscous or rice and it’s an explosion of taste in your plate.
Searching for a wholesome and straightforward weeknight meal? Attempt shrimp and broccoli! The pair are cooked with soy sauce and and rice vinegar till vivid and savory. The distinction of the crisp tender broccoli in opposition to the juicy shrimp is absolutely one thing.
Right here’s a go-to within the quick and straightforward dinner class: shrimp stir fry! It’s fast to place collectively and the umami-packed stir fry sauce is stuffed with irresistible taste. Add your favourite greens to make a super-satisfying dinner that pleases everybody across the desk.
Right here’s an irresistible recipe you’ll wish to make time and again…this Shrimp Rice Bowl! It acquired 5 stars in our home. Combine up a batch of cilantro lime rice, then high it with tender shrimp and a fast black bean and corn salad. This better part is a creamy, zingy chipotle ranch dressing that covers all of it.
There’s one thing about baking up dinner on one pan within the oven that by no means will get outdated. And these Sheet Pan Shrimp Fajitas are good for a straightforward weeknight meal! This Tex Mex favourite is much more enjoyable on a sheet pan. The shrimp comes out juicy and succulent, and every part is infused with an irresistible mixture of spices.
Right here’s a solution to cook dinner shrimp that you just’ll end up coming again to time and again: blackened shrimp! Blackening is a Cajun cooking approach that’s all concerning the spices. Mix selfmade blackened seasoning with grilled or pan-fried shrimp, and also you’ve acquired a mixture of savory, natural, and salty flavors that makes it excessive irresistible!
Tips on how to Cook dinner Frozen Shrimp
Cooking frozen shrimp is less complicated than you suppose! With my fool-proof methodology, you’ll have juicy, tender, and completely sautéed shrimp able to serve in lower than 10 minutes.
- Prep Time: 5 minutes
- Cook dinner Time: 5 minutes
- Whole Time: 10 minutes
- Yield: 4
- Class: Primary dish
- Methodology: Sauteed
- Delicacies: Seafood
- Weight loss plan: Gluten Free
Components
- 1 ½ kilos medium frozen shrimp, deveined (tail on or peeled)
- ¾ teaspoon kosher salt
- ¾ teaspoon smoked paprika (or substitute commonplace paprika)
- ¾ teaspoon garlic powder
- ¾ teaspoon onion powder
- ¾ teaspoon cumin
- 3 tablespoons butter or olive oil
- 3 lemon wedges
- Recent cilantro or parsley, for garnish
Directions
- Place the shrimp in a giant bowl of very chilly water for quarter-hour, stirring each 5 minutes to interrupt up clumps that freeze collectively. (After quarter-hour, rinse off any remaining ice.)
- Pat the shrimp fully dry.
- In a medium bowl, combine the shrimp with the salt, smoked paprika, garlic powder, onion powder, and cumin.
- In a big skillet, warmth the butter on medium-excessive warmth. Add the shrimp and cook dinner for 1 to 2 minutes per facet till simply opaque and cooked by way of.
- Spritz with juice from the lemon wedges and serve instantly.
(operate(){
window.addEventListener( ‘message’, operate( occasion ){
if ( ( ‘https://nutrifox.com’ !== occasion.origin && ‘https://nutrifox.take a look at’ !== occasion.origin ) ||
typeof occasion.information !== ‘string’ ) {
return;
}
var payload = JSON.parse( occasion.information );
swap ( payload.occasion ) {
case ‘setHeight’:
var iframe = doc.getElementById( ‘nutrifox-label-‘ + payload.recipeId );
iframe.type.peak = payload.peak + ‘px’;
break;
}
} );
}());
window.trCommon={«minRating»:6,»ajaxurl»:»https://www.acouplecooks.com/wp-admin/admin-ajax.php»,»ratingNonce»:»»,»postId»:132222};
window.TastyRecipes = window.TastyRecipes || {};
window.TastyRecipes.smoothScroll = {
init() {
window.addEventListener( ‘click on’, e => {
let anchor = e.goal;
if ( ! anchor.classList.incorporates( ‘tasty-recipes-scrollto’ ) ) {
if ( anchor.tagName === ‘A’ ) {
return;
}
anchor = anchor.closest( ‘a’ );
if ( ! anchor || ! anchor.classList.incorporates( ‘tasty-recipes-scrollto’ ) ) {
return;
}
}
const elementHref = anchor.getAttribute( ‘href’ );
if ( ! elementHref ) {
return;
}
e.preventDefault();
this.goToSelector( elementHref );
});
},
goToSelector( selector ) {
const ingredient = doc.querySelector( selector );
if ( ! ingredient ) {
return;
}
ingredient.scrollIntoView( { habits: ‘easy’ } );
historical past.pushState( {}, », selector );
}
};
(operate( callback ) {
if ( doc.readyState !== ‘loading’ ) {
callback();
} else {
window.addEventListener( ‘load’, callback );
}
})(() => {
window.TastyRecipes.smoothScroll.init();
});
window.TastyRecipes = window.TastyRecipes || {};
window.TastyRecipes.cookMode = {
wakeLockApi: false,
wakeLock: false,
cookModeSelector: ‘.tasty-recipes-cook-mode’,
init() {
if («wakeLock» in navigator && «request» in navigator.wakeLock) {
this.wakeLockApi = navigator.wakeLock;
}
const cookModes = doc.querySelectorAll(this.cookModeSelector);
if (cookModes.size > 0) {
for (const cookMode of cookModes) {
if (this.wakeLockApi) {
cookMode.querySelector(‘enter[type=»checkbox»]’).addEventListener(«change», occasion => {
this.checkboxChange(occasion.goal);
}, false);
} else {
cookMode.type.show = «none»;
}
}
}
},
checkboxChange(checkbox) {
if (checkbox.checked) {
this.lock();
} else {
this.unlock();
}
},
setCheckboxesState(state) {
const checkboxes = doc.querySelectorAll(this.cookModeSelector + ‘ enter[type=»checkbox»]’);
for (const checkbox of checkboxes) {
checkbox.checked = state;
}
},
async lock() {
strive {
this.wakeLock = await this.wakeLockApi.request(«display screen»);
this.wakeLock.addEventListener(«launch», () => {
this.wakeLock = false;
this.setCheckboxesState(false);
});
this.setCheckboxesState(true);
} catch (error) {
this.setCheckboxesState(false);
}
},
unlock() {
if (this.wakeLock) {
this.wakeLock.launch();
this.wakeLock = false;
}
this.setCheckboxesState(false);
}
};
(operate(callback) {
if (doc.readyState !== «loading») {
callback();
} else {
doc.addEventListener(«DOMContentLoaded», callback);
}
})(() => {
window.TastyRecipes.cookMode.init();
});
window.TastyRecipes = window.TastyRecipes || {};
window.TastyRecipes.staticTooltip = {
ingredient: null,
tooltipElement: null,
deleting: false,
init( ingredient ) {
if ( this.deleting ) {
return;
}
this.ingredient = ingredient;
this.buildElements();
},
destroy() {
if ( ! this.tooltipElement || this.deleting ) {
return;
}
this.deleting = true;
this.tooltipElement.classList.take away( ‘opened’ );
setTimeout( () => {
this.tooltipElement.take away();
this.deleting = false;
}, 500 );
},
buildElements() {
const tooltipElement = doc.createElement( ‘div’ );
tooltipElement.classList.add( ‘tasty-recipes-static-tooltip’);
tooltipElement.setAttribute( ‘id’, ‘tasty-recipes-tooltip’ );
const currentTooltipElement = doc.getElementById( ‘tasty-recipes-tooltip’ );
if ( currentTooltipElement ) {
doc.physique.replaceChild( tooltipElement, currentTooltipElement );
} else {
doc.physique.appendChild( tooltipElement );
}
this.tooltipElement = doc.getElementById( ‘tasty-recipes-tooltip’ );
},
present() {
if ( ! this.tooltipElement ) {
return;
}
const tooltipTop = this.ingredient.getBoundingClientRect().high
+ window.scrollY
– 10 // 10px offset.
– this.tooltipElement.getBoundingClientRect().peak;
const tooltipLeft = this.ingredient.getBoundingClientRect().left
– ( this.tooltipElement.getBoundingClientRect().width / 2 )
+ ( this.ingredient.getBoundingClientRect().width / 2 ) – 1;
const posLeft = Math.max( 10, tooltipLeft );
this.maybeRemoveTail( posLeft !== tooltipLeft );
this.tooltipElement.setAttribute( ‘type’, ‘high:’ + tooltipTop + ‘px;left:’ + posLeft + ‘px;’ );
this.tooltipElement.classList.add( ‘opened’ );
},
maybeRemoveTail( removeTail ) {
if ( removeTail ) {
this.tooltipElement.classList.add( ‘tr-hide-tail’ );
} else {
this.tooltipElement.classList.take away( ‘tr-hide-tail’ );
}
},
changeMessage( message ) {
if ( ! this.tooltipElement ) {
return;
}
this.tooltipElement.innerHTML = message;
}
};
window.TastyRecipes.ajax = {
sendPostRequest( url, information, success, failure ) {
const xhr = new XMLHttpRequest();
xhr.open( ‘POST’, url, true );
xhr.ship( this.preparePostData( information ) );
xhr.onreadystatechange = () => {
if ( 4 !== xhr.readyState ) {
return;
}
if ( xhr.standing === 200 ) {
success( JSON.parse( xhr.responseText ) );
return;
}
failure( xhr );
};
xhr.onerror = () => {
failure( xhr );
};
},
preparePostData( information ) {
const formData = new FormData();
for ( const key in information ) {
formData.append( key, information[key] );
}
return formData;
},
};
window.TastyRecipes.scores = {
defaultRating: 0,
currentRatingPercentage: 100,
savingRating: false,
init( minRating ) {
this.minRating = minRating;
this.formWatchRating();
this.closeTooltipWhenClickOutside();
this.addBodyClassBasedOnSelectedRating();
this.backwardCompFormRatingPosition();
},
formWatchRating() {
const scores = doc.querySelectorAll(‘.tasty-recipes-no-ratings-buttons [data-rating]’);
if ( scores.size {
occasion.preventDefault();
this.defaultRating = occasion.goal.closest( ‘.checked’ ).dataset.ranking;
this.setCheckedStar( occasion.goal );
this.maybeSendRating( this.defaultRating, occasion.goal );
this.setRatingInForm( this.defaultRating );
} );
}
},
closeTooltipWhenClickOutside() {
window.addEventListener( ‘click on’, e => {
// Bailout (do not take away the tooltip) when the clicked ingredient is a ranking star, or it is the tooltip itself.
if ( e.goal.closest( ‘.tasty-recipes-rating’ ) || e.goal.classList.incorporates( ‘tasty-recipes-static-tooltip’ ) ) {
return;
}
window.TastyRecipes.staticTooltip.destroy();
} );
},
setRatingInForm( ranking ) {
const ratingInput = doc.querySelector( ‘#reply .tasty-recipes-rating[value=»‘ + rating + ‘»]’ );
if ( ! ratingInput ) {
return;
}
ratingInput.click on();
},
addBodyClassBasedOnSelectedRating() {
const ratingInputs = doc.querySelectorAll( ‘enter.tasty-recipes-rating’ );
if ( ! ratingInputs ) {
return;
}
for ( const ratingInput of ratingInputs ) {
ratingInput.addEventListener( ‘click on’, currentEvent => {
const selectedRating = currentEvent.goal.getAttribute( ‘worth’ );
this.handleBodyClassByRating( selectedRating );
this.toggleCommentTextareaRequired( selectedRating );
} );
}
},
handleBodyClassByRating( ranking ) {
if ( ranking < this.minRating ) {
doc.physique.classList.take away( 'tasty-recipes-selected-minimum-rating' );
return;
}
doc.physique.classList.add( 'tasty-recipes-selected-minimum-rating' );
},
toggleCommentTextareaRequired( ranking ) {
const commentTextarea = doc.getElementById( 'remark' );
if ( ! commentTextarea ) {
return;
}
if ( ranking {
window.TastyRecipes.staticTooltip.changeMessage( response.information.message );
window.TastyRecipes.staticTooltip.present();
this.updateAverageText( response.information, recipeCardElement );
this.maybeFillCommentForm( response.information );
// Conceal the tooltip after 5 seconds.
setTimeout( () => {
this.maybeResetTooltip( recipeCardElement, response.information, ranking );
}, 5000 );
},
() => {
this.resetTooltip( recipeCardElement );
}
);
},
updateAverageText( information, recipeCardElement ) {
if ( ! information.common ) {
return;
}
this.setRatingPercent( information );
if ( ! information.rely ) {
return;
}
const quickLink = doc.querySelector( ‘.tasty-recipes-rating-link’ );
if ( quickLink ) {
this.setTextInContainer( quickLink, information );
this.setPartialStar( quickLink );
}
const cardStars = recipeCardElement.querySelector( ‘.tasty-recipes-ratings-buttons’ );
cardStars.dataset.trDefaultRating = information.common;
this.setTextInContainer( recipeCardElement.querySelector( ‘.tasty-recipes-rating’ ), information );
},
setTextInContainer( container, information ) {
if ( ! container ) {
return;
}
if ( information.label ) {
const ratingLabelElement = container.querySelector( ‘.rating-label’ );
if ( ratingLabelElement ) {
ratingLabelElement.innerHTML = information.label;
}
return;
}
const averageElement = container.querySelector( ‘.common’ );
if ( averageElement ) {
averageElement.textContent = information.common;
}
const countElement = container.querySelector( ‘.rely’ );
if ( countElement ) {
countElement.textContent = information.rely;
}
},
setPartialStar( container ) {
const highestStar = container.querySelector( ‘[data-rating=»‘ + Math.ceil( this.defaultRating ) + ‘»]’ );
if ( highestStar ) {
highestStar.dataset.trClip = this.currentRatingPercentage;
}
},
setRatingPercent( information ) {
this.defaultRating = information.common.toFixed( 1 );
const elements = information.common.toFixed( 2 ).toString().cut up( ‘.’ );
this.currentRatingPercentage = elements[1] ? elements[1] : 100;
if ( this.currentRatingPercentage === ’00’ ) {
this.currentRatingPercentage = 100;
}
},
setCheckedStar( goal ) {
const cardRatingContainer = goal.closest( ‘.tasty-recipes-ratings-buttons’ );
const selectedRatingElement = cardRatingContainer.querySelector( ‘[data-tr-checked]’ );
if ( selectedRatingElement ) {
delete selectedRatingElement.dataset.trChecked;
}
const thisStar = goal.closest( ‘.tasty-recipes-rating’ );
thisStar.dataset.trChecked = 1;
thisStar.querySelector( ‘[data-tr-clip]’ ).dataset.trClip = 100;
},
maybeFillCommentForm( information ) {
if ( ! information.remark || ! information.remark.content material ) {
return;
}
const commentForm = doc.querySelector( ‘#commentform’ );
if ( ! commentForm ) {
return;
}
const commentBox = commentForm.querySelector( ‘[name=comment]’ );
if ( ! commentBox || commentBox.worth ) {
return;
}
// Add remark particulars for modifying.
commentBox.innerHTML = information.remark.content material;
if ( information.remark.identify ) {
commentForm.querySelector( ‘[name=author]’ ).worth = information.remark.identify;
commentForm.querySelector( ‘[name=email]’ ).worth = information.remark.e mail;
}
},
maybeResetTooltip( recipeCardElement, information, ranking ) {
if ( this.savingRating === ranking ) {
this.resetTooltip( recipeCardElement, information );
}
},
resetTooltip( recipeCardElement, information ) {
window.TastyRecipes.staticTooltip.destroy();
this.savingRating = false;
// Reset the default ranking.
const cardRatingContainer = recipeCardElement.querySelector( ‘.tasty-recipes-ratings-buttons’ );
if ( cardRatingContainer ) {
this.defaultRating = ( information && information.common ) ? information.common.toFixed(1) : cardRatingContainer.dataset.trDefaultRating;
cardRatingContainer.dataset.trDefaultRating = this.defaultRating;
this.resetSelectedStar( cardRatingContainer, information );
}
},
resetSelectedStar( cardRatingContainer ) {
const selectedRatingElement = cardRatingContainer.querySelector( ‘[data-rating=»‘ + Math.ceil( this.defaultRating ) + ‘»]’ );
if ( selectedRatingElement ) {
selectedRatingElement.querySelector( ‘[data-tr-clip]’ ).dataset.trClip = this.currentRatingPercentage;
selectedRatingElement.parentNode.dataset.trChecked = 1;
}
const previousSelectedElement= cardRatingContainer.querySelector( ‘[data-tr-checked]’ );
if ( previousSelectedElement ) {
const currentSelectedRating = previousSelectedElement.querySelector(‘[data-rating]’);
if ( currentSelectedRating !== selectedRatingElement ) {
delete previousSelectedElement.dataset.trChecked;
}
}
},
backwardCompFormRatingPosition() {
const ratingsButtons = doc.querySelector( ‘#reply .tasty-recipes-ratings-buttons, #tasty-recipes-comment-rating .tasty-recipes-ratings-buttons’ );
if ( ! ratingsButtons ) {
return;
}
const ratingsButtonsStyles = window.getComputedStyle(ratingsButtons);
if ( ! ratingsButtonsStyles.show.contains( ‘flex’ ) ) {
ratingsButtons.type.course = ‘rtl’;
}
if ( typeof tastyRecipesRating !== ‘undefined’ ) {
// Choose the ranking that was beforehand chosen in admin.
ratingsButtons.querySelector( ‘.tasty-recipes-rating[value=»‘ + tastyRecipesRating + ‘»]’ ).checked = true;
}
const ratingSpans = ratingsButtons.querySelectorAll( ‘.tasty-recipes-rating’ );
for (const ratingSpan of ratingSpans) {
ratingSpan.addEventListener( ‘click on’, occasion => {
if ( ratingSpan === occasion.goal ) {
return;
}
ratingSpan.previousElementSibling.click on();
} );
}
}
};
(operate(callback) {
if (doc.readyState !== «loading») {
callback();
} else {
window.addEventListener( ‘load’, callback );
}
})(() => {
window.TastyRecipes.scores.init( window.trCommon ? window.trCommon.minRating : 4 );
});