qutebrowser/tests/end2end/data/downloads/mhtml/complex/script.js
Florian Bruhin 64d4c9f83e Clean up end2end test file structure
This renames tests/integration to tests/end2end and moves some files to
tests/end2end/fixtures.
2016-05-29 18:20:00 +02:00

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 = "";
}
}