[WordPress] 外掛分享: Incognito Window Detect

首頁 › 外掛目錄 › Incognito Window Detect
WordPress 外掛 Incognito Window Detect 的封面圖片
10+
安裝啟用
★★★★★
5/5 分(1 則評價)
32 天前
最後更新
—
問題解決
WordPress 6.3+ PHP 7.4+ v2.0.0 上架:2019-06-06

內容簡介

無痕模式(又稱私密瀏覽)是一種在瀏覽器內置的非常好的隱私功能。但是有時,如果我們的用戶正在使用無痕窗口瀏覽,我們就無法為他們提供最佳的網頁體驗。
為此,我準備了這個插件,以開始管理我們的 Web 項目上的此限制。

目前,這是一個簡單的私人/ 無痕窗口檢測器,可以自定義顯示的消息。可以自定義以下內容:

頁腳 / 全螢幕消息;
選擇要顯示建議的特定頁面;
文本消息;
文本顏色;
背景色。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.0.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Incognito Window Detect」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Incognito mode (also called a private window) is a great privacy feature, but it also disables the cookies and storage that many sites rely on for a good experience: remembered preferences, personalised suggestions, saved carts, and so on.
Incognito Window Detect lets you tell those visitors what is going on. When a private window is detected, it shows a message you write, either as a discreet bar at the bottom of the page or as a full-screen overlay.
Features

Bottom bar or full-screen overlay
Your own message, with basic HTML (bold, links, line breaks)
Custom background and text colours and font size
Optional dismiss button, remembered for the browsing session
Optional delay before the notice appears
Show it on the whole site or only on the pages you pick
Accessible markup (live region for the bar, dialog semantics for the overlay, keyboard dismiss)
No jQuery on the front end, no external requests, nothing tracked

How detection works
Detection runs entirely in the visitor’s browser using the open-source detectIncognito.js library (MIT licence), which is bundled with the plugin. The bundled file is the ES5 build of release v1.9.0; the unminified source is available at dist/detectIncognito.js in that release. It uses storage-behaviour heuristics that differ between normal and private windows in Chrome, Edge, Brave, Opera, Firefox and Safari. Nothing is sent anywhere and no data is stored about the visitor.
Like every private-mode detector, it is a best-effort check. Browsers change how private windows behave, so an occasional false positive or miss is possible. When the browser cannot be identified, nothing is shown.
Browser support
Verified by the plugin author on 29 October 2026 with the bundled detection library (private window detected, regular window not flagged):

Google Chrome 156 (macOS)
Mozilla Firefox 152 (macOS)
Safari 17.4 (macOS)

Supported by the detection library, not individually verified by the plugin author: Chromium-based browsers from version 83 (Chrome, Microsoft Edge, Brave, Opera, Chrome for Android), Firefox from version 44, Safari on macOS and iOS up to 26.5. Internet Explorer is not supported.
Known limitations:

Detection only works on sites served over HTTPS (or localhost).
Firefox container tabs are not detected.
Chrome Guest mode and profiles stored on a RAM disk can be reported as private.
Browser vendors actively close detection signals, so a new browser release can cause misses until the library is updated. The plugin fails safe: when in doubt, no notice is shown.

For developers
Filters:

incognito_window_detect_should_load – decide per request whether to load the notice.
incognito_window_detect_settings – adjust the settings array.
incognito_window_detect_message – change the message HTML.
incognito_window_detect_allowed_html – change the HTML tags allowed in the message.
incognito_window_detect_script_config – change the configuration passed to the front-end script.

DOM events dispatched on the notice element (they bubble to document):

incognito-window-detect:result – after detection, with detail.isPrivate and detail.browserName.
incognito-window-detect:shown and incognito-window-detect:dismissed.

Privacy note for developers: out of the box the detection result never leaves the visitor’s browser. If you use the result event to send it to your server or to an analytics tool, you are collecting information from the visitor’s device, which may require consent under the ePrivacy rules that apply to your site.
The notice element keeps the 1.x class names (incognito_mode_isPrivateMode, incognito_mode_isPrivateMode__overlay) alongside the new ones, so existing custom CSS keeps working.

文章
Filter
Mastodon