Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tampermonkey broke Firefox's built in XML document viewer #1480

Closed
jcunews opened this issue Apr 10, 2022 · 12 comments
Closed

Tampermonkey broke Firefox's built in XML document viewer #1480

jcunews opened this issue Apr 10, 2022 · 12 comments

Comments

@jcunews
Copy link

jcunews commented Apr 10, 2022

(Please fill out the issue template with your details)

Conditions

Use below do-nothing script in Firefox, and open below XML document.

https://www.w3schools.com/xml/cd_catalog.xml

Expected Behavior

XML document is properly presented using Firefox's built in XML document viewer.

Actual Behavior

The injection of the do-nothing script broke Firefox's built in XML document viewer.
Causing the XML document data be treated as HTML data.
It does not matter what the script does or does not do.

Specifications

  • Firefox: 91.0
  • TM: 4.16.6160
  • OS: Windows 7 SP2 x64

Script

(Please give an example of the script if applicable.)

// ==UserScript==
// @name Do-Nothing
// @namespace http://mywebsite.com
// @Version 1.0
// @description try to take over the world!
// @author Me
// @match https://www.w3schools.com/*
// @grant none
// ==/UserScript==

(() => {
  //does nothing
})()
@derjanb
Copy link
Member

derjanb commented Jun 9, 2022

If using TM 4.18+ there is workaround for now: set Sandbox Mode to "Force JavaScript", "JavaScript+DOM" or "Force DOM"

(xpi)

image

Please install the BETA version or check for BETA version updates at about:addons

For a quick fix please export your settings and scripts as zip or (JSON) file at the "Utilities" tab and import it back at the fixed BETA version.

@derjanb
Copy link
Member

derjanb commented Oct 5, 2022

Note: this comment mentions another workaound -> #452 (comment)

@tomasz-q
Copy link

The workaround with Security settings is working partially, i.e. XML format is preserved, but one of my scripts which depends on jQuery and $.ajax stopped working.

Another workaround with blacklisting XML URLs used to work in older Tampermonkey versions. It does not work in 4.18.0 though.

@nematsakis
Copy link

I can confirm that the workaround of blacklisting XML sites in the security settings is not working in 4.18.0 and 4.18.1. The Tampermonkey menu in the browser shows that the site is "Blacklisted by security settings" but the XML document viewer is still broken.

@elisimpson
Copy link

"Me too" comment. XML handing is broken with Tampermonkey enabled, fixed immediately when disabled. Will try the beta, but this really should be fixed and pushed to the main release channel.

@derjanb derjanb added this to the 4.19 milestone Mar 8, 2023
@derjanb
Copy link
Member

derjanb commented Mar 9, 2023

Finally! 😅

Should be fixed at 4.19.6179 (xpi)

Please install the BETA version or check for BETA version updates at about:addons

For a quick fix please export your settings and scripts as zip or (JSON) file at the "Utilities" tab and import it back at the fixed BETA version.

@nematsakis
Copy link

Confirming that the fix works for me. Tampermonkey v4.19.6179, Firefox 110.0, macOS 12.6.3 (21G419)

@derjanb derjanb closed this as completed May 25, 2023
@nematsakis
Copy link

When will 4.19 be released? When I look at the Firefox Add-ons site, it still shows the current version as 4.18.1.

@SVNKoch
Copy link

SVNKoch commented Jun 28, 2023

Can confirm too, works in beta 4.19 but didn't in 4.18. Thanks for fixing!

@elisimpson
Copy link

elisimpson commented Dec 5, 2023

Seems to be broken again even with the workaround from above. Latest Firefox and beta Tampermonkey

EDIT: with further research another extension is causing the problem... Bitwarden. No idea how to fix that

@derjanb
Copy link
Member

derjanb commented Dec 5, 2023

EDIT: with further research another extension is causing the problem... Bitwarden. No idea how to fix that

Not sure if this is possible, but to exempt XML pages in Bitwarden might fix the issue.

@jaejunks
Copy link

jaejunks commented Dec 5, 2023

Seems to be broken again even with the workaround from above. Latest Firefox and beta Tampermonkey

EDIT: with further research another extension is causing the problem... Bitwarden. No idea how to fix that

I get rid of Firefox-ignorant browser extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants