20,741
edits
m (→The script: expose the regex solver via the UI) |
m (→The script: show error if not logged in while retrieving the wtachlist) |
||
Line 1,405: | Line 1,405: | ||
} | } | ||
catch (e) { | catch (e) { | ||
UI.alert( | UI.alert("Could not download wiki watchlist\n"+watchlist.error.info); | ||
} | } | ||
}); // download & populate watchlist | }); // download & populate watchlist | ||
Line 2,241: | Line 2,241: | ||
text += charset.charAt(Math.floor(Math.random() * charset.length)); | text += charset.charAt(Math.floor(Math.random() * charset.length)); | ||
return text; | return text; // "From:&(.*)$<.*8.*>" | ||
} | } | ||
Line 2,318: | Line 2,318: | ||
var regex = new RegExp(entity); | var regex = new RegExp(entity); | ||
var output = t.search( regex); | var output = t.search( regex); | ||
validExp = | validExp = 5; | ||
//if (output) validExp = 50; | |||
} | } | ||
catch(e) { | catch(e) { | ||
validExp = 2; | //validExp = 2; | ||
} | } | ||
Line 2,337: | Line 2,338: | ||
return fitness | return fitness + (1*validExp + 1* hasToken); | ||
}; | }; | ||
Line 2,513: | Line 2,514: | ||
UI.alert(e.message); | UI.alert(e.message); | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{Appendix}} | {{Appendix}} |