blob: 69a44599b39c09861cf5867154cb5aca3e38711c [file] [log] [blame]
<!DOCTYPE html>
<!-- This file is intentionally malformed. -->
<html xmlns="http://www.w3.org/1999/xhtml">
<script>
<![CDATA[
var done = false;
var range = null;
function expandAndDeleteRange()
{
range = document.createRange();
range.expand("sentence");
range.deleteContents();
}
var repeat = 0;
function detach()
{
if (done)
return;
++repeat;
if (repeat >= 2) {
done = true;
document.removeEventListener("DOMSubtreeModified", listener, true);
window.parent.postMessage("done", "*");
return;
}
range.detach();
}
var firstCall = true;
function listener()
{
if (firstCall) {
firstCall = false;
expandAndDeleteRange();
} else
detach();
}
document.addEventListener("DOMSubtreeModified", listener, true);
document.addEventListener("DOMContentLoaded", expandAndDeleteRange);
]]>
</script>