Created
May 29, 2023 21:20
-
-
Save TheEpicFace007/ecc20deb21ea4885bd357992fad8b71f to your computer and use it in GitHub Desktop.
This userscript prevent you from quitting the xbox playing accidently
This file contains 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 Confirm to exit game | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description This userscript prevent you from quitting the xbox playing accidently | |
// @author TheEpicFace | |
// @match https://www.xbox.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=xbox.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// run the script if on cloud gaming website | |
if (location.toString().includes("/play")){ | |
window.onbeforeunload = function(){ | |
return "test" | |
} | |
} | |
// Your code here... | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment