From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [Show Org source] button does not work
Date: Wed, 13 Jan 2016 00:08:53 -0500 [thread overview]
Message-ID: <87bn8qm5ga.fsf@pierrot.dokosmarshall.org> (raw)
In-Reply-To: CAFvQaj4x=EDdb_Hx2Vc_g4rEARL5dLSR6mKUSowH9JgY3D3FAQ@mail.gmail.com
Kynn Jones <kynnjo@gmail.com> writes:
> The [Show Org source] button at the bottom of pages such as
>
> http://orgmode.org/worg/
>
> does not work. Nothing happens when one clicks on it. It's supposed
> to execute the statement `show_org_source()`, but as far as I can
> tell, the function `show_org_source` is not to be found in the page's
> JS.
>
I can see the following (lines 63-79 of the page source):
<script type="text/javascript">
function rpl(expr,a,b) {
var i=0
while (i!=-1) {
i=expr.indexOf(a,i);
if (i>=0) {
expr=expr.substring(0,i)+b+expr.substring(i+a.length);
i+=b.length;
}
}
return expr
}
function show_org_source(){
document.location.href = rpl(document.location.href,"html","org.html");
}
</script>
Try clicking the button on the following page:
http://orgmode.org/worg/org-tutorials/org-outside-org.html
It changes the location to
http://orgmode.org/worg/org-tutorials/org-outside-org.org.html
and loads it.
http://orgmode.org/worg/ does not have a .html suffix so the rpl()
function leaves it alone.
This is with FF 43.0.3 on Fedora 22.
--
Nick
next prev parent reply other threads:[~2016-01-13 5:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 0:09 [Show Org source] button does not work Kynn Jones
2016-01-13 5:08 ` Nick Dokos [this message]
2016-01-13 8:33 ` Marco Wahl
2016-01-13 16:11 ` Kynn Jones
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=87bn8qm5ga.fsf@pierrot.dokosmarshall.org \
--to=ndokos@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).