emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] http://orgmode.org/worg/code/org-info-js/ broken


From: Marco Wahl
Subject: Re: [O] http://orgmode.org/worg/code/org-info-js/ broken
Date: Mon, 02 Feb 2015 13:25:43 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Hello!

>> Svjatoslav Agejenko <address@hidden> writes:
>> 
>> > Button "Show Org source" on page
>> > http://orgmode.org/worg/code/org-info-js/ 
>> > does not work.
>> 
>> You could try the explicit
>> http://orgmode.org/worg/code/org-info-js/index.html instead.  The
>> button's action depends on the concrete form of the URL in particular
>> the substring "html".
>
> That last link with explicit index.html seems to work. Still when
> searching Google for org-mode related things it directed me there:
> http://orgmode.org/worg/code/org-info-js/
>
> And this URL looks valid by itself. No hints anywhere that I shall use
> index.html suffix.

BTW also many other pages on worg have this button also
e.g. http://orgmode.org/worg/.  The relevant code in those pages is

#v+
<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>
#v-

and it looks like a template.  A reasonable fix to make the button work
for URLs without suffix 'index.html' might be to change this code
accordingly.

Unfortunately my finding-fu was not enough to find the source of that
code.

> I hope whoever is responsible will fix this.

It's the community AFAICS.  Let's hope she will do something.


Best regards,  Marco
-- 
http://www.wahlzone.de
GPG: 0x49010A040A3AE6F2




reply via email to

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