Last active
March 12, 2025 15:02
-
-
Save niikoo/00120afe78f25d0e1f8a1f1e952c4648 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name M365 Copilot for Work Incident Preventer | |
// @namespace https://gist.github.com/niikoo | |
// @match https://m365.cloud.microsoft/chat* | |
// @grant none | |
// @version 1.2 | |
// @author niikoo | |
// @icon https://icons.duckduckgo.com/ip2/m365.cloud.microsoft.ico | |
// @description Prevent accidentally navigating away from a M365 Copilot for Work chat | |
// @supportURL https://gist.github.com/niikoo/00120afe78f25d0e1f8a1f1e952c4648 | |
// @downloadURL https://gist.github.com/niikoo/00120afe78f25d0e1f8a1f1e952c4648/raw/m365-copilot-chat-incident-preventer.user.js | |
// ==/UserScript== | |
(function() { | |
window.addEventListener('load', function() { | |
console.log('Adding unload dialog'); | |
setInterval(() => { | |
window.onbeforeunload = () => false; | |
}, 1000); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment