Moving Window Effect

Animate your popups. This script uses a loop of coordinate updates to make a popup window glide across the screen. Note: Only effective on popup windows, not main tabs.

Opens a popup that moves to the corner.

Copy the Script

<script>
// Place inside the POPUP window's code
var x = 0;
var y = 0;
function moveMe() {
    if(x < 500) {
        x += 5; 
        y += 2;
        window.moveTo(x, y);
        setTimeout(moveMe, 50);
    }
}
window.onload = moveMe;
</script>

Frequently Asked Questions

Modern browsers block scripts from moving the main browser window/tab to prevent malware-like behavior. This script only works on popup windows you open yourself.

Yes. You can adjust the millisecond delay in the setTimeout or setInterval function to speed up or slow down the movement.