添加 关闭知乎登录弹窗.js
This commit is contained in:
parent
4759e38cc1
commit
95b2bb13a5
24
关闭知乎登录弹窗.js
Normal file
24
关闭知乎登录弹窗.js
Normal file
@ -0,0 +1,24 @@
|
||||
// ==UserScript==
|
||||
// @name 关闭知乎登录弹窗
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 1.0
|
||||
// @description 关闭知乎登录弹窗
|
||||
// @author 8ga
|
||||
// @match https://zhihu.com/*
|
||||
// @match https://*.zhihu.com/*
|
||||
// @grant none
|
||||
// @run-at document-idle
|
||||
// ==/UserScript==
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
window.addEventListener('load', function () {
|
||||
setTimeout(clickCloseLoginButton, 1500);
|
||||
function clickCloseLoginButton() {
|
||||
const button = document.querySelector('button.Modal-closeButton.Button--plain');
|
||||
if (button) {
|
||||
button.click();
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
Loading…
Reference in New Issue
Block a user