mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 15:56:16 -04:00
try/catch to allow chef to run from prod file
This commit is contained in:
parent
2391e08ac1
commit
c01c076561
1 changed files with 11 additions and 6 deletions
|
@ -561,13 +561,18 @@ class RecipeWaiter {
|
||||||
this.ingredientChildRuleID = null;
|
this.ingredientChildRuleID = null;
|
||||||
|
|
||||||
// Find relevant rules in the stylesheet
|
// Find relevant rules in the stylesheet
|
||||||
for (const i in document.styleSheets[0].cssRules) {
|
// try/catch for chrome 64+ CORS error on cssRules.
|
||||||
if (document.styleSheets[0].cssRules[i].selectorText === ".ingredients") {
|
try {
|
||||||
this.ingredientRuleID = i;
|
for (const i in document.styleSheets[0].cssRules) {
|
||||||
}
|
if (document.styleSheets[0].cssRules[i].selectorText === ".ingredients") {
|
||||||
if (document.styleSheets[0].cssRules[i].selectorText === ".ingredients > div") {
|
this.ingredientRuleID = i;
|
||||||
this.ingredientChildRuleID = i;
|
}
|
||||||
|
if (document.styleSheets[0].cssRules[i].selectorText === ".ingredients > div") {
|
||||||
|
this.ingredientChildRuleID = i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// Do nothing.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue