diff options
author | Bastien <bzg@gnu.org> | 2020-02-11 09:45:48 +0100 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2020-02-11 09:45:48 +0100 |
commit | 68fa5e589f00c8d5b4f7f0dc70be6ebe59238bb8 (patch) | |
tree | 1e723e3ee8631316ce4e02dbbc205ee16e29eef2 | |
parent | 85363d4867db704a0910f1ef4d1f23540d8e752e (diff) | |
download | org-mode-68fa5e589f00c8d5b4f7f0dc70be6ebe59238bb8.tar.gz |
ox-html.el: Enhance Javascript scripts display of the license
* lisp/ox-html.el (org-html-scripts)
(org-html-infojs-template): Enhance the display of the
licenses for Javascript scripts.
Thanks to Arne Babenhauserheide for suggesting this.
-rw-r--r-- | lisp/ox-html.el | 122 |
1 files changed, 25 insertions, 97 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 45e91ad..4dfc14f 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -233,50 +233,28 @@ property on the headline itself.") (defconst org-html-scripts "<script type=\"text/javascript\"> -/* -@licstart The following is the entire license notice for the -JavaScript code in this tag. - -Copyright (C) 2012-2020 Free Software Foundation, Inc. - -The JavaScript code in this tag is free software: you can -redistribute it and/or modify it under the terms of the GNU -General Public License (GNU GPL) as published by the Free Software -Foundation, either version 3 of the License, or (at your option) -any later version. The code is distributed WITHOUT ANY WARRANTY; -without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. - -As additional permission under GNU GPL version 3 section 7, you -may distribute non-source (e.g., minimized or compacted) forms of -that code without the copy of the GNU GPL normally required by -section 4, provided you include this license notice and a URL -through which recipients can access the Corresponding Source. - - -@licend The above is the entire license notice -for the JavaScript code in this tag. -*/ +// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later <!--/*--><![CDATA[/*><!--*/ - function CodeHighlightOn(elem, id) - { - var target = document.getElementById(id); - if(null != target) { - elem.cacheClassElem = elem.className; - elem.cacheClassTarget = target.className; - target.className = \"code-highlighted\"; - elem.className = \"code-highlighted\"; - } - } - function CodeHighlightOff(elem, id) - { - var target = document.getElementById(id); - if(elem.cacheClassElem) - elem.className = elem.cacheClassElem; - if(elem.cacheClassTarget) - target.className = elem.cacheClassTarget; - } -/*]]>*///--> + function CodeHighlightOn(elem, id) + { + var target = document.getElementById(id); + if(null != target) { + elem.cacheClassElem = elem.className; + elem.cacheClassTarget = target.className; + target.className = "code-highlighted"; + elem.className = "code-highlighted"; + } + } + function CodeHighlightOff(elem, id) + { + var target = document.getElementById(id); + if(elem.cacheClassElem) + elem.className = elem.cacheClassElem; + if(elem.cacheClassTarget) + target.className = elem.cacheClassTarget; + } + /*]]>*///--> +// @license-end </script>" "Basic JavaScript that is needed by HTML files produced by Org mode.") @@ -533,67 +511,17 @@ means to use the maximum value consistent with other options." (defcustom org-html-infojs-template "<script type=\"text/javascript\" src=\"%SCRIPT_PATH\"> -/** - * - * @source: %SCRIPT_PATH - * - * @licstart The following is the entire license notice for the - * JavaScript code in %SCRIPT_PATH. - * - * Copyright (C) 2012-2020 Free Software Foundation, Inc. - * - * - * The JavaScript code in this tag is free software: you can - * redistribute it and/or modify it under the terms of the GNU - * General Public License (GNU GPL) as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) - * any later version. The code is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. - * - * As additional permission under GNU GPL version 3 section 7, you - * may distribute non-source (e.g., minimized or compacted) forms of - * that code without the copy of the GNU GPL normally required by - * section 4, provided you include this license notice and a URL - * through which recipients can access the Corresponding Source. - * - * @licend The above is the entire license notice - * for the JavaScript code in %SCRIPT_PATH. - * - */ +// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later +// @license-end </script> <script type=\"text/javascript\"> - -/* -@licstart The following is the entire license notice for the -JavaScript code in this tag. - -Copyright (C) 2012-2020 Free Software Foundation, Inc. - -The JavaScript code in this tag is free software: you can -redistribute it and/or modify it under the terms of the GNU -General Public License (GNU GPL) as published by the Free Software -Foundation, either version 3 of the License, or (at your option) -any later version. The code is distributed WITHOUT ANY WARRANTY; -without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. - -As additional permission under GNU GPL version 3 section 7, you -may distribute non-source (e.g., minimized or compacted) forms of -that code without the copy of the GNU GPL normally required by -section 4, provided you include this license notice and a URL -through which recipients can access the Corresponding Source. - - -@licend The above is the entire license notice -for the JavaScript code in this tag. -*/ - +// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later <!--/*--><![CDATA[/*><!--*/ %MANAGER_OPTIONS org_html_manager.setup(); // activate after the parameters are set /*]]>*///--> +// @license-end </script>" "The template for the export style additions when org-info.js is used. Option settings will replace the %MANAGER-OPTIONS cookie." |