抖音一键清屏

//抖音一键清屏

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!)

יוצר
upphitun
התקנות יומיות
0
סה"כ התקנות
355
דירוגים
1 0 0
גרסה
3.1
נוצר
29-09-2022
עודכן
11-07-2023
Size
1.68 קילו-בייט
רישיון
לא זמין
חל על

版本改动


3.0 版本的代码相对于2.0 版本有以下改动:

  • 用 MutationObserver 替代 setInterval 来监测页面变化。
  • 添加了 lastClearTime 和 minClearInterval 变量,用于控制最小清屏间隔时间。
  • 添加了 isCleared 变量来记录清屏状态。
  • 清屏操作时输出状态信息。
  • 3.0 版本的代码相对于2.0 版本更高级一些。

    它使用了一个叫做 MutationObserver 的东西来监视页面的变化。当页面变化时,代码会检查一下时间,只有当距离上次清屏的时间超过一定间隔时,才会执行清屏操作。执行清屏操作就是模拟点击页面上的一个按钮,这样就可以清除掉一些内容。代码还会记录清屏的状态,并在控制台上显示一些信息。

    而2.0 版本比较简单,它只是每隔一段时间就执行一次清屏操作,没有考虑清屏的时间间隔和状态的记录。

    所以说,3.0 版本更智能一些,更准确地控制了清屏的时机和状态的记录。

    脚本运行次数减少,从而提升电脑的性能,降低功耗