Sorry, I didn't know such feature exists in org mode! It's just kinda
weird, these function still get called from onmouseover/onmouseout bindings.

2015-11-12 18:02 GMT+01:00 Rasmus <ras...@gmx.us>:

> Manuel Koell <man.ko...@gmail.com> writes:
>
> > Can someone please tell me what these functions do?
> >
> > ```
> >
> > 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; }
> >
> >
> > ```
> >
> > The only thing I could think of is to toggle some classes, but I can't
> seem
> > to find some real world example out there. This javascript code is
> included
> > on every export, doesn't matter if you've src/example blocks in your org
> > file or not.
>
> It is used for "coderefs" links.  Example from unit tests:
>
> #+BEGIN_SRC emacs-lisp
> (+ 1 1)                  (ref:sc)
> #+END_SRC
> [[(sc)]]
>
> It will highlight the appropriate line in the html export.
>
> Are you asking us to remove the javascript conditionally on whether we
> think it will be used?  This sounds hard.
>
> You can remove the JS via the buffer option html-scripts or via
> org-html-head-include-scripts.
>
> Hope it helps,
> Rasmus
>
> --
> I hear there's rumors on the, uh, Internets. . .
>
>
>

Reply via email to