function as google chrome bookmark

前端 未结 6 538
梦毁少年i
梦毁少年i 2020-11-30 21:03

Let me first say the problem I have: I need to fill in the same web page a lot of times, and the content that I need to fill in is for the biggest part the same, but is scat

6条回答
  •  爱一瞬间的悲伤
    2020-11-30 21:55

    You can use prompts and alerts and confirm windows, and I created a game, kind of. It's not that clean though. Here's the javascript-code:

    To the editor: there needs to be a "javascript:" at the start for it to work btw

    javascript: 
    var totalClicks = 0;
    for (var i = 0; i < 1000000; i++){
        var message1 = prompt("Clicker Game!\nClicks: "+totalClicks,"remove this text to end the game");
        totalClicks++;
        if (message1 !== "remove this text to end the game"){
            i = Math.Infinity;
        }
    }
    alert("Thanks for playing my game!\nClicks: "+totalClicks)
    

提交回复
热议问题