Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit bbd7dec

Browse files
committed
fix zhs_js and change unfreeze_js
1 parent 524d336 commit bbd7dec

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

app.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,30 @@ class App():
4040
QQ_URL = "https://jq.qq.com/?_wv=1027&k=5FPg14d"
4141

4242
UNFREEZE_JS = r"""
43-
var a=function () {
44-
var _0x320a = ["body", "onselectstart", "oncopy", "onpaste", "onkeydown", "oncontextmenu", "onmousemove", "ondragstart", "onmousedown", "wrappedJSObject", "*", "getElementsByTagName", "length", "%u5DF2%u89E3%u9664%u590D%u5236%u4E0E%u53F3%u952E%u9650%u5236%uFF01", "\x0D", "%u6B22%u8FCE%u52A0%u5165QQ%u7FA4%u804A%uFF1A614202391", "", "webkitUserSelect", "style", "auto!important", "MozUserSelect", "normal!important"];
45-
var doc = document;
46-
var bd = doc[_0x320a[0]];
47-
bd[_0x320a[1]] = bd[_0x320a[2]] = bd[_0x320a[3]] = bd[_0x320a[4]] = bd[_0x320a[5]] = bd[_0x320a[6]] = bd[_0x320a[1]] = bd[_0x320a[7]] = doc[_0x320a[1]] = doc[_0x320a[2]] = doc[_0x320a[3]] = doc[_0x320a[4]] = doc[_0x320a[5]] = null;
48-
doc[_0x320a[1]] = doc[_0x320a[5]] = doc[_0x320a[8]] = doc[_0x320a[4]] = function () {
43+
(function() {
44+
var doc = document,
45+
bd = doc.body;
46+
bd.onselectstart = bd.oncopy = bd.onpaste = bd.onkeydown = bd.oncontextmenu = bd.onmousemove = bd.onselectstart = bd.ondragstart = doc.onselectstart = doc.oncopy = doc.onpaste = doc.onkeydown = doc.oncontextmenu = null;
47+
doc.onselectstart = doc.oncontextmenu = doc.onmousedown = doc.onkeydown = function() {
4948
return true;
5049
};
51-
with(document[_0x320a[9]] || document) {
50+
with (doc.wrappedJSObject || doc) {
5251
onmouseup = null;
5352
onmousedown = null;
5453
oncontextmenu = null;
5554
};
56-
var arAllElements = document[_0x320a[11]](_0x320a[10]);
57-
for (var i = arAllElements[_0x320a[12]] - 1; i >= 0; i--) {
58-
var elmOne = arAllElements[i];
59-
with(elmOne[_0x320a[9]] || elmOne) {
55+
var allElements = doc.getElementsByTagName('*');
56+
for (var i = allElements.length; i > 0;) {
57+
var elmOne = allElements[--i];
58+
with (elmOne.wrappedJSObject || elmOne) {
6059
onmouseup = null;
6160
onmousedown = null;
6261
};
6362
};
64-
alert(unescape(_0x320a[13]) + _0x320a[14] + unescape(_0x320a[15]));
65-
bd[_0x320a[18]][_0x320a[17]] = _0x320a[19];
66-
bd[_0x320a[18]][_0x320a[20]] = _0x320a[21];
67-
}
68-
a()
63+
alert('已解除复制与右键限制!\n欢迎加入群聊:614202391');
64+
bd.style.webkitUserSelect = 'auto!important';
65+
bd.style.MozUserSelect = 'normal!important';
66+
})();
6967
"""
7068
ZHS_JS = """
7169
function speedUp_muted_bq() {
@@ -398,7 +396,7 @@ def zhs_js(self):
398396
# 复制到剪切板
399397
def _copy():
400398
self.root.clipboard_clear()
401-
self.root.clipboard_append(App.UNFREEZE_JS)
399+
self.root.clipboard_append(App.ZHS_JS)
402400

403401
Label(frame, text="点击复制按钮,到浏览器页面").pack()
404402
Label(frame, text="按F12或者Ctrl+Shift+i打开开发者工具").pack()

0 commit comments

Comments
 (0)