1e52f459c9
The-Compiler wants a more beautiful test case since the old one was pretty weird and took lots of explaining at pytest demos, so I made a new one. This one is a bit nicer on the eye and - to say it with The-Compiler's words - has no "weird pixelated globe with the geocities-like background". To compensate for the globe I've put in some trivia facts so that - if you are one of the people that like to stare at test pages - you can always learn something.
14 lines
434 B
JavaScript
14 lines
434 B
JavaScript
if (typeof String.prototype.endsWith !== 'function') {
|
|
String.prototype.endsWith = function(suffix) {
|
|
return this.indexOf(suffix, this.length - suffix.length) !== -1;
|
|
};
|
|
}
|
|
window._keys = "";
|
|
document.onkeypress = function(evt) {
|
|
var e = evt || window.event;
|
|
window._keys += String.fromCharCode(e.charCode);
|
|
if (window._keys.endsWith("qute")) {
|
|
alert("It's just a qute browser!");
|
|
window._keys = "";
|
|
}
|
|
} |