HTML export: New option to turn off Javascript inclusion

It is now possible to turn off the inclusion of any javascript into
the HTML file.
This commit is contained in:
Carsten Dominik 2009-03-07 05:56:17 +01:00
parent 3ed4b5e323
commit 6d6a7cb916
2 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2009-03-07 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-html-style-include-scripts): New option.
(org-export-plist-vars): Add new option
`org-export-html-style-include-scripts'.
(org-export-as-html): Honor new option
`org-export-html-style-include-scripts'.
2009-03-06 Carsten Dominik <carsten.dominik@gmail.com>
* org-publish.el (org-publish-attachment): Only copy file when the

View File

@ -535,6 +535,13 @@ in this way, it will be wrapped."
:group 'org-export-html
:type '(string :tag "File or URL"))
(defcustom org-export-html-style-include-scripts t
"Non-nil means, include the javascript snippets in exported HTML files.
The actual script is defined in `org-export-html-scripts' and should
not be modified."
:group 'org-export-html
:type 'boolean)
(defconst org-export-html-scripts
"<script type=\"text/javascript\">
<!--/*--><![CDATA[/*><!--*/
@ -943,6 +950,7 @@ or if they are only using it locally."
(:tables "|" org-export-with-tables)
(:table-auto-headline nil org-export-highlight-first-table-line)
(:style-include-default nil org-export-html-style-include-default)
(:style-include-scripts nil org-export-html-style-include-scripts)
(:style nil org-export-html-style)
(:style-extra nil org-export-html-style-extra)
(:agenda-style nil org-agenda-export-html-style)
@ -3318,7 +3326,9 @@ PUB-DIR is set, use this as the publishing directory."
org-export-html-style-default)
(plist-get opt-plist :style)
(plist-get opt-plist :style-extra)
"\n" org-export-html-scripts))
"\n"
(if (plist-get opt-plist :style-include-scripts)
org-export-html-scripts)))
(html-extension (plist-get opt-plist :html-extension))
(link-validate (plist-get opt-plist :link-validation-function))
valid thetoc have-headings first-heading-pos