mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-20 19:24:20 +00:00
lisp/ox-html.el (org-html-scripts): Small refactoring
* lisp/ox-html.el (org-html-scripts): Small refactoring.
This replays the Javascript refactoring of commit 471054136
.
Link: https://orgmode.org/list/498dbe2e-0cd2-c81e-7960-4a26c566a1f7@memebeam.org/
This commit is contained in:
parent
d18071b4ff
commit
dcd7b576b7
@ -239,19 +239,16 @@ property on the headline itself.")
|
||||
{
|
||||
var target = document.getElementById(id);
|
||||
if(null != target) {
|
||||
elem.cacheClassElem = elem.className;
|
||||
elem.cacheClassTarget = target.className;
|
||||
target.className = \"code-highlighted\";
|
||||
elem.className = \"code-highlighted\";
|
||||
elem.classList.add(\"code-highlighted\");
|
||||
target.classList.add(\"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;
|
||||
if(null != target) {
|
||||
elem.classList.remove(\"code-highlighted\");
|
||||
target.classList.remove(\"code-highlighted\");
|
||||
}
|
||||
/*]]>*///-->
|
||||
// @license-end
|
||||
|
Loading…
Reference in New Issue
Block a user