Screen Stay Awake

外掛說明

Screen Stay Awake sends a request to your visitor’s browser asking it to keep their device’s screen on and prevent locking. This happens in the background and no user prompt is required. Screen Stay Awake is important for recipe websites and other how-to, informational websites. In these cases a visitor may go long periods without interacting with your site but still want to be able to read your content.

To accomplish this, Screen Stay Awake uses the Screen Wake Lock browser API. The request is sent on page load. Some browsers, such as iOS Safari, require the user to interact with your site prior to honoring the wake lock request. In these cases, Screen Stay Awake will also request the screen stay on after clicks, touches, and scrolls.

For information on browser support, please view the WakeLock: request() Documentation

螢幕擷圖

  • Screen Stay Awake plugin settings screen

常見問題集

Can I disable Screen Stay Awake on some pages?

The Screen Stay Awake script can be excluded by post type, archive type, and on 404 pages using the plugin settings.

If you need customized logic, you can use the filter scrnsa_stayawake_should_enqueue to determine if the script should enqueue. Return a boolean value based on your logic and the script will either enqueue or not.

使用者評論

2024 年 11 月 25 日
Thanks for this singular feature plugin. Saved me from having to buy a premium recipe plugin for a family recipe site. Appreciated!
2024 年 11 月 4 日 1 則留言
I am thrilled this plugin has been made! I had been trying to implement NoSleep JS on my own and it was a struggle. Took a break from it and found out someone created this plugin that does exactly what I need. I’m so grateful!
閱讀全部 2 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Screen Stay Awake〉的開發相關工作。

參與者

將〈Screen Stay Awake〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0.4

  • Support for WordPress 6.7
  • Adds localization support

1.0.3

  • Adds the ability to disable script on post types, archives, and 404 pages