From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Wahl Subject: [worg] Request for help to fix the 'Show Org source' Date: Sat, 18 Apr 2015 12:34:14 +0200 Message-ID: <84ioctu3mh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjQ55-00037J-Mf for emacs-orgmode@gnu.org; Sat, 18 Apr 2015 06:34:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjQ52-0004zc-EN for emacs-orgmode@gnu.org; Sat, 18 Apr 2015 06:34:35 -0400 Received: from plane.gmane.org ([80.91.229.3]:56465) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjQ52-0004zI-7l for emacs-orgmode@gnu.org; Sat, 18 Apr 2015 06:34:32 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YjQ50-0006Xi-Me for emacs-orgmode@gnu.org; Sat, 18 Apr 2015 12:34:30 +0200 Received: from x5f729f6b.dyn.telefonica.de ([95.114.159.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 Apr 2015 12:34:30 +0200 Received: from marcowahlsoft by x5f729f6b.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 Apr 2015 12:34:30 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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