emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: Ilya Shlyakhter <ilya_shl@alum.mit.edu>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: suggestion: HTML frames option
Date: Wed, 05 May 2010 17:56:37 +0200	[thread overview]
Message-ID: <87mxwe1gwa.fsf@gmx.de> (raw)
In-Reply-To: <k2q4b11f87e1005041433lc63f6741ha8aac66eee372493@mail.gmail.com> (Ilya Shlyakhter's message of "Tue, 4 May 2010 17:33:26 -0400")

[-- Attachment #1: Type: text/plain, Size: 878 bytes --]

Ilya Shlyakhter <ilya_shl@alum.mit.edu> writes:
> It would be good if the HTML exporter had an option to create a web
> page with two frames:
> in the top frame would be the original exported HTML, and in the
> bottom frame would display
> the targets of all external links in the org file.  Within-orgfile
> links would still be shown in the
> top frame. Then, the org file could serve as an "index" for organizing
> a variety of information, and
> one could browse the org file in the top frame and quickly see the
> targets of external links
> in the bottom frame, without having to switch tabs or windows in the browser.
>
> There would be an option to have the index on the left, instead of on the top.

Hi Ilya,


here is a solution in JavaScript.

Adjust the line

   #+STYLE:   var targetFrame = "otherFrame";

You could even receive the targetFrame as URL-Parameter.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-verbatim, Size: 931 bytes --]

#+STYLE: <script type="text/javascript">
#+STYLE: <!--/*--><![CDATA[/*><!--*/
#+STYLE: function modifyExternalLinks()
#+STYLE: {
#+STYLE:   if(null == document['body']) {
#+STYLE:     window.setTimeout("modifyExternalLinks()", 250);
#+STYLE:     return;
#+STYLE:   }
#+STYLE:   var targetFrame = "otherFrame";
#+STYLE:   var baseURL = document.URL;
#+STYLE:   if("" != location.hash)
#+STYLE:     baseURL = baseURL.substring(0, baseURL.indexOf('#'));
#+STYLE:   if("" != location.search)
#+STYLE:     baseURL = baseURL.substring(0, baseURL.indexOf('?'));
#+STYLE:   var regx = new RegExp("^baseURL", "gi");
#+STYLE:   var links = document.getElementsByTagName("a");
#+STYLE:   for(j=0; j<links.length; ++j)
#+STYLE:   {
#+STYLE:     if(! links[j].href.match(regx))
#+STYLE:     links[j].target = targetFrame;
#+STYLE:   }
#+STYLE: }
#+STYLE: window.setTimeout("modifyExternalLinks()", 250);
#+STYLE: *]]>*///-->
#+STYLE: </script>

[-- Attachment #3: Type: text/plain, Size: 23 bytes --]




HTH

   Sebastian



[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

      reply	other threads:[~2010-05-05 15:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-04 21:33 suggestion: HTML frames option Ilya Shlyakhter
2010-05-05 15:56 ` Sebastian Rose [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mxwe1gwa.fsf@gmx.de \
    --to=sebastian_rose@gmx.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=ilya_shl@alum.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).