Browse Source

ref: comment

Sv443 1 year ago
parent
commit
3c73dd2b4c
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/features/input.ts
  2. 1 1
      src/index.ts

+ 2 - 2
src/features/input.ts

@@ -143,7 +143,7 @@ export function enableBeforeUnload() {
 
 /**
  * Adds a spy function into `window.__proto__.addEventListener` to selectively discard `beforeunload` 
- * event listeners before they can be attached by the site.
+ * event listeners before they can be called by the site.
  */
 export function initBeforeUnloadHook() {
   Error.stackTraceLimit = 1000; // default is 25 on FF so this should hopefully be more than enough
@@ -152,7 +152,7 @@ export function initBeforeUnloadHook() {
     // @ts-ignore
     window.__proto__.addEventListener = function(...args: Parameters<typeof window.addEventListener>) {
       if(!beforeUnloadEnabled && args[0] === "beforeunload")
-        return log("Prevented beforeunload event listener from attaching");
+        return log("Prevented beforeunload event listener from being called");
       else
         return original.apply(this, args);
     };

+ 1 - 1
src/index.ts

@@ -17,7 +17,7 @@ import {
 
 {
   // console watermark with sexy gradient
-  const styleGradient = "background: rgba(165,38,38,1); background: linear-gradient(90deg, rgb(154, 31, 103) 0%, rgb(135, 31, 31) 40%, rgb(184, 64, 41) 100%);";
+  const styleGradient = "background: rgba(165, 38, 38, 1); background: linear-gradient(90deg, rgb(154, 31, 103) 0%, rgb(135, 31, 31) 40%, rgb(184, 64, 41) 100%);";
   const styleCommon = "color: #fff; font-size: 1.25em; padding: 4px;";
 
   console.log();