tgui-core 5.5.10 → 5.6.0

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.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file
3
+ * @copyright 2020 Aleksej Komarov
4
+ * @license MIT
5
+ */
6
+ /**
7
+ * Prevents baby jailing the user when they click an external link.
8
+ */
9
+ export declare function captureExternalLinks(): void;
@@ -0,0 +1 @@
1
+ function t(){document.addEventListener("click",t=>{let e=t.target;for(;;){if(!e||e===document.body)return;if("a"===String(e.tagName).toLowerCase())break;e=e.parentElement}let r=e.getAttribute("href")||"";if("?"===r.charAt(0)||r.startsWith("byond://"))return;t.preventDefault();let n=r;n.toLowerCase().startsWith("www")&&(n=`https://${n}`),Byond.sendMessage({type:"openLink",url:n})})}export{t as captureExternalLinks};
package/package.json CHANGED
@@ -68,5 +68,5 @@
68
68
  "test": "bun test"
69
69
  },
70
70
  "type": "module",
71
- "version": "5.5.10"
71
+ "version": "5.6.0"
72
72
  }