Weibo Keepalive

Keep your Weibo account logged in and avoid annoying navigations.

目前为 2023-03-12 提交的版本。查看 最新版本

// ==UserScript==
// @name         Weibo Keepalive
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Keep your Weibo account logged in and avoid annoying navigations.
// @author       lujjjh
// @license      MIT
// @match        https://weibo.com/*
// @match        https://*.weibo.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=weibo.com
// @grant        none
// @run-at       document-end
// ==/UserScript==

{
  let keepalive = () => {
    const iframe = document.createElement('iframe');
    Object.assign(iframe.style, {
      position: 'absolute',
      left: '-1000px',
      top: '0',
      width: '1px',
      height: '1px'
    });
    iframe.src = 'https://weibo.com/login.php?url=https%3A%2F%2Fweibo.com%2F%3Fsudaref%3Dlogin.sina.com.cn';
    document.body.append(iframe);
    setTimeout(() => void iframe.remove(), 10e3);
  };
  setInterval(keepalive, 300e3);
  keepalive();
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址