focus-spoofer

og

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// ==UserScript==
// @name        focus-spoofer
// @namespace   Vanishek Scripts
// @match       testportal.pl
// og
// @grant       none
// @version     1.0
// @author      Vanishek
// @description og
// @run-at        document-start
// ==/UserScript==
Function.prototype.clone = function() {
    var that = this;
    var temp = function temporary() {
        return that.apply(this, arguments);
    };
    for (var key in this) {
        if (this.hasOwnProperty(key)) {
            temp[key] = this[key];
        }
    }
    return temp;
};

let youtubevid = "https://youtube.com/"
const youtubeVid = () => {
alert(youtubevid);
}

document.addEventListener('DOMContentLoaded', (event) => {
  youtubeVid();
})

if (youtubevid !== "https://youtube.com/") {
    window.location.href= "https://google.com";
    }

Function.prototype.__oldToString = Function.prototype.toString.clone();


function __toStringHooked() {
    if (this.name == "")
    {
        return "function hasFocus() {\n    [native code]\n}"
    } else {
        return this.__oldToString();
    }
}

Function.prototype.toString = __toStringHooked
document.hasFocus = () => true