Changeset 2039 for lang/javascript
- Timestamp:
- 11/27/07 01:48:32 (5 years ago)
- Files:
-
- 1 modified
-
lang/javascript/userscripts/jautopagerize.user.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/userscripts/jautopagerize.user.js
r2014 r2039 488 488 // Firefox doesn't have createHTMLDocument 489 489 if (!document.implementation.createHTMLDocument) { 490 if (navigator.userAgent.match(/Firefox/)) { 490 491 // Try to create HTMLDocument from XSLT with <xsl:output method='html'/> 492 if (typeof DOMParser != "undefined" && 493 typeof XSLTProcessor != "undefined") { 491 494 // var html4dt = document.implementation.createDocumentType("HTML", "-//W3C//DTD HTML 4.01//EN", "http://www.w3.org/TR/html4/strict.dtd"); 492 495 // var d = document.implementation.createDocument("", "HTML", html4dt); … … 496 499 x.importStylesheet((new DOMParser).parseFromString([ 497 500 "<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>", 498 "<xsl:output method='html'/>", 499 "<xsl:template match='/'>", 500 "<html><head><title>", title, "</title></head><body/></html>", 501 "</xsl:template>", 502 "</xsl:stylesheet>"].join("\n"), "application/xml")); 503 return x.transformToDocument((new DOMParser).parseFromString("<nice-boat/>", "text/xml")); 501 "<xsl:output method='html'/>", 502 "<xsl:template match='/'>", 503 "<html><head><title>", title, "</title></head><body/></html>", 504 "</xsl:template>", 505 "</xsl:stylesheet>"].join(""), "application/xml")); 506 var ret = x.transformToDocument((new DOMParser).parseFromString("<nice-boat/>", "text/xml")); 507 return ret; 504 508 } else { 505 509 return null;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)