emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 7c9bf39 3/6: lisp/ox-html.el (org-html-scripts): Sm


From: ELPA Syncer
Subject: [elpa] externals/org 7c9bf39 3/6: lisp/ox-html.el (org-html-scripts): Small refactoring
Date: Sat, 1 May 2021 05:57:12 -0400 (EDT)

branch: externals/org
commit 7c9bf397b55b0f9ec82a6e95c3c265a98837b0c7
Author: Anthony Carrico <acarrico@memebeam.org>
Commit: Bastien Guerry <bzg@gnu.org>

    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/
---
 lisp/ox-html.el | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index d09fd1f..71a85c2 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -240,19 +240,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
 </script>"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]