* [worg] Request for help to fix the 'Show Org source'
@ 2015-04-18 10:34 Marco Wahl
0 siblings, 0 replies; only message in thread
From: Marco Wahl @ 2015-04-18 10:34 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-04-18 10:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-18 10:34 [worg] Request for help to fix the 'Show Org source' Marco Wahl
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.