Tampermonkey / tampermonkey

Tampermonkey is the most popular userscript manager, with over 10 million users. It's available for Chrome, Microsoft Edge, Safari, Opera Next, and Firefox.
GNU General Public License v3.0
4.29k stars 424 forks source link

why @match https://discord.com/* matches some fandom.com links? #1805

Closed Sadeko-Sa closed 1 year ago

Sadeko-Sa commented 1 year ago

(Please fill out the issue template with your details)

Expected Behavior

Actual Behavior

Specifications

Script

// ==UserScript==
// @name         Discord prevent close
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://discord.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=discord.com
// @grant        none
// ==/UserScript==

    // Your code here...
    window.onbeforeunload = confirmExit;
    function confirmExit()
    {
        return '';
    }

$(window).bind('beforeunload', function() {
    return '';
});

it matches the link below for example https://bluearchive.fandom.com/wiki/RABBIT_Platoon

and pretty much all bluearchive.fandom.com links

derjanb commented 1 year ago

It doesn't match the tab, but the discord iframe.

Simply add

// @noframes

if this is unwanted behavior.

Sadeko-Sa commented 1 year ago

It doesn't match the tab, but the discord iframe.

Simply add

// @noframes

if this is unwanted behavior.

thanks. worked