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
New metablock @filetype #3164
Comments
Getting the document again will never change the type that it was when it was loaded. You'll need to be a lot more specific about specifically what you want, and how/why it would improve your use case. |
Yes, so I've found out.
I have wrote a userscript that converts structured data files (i.e. XML and JSON) into human readable HTML files. Overhaul, the program works as expected; documents are processed and forged successfully into HTML. The problem comes after the document is placed into viewport. Using event listeners, the program offers extra functionality, mostly for accessibility, yet it also offers critical functionality such as Provident Image Load (aka "lazy" load) which is essential, due to bandwidth and hardware resources. All the extra functionalities work well when However, once An error message from the program suggests the file processed is XML when in reality it is an HTML, hence hinders other functions to be executed:
Another related error:
Attribute |
I have added to Newspaper userscript an info message that is displayed at the top of a page when Interestingly, when executing Test page ( |
I think it would be most appropriate to incorporate the capability of the program Open in Browser into metablocks as follows:
|
Infeasible without significant refactoring (we don't know this information when we're running scripts https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webNavigation/onCommitted#details_2 ), the cost/benefit of potentially breaking existing scripts by changing how they run doesn't seem worth it. |
I have managed to overcome this setback, namely by passing the HTML element There was also another matter which required to create an element and change CSS Stylesheet in order to get the expected behaviour, because JavaScript attribute The only functionality which remains not to work upon XML is mode switcher (bright and dark) due to attribute |
This is a request to add new API
to GM.xmlHttpRequest, orto the core of the Greasemonkey extension, that can influence a change indocument.contentType
.See #3164 (comment)
I have a feed reader userscript which partially fails when page content/mime type contains
xml
.Further investigating and testing, namely with extensions like Open in Browser and Header Editor, the failures are a result of content-type being set to
xml
.The errors are as follows: (line position may not be accurate due to recent update)
Attempts to forge response type either with Fetch or XHR have also failed.
Is there a solution or should a new metablock or API similar to
webRequest.onHeadersReceived
be added?The text was updated successfully, but these errors were encountered: