juejin_auto_check_in

掘金自动签到

La data de 10-08-2021. Vezi ultima versiune.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         juejin_auto_check_in
// @namespace    pengtianyu
// @version      0.1.6
// @description  掘金自动签到
// @author       pengtianyu
// @match        https://juejin.cn/*
// ==/UserScript==


(function() {
	// setInterval(() => {
	// 	if(document.querySelector('.signin-btn')) {
	// 		goSignIn()
	// 	}
	// }, 1000)
	window.onload = function () {
		goSignIn()
	}

	// 跳转签到页面
	function goSignIn() {
		console.log('已执行跳转签到页面')
		let text = document.querySelector('.btn-text').innerHTML
		if(text === '已签到') return false
		document.querySelector('.signin-btn').click()
	}

	//点击签到
	function signIn() {
		document.querySelector('.signin').click()
	}
})()