User:Chaotic Enby/Unblock wizard.js: Difference between revisions
From Test Wiki
Content deleted Content added
Chaotic Enby (talk | contribs) why did i do this already |
Chaotic Enby (talk | contribs) check for emptiness |
||
| Line 262: | Line 262: | ||
afc.beforeUnload = function (e) { |
afc.beforeUnload = function (e) { |
||
var changedContent = false; |
|||
| ⚫ | |||
for (var [i, label] of questionLabels.entries()) { |
|||
if (ui.itemsInput[i].getValue() != "" && questionFields[label] != 2) { |
|||
changedContent = true; |
|||
} |
|||
if (ui.itemsInput[i].getValue() != "Yes." && questionFields[label] == 2) { |
|||
changedContent = true; |
|||
} |
|||
} |
|||
if(changedContent){ |
|||
| ⚫ | |||
} |
|||
e.returnValue = ''; |
e.returnValue = ''; |
||
return ''; |
return ''; |
||