Are you sure you want to go to an external site to donate a monetary value?
WARNING: Some countries laws may supersede the payment processors policy such as the GDPR and PayPal. While it is highly appreciated to donate, please check with your countries privacy and identity laws regarding privacy of information first. Use at your utmost discretion.
Hello,
I'm trying ot realize the javascript code at https://www.w3schools.com/xml/xsl_client.asp into Userscript which will work upon recognizing filetype.
Eventually, the Userscript will be activated every time a document is recognized as Atom/RDF/RSS feed.
Here's my attempt https://openuserjs.org/garage/Uncaught_SyntaxError_Unexpected_token_
Please help.
Thank you
Solved
function loadXMLDoc(filename) { xhttp = new XMLHttpRequest(); xhttp.open("GET", filename, false); xhttp.send(""); return xhttp.responseXML; } function displayResult() { xml = loadXMLDoc(location.href); xsl = loadXMLDoc("http://localhost:8000/cdcatalog.xsl"); xsltProcessor = new XSLTProcessor(); xsltProcessor.importStylesheet(xsl); resultDocument = xsltProcessor.transformToDocument(xml); } displayResult() window.content = resultDocument; document.replaceChild ( document.importNode (resultDocument.documentElement, true), document.documentElement );