您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Emulate sendBeacon if beacon.enabled is disabled in Firefox for https://*.perplexity.ai/*
This userscript emulates the navigator.sendBeacon
method on websites under the https://.perplexity.ai/ domain. In recent Firefox versions, when the internal beacon.enabled
setting is disabled, the native sendBeacon
method does not function, causing issues with site features relying on it to send data asynchronously in the background.
The script overrides navigator.sendBeacon
by using the modern fetch
API with the keepalive: true
option, closely mimicking the behavior of the original sendBeacon
. This allows sending asynchronous POST requests without blocking page unload and with a high probability that data will be sent when the tab or page closes.
fetch
with keepalive
Firefox sometimes disables the Beacon API by default (when beacon.enabled
is false), breaking functionality on sites relying on sendBeacon
for analytics, logging, or telemetry. This script locally emulates sendBeacon
on the site level, restoring functionality without compromising security or requiring user intervention in browser configuration.
sendBeacon
method will work correctly even if disabled by the browser.This script is open source and contains no malicious code. The full source code is available for review before installation. It does not load external resources or send data to third parties.