[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [worg] Request for help to fix the 'Show Org source'
From: |
Marco Wahl |
Subject: |
[O] [worg] Request for help to fix the 'Show Org source' |
Date: |
Sat, 18 Apr 2015 12:34:14 +0200 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] [worg] Request for help to fix the 'Show Org source',
Marco Wahl <=