dsh-unlag 1.9.39 → 1.9.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.js +6 -1
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -559,7 +559,12 @@ window.__ModuleLoader__.load({
|
|
|
559
559
|
function stillHeldBack() {
|
|
560
560
|
const probe = new Event('beforeunload', { cancelable: true }); // ui-copy-ignore
|
|
561
561
|
window.dispatchEvent(probe);
|
|
562
|
-
|
|
562
|
+
// A handler says no in three ways: cancelling the event, setting `returnValue` to false, or
|
|
563
|
+
// returning a message through `window.onbeforeunload` (the browser copies that message into
|
|
564
|
+
// `returnValue`). Missing the last one let a press start a navigation the page would then
|
|
565
|
+
// ask about over the page's own head.
|
|
566
|
+
const message = probe.returnValue;
|
|
567
|
+
return probe.defaultPrevented === true || message === false || (typeof message === 'string' && message !== '');
|
|
563
568
|
}
|
|
564
569
|
|
|
565
570
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-unlag",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.40",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A press applies plugin edits right away and brings a laggy interface back; automatic reloading stays off unless you turn it on, so the press is the only trigger, and nothing restarts.",
|
|
6
6
|
"license": "MIT",
|