Hi worgers,

The button 'Show Org source' disappoints on worg pages when the url
does not contain an explicit name.  See e.g. http://orgmode.org/worg/
vs. http://orgmode.org/worg/index.html.

This behavior is due to javascript-function

#v+
function show_org_source(){
       document.location.href = rpl(document.location.href,"html","org.html");
    }
#v-

which changes nothing when the href contains no "html".

I propose to change this function to

#v+
function show_org_source() {
    var loc = document.location;
    if (-1 != loc.href.indexOf("html")) {
        loc.href = rpl(loc.href, "html", "org.html");
    }
    else {
        loc.pathname += "index.org.html";
    }
}
#v-

I do not understand how the function 'show_org_source' gets pasted into
each worg-page.  Can anyone please explain?  Can anybody even apply the
fix?


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


Reply via email to