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 #211
Comments
Thank you.
It doesn't work with Greasemonkey neither.
I'm an Attorney at Law, not a programmer. Please kindly explain what do you mean by "Web Component". As I stated, I think that a metablock ( See my comments at violentmonkey/violentmonkey#1842 (comment) |
Please navigate to And test this script with these pages: https://www.jsonfeed.org/feed.json https://nu.federati.net/api/statuses/user_timeline/2.as https://peertube.su/feeds/videos.json?sort=-trending Video preview of the script in action in a page that simplescreenrecorder-2023-06-29_21.12.45.mp4 |
This is the document of Web Component: https://developer.mozilla.org/en-US/docs/Web/API/Web_components, my idea is to use its shadow DOM feature to change the outer What's weird is that some elements have In short, see if there is any other solution to this problem. If not, I will consider trying to add the metablock @filetype you mentioned (but maybe in this form: #54) |
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 |
I think it would be most appropriate to incorporate the capability of the program Open in Browser into metablocks as follows:
@filetype
:@mimetype
would be good tootext/html
:text/plain
would be good tooAbout
This is a request to add new API
to GM.xmlHttpRequest, or to the core of the Greasemonkey extension,that can influence a change indocument.contentType
.Preface
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.
All the extra functionalities work well when
document.contentType
(read only) does not containxml
.However, when
document.contentType
hasxml
, any code that containsquerySelector
would fail because thedocument
is believed to be whateverdocument.contentType
has determined upon initial request (an XML file), and, apparently, the web browser doesn't checkdocument
once it has been loaded.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:
Expected Behavior
Execute actions on document as as HTML.
Actual Behavior
Browser blocks HTML actions (throws errors) because it is believed to be an XML.
Script
https://greasyfork.org/en/scripts/465932-newspaper-native-rss-reader
Test Page
https://lzone.de/liferea/blog/feed.xml
application/xml
Note
More information at greasemonkey/greasemonkey#3164
The text was updated successfully, but these errors were encountered: