[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [Show Org source] button does not work
From: |
Marco Wahl |
Subject: |
Re: [O] [Show Org source] button does not work |
Date: |
Wed, 13 Jan 2016 09:33:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Nick Dokos <address@hidden> writes:
> Kynn Jones <address@hidden> 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.
The desired behaviour of the [Show Org source] button for
http://orgmode.org/worg/ can be found at
http://orgmode.org/worg/index.html.
My 2 ct,
--
Marco Wahl
GPG: 0x49010A040A3AE6F2