Some uses of js scripts

JS Violence No Alert Window

// 禁止alert弹窗。 防止错误提醒

 window.alert = function() { 

     return false;
}

The above figure is wrong, the code is updated every 10 seconds because it is used to test future modifications and one second equals 1,000 ms

Auto Refresh Script

setTimeout(function(){
window.location.reload();//刷新当前页面.
},10000)//设置时间为10秒,1000毫秒等于1秒

 

Supplements window.location.reload();//update current page.parent.localization.reload()/upgrading father objects (for frames)

 

20 minutes to refresh and click for extra time

// ==UserScript==
// @name kali
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://tryhackme.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';

var button = document.getElementById("add-vm-time");
//每秒执行一次,若按钮状态为可用,进行点击
setInterval(function() {
if (button.disabled == false) {
button.click();

}
},
1800000);
setTimeout('window.location.reload();',1200000);
//window.location.reload(); //指定20分钟刷新一次
// Your code here...
})();

未经允许不得转载:萌萌Apprentissage » Some uses of js scripts

Like (0) 打赏

Comments 0

Protected with IP Blacklist CloudIP Blacklist Cloud
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

//下一个脚本特效
//下一个脚本