pytho****@googl*****
pytho****@googl*****
2012年 11月 18日 (日) 11:54:27 JST
Revision: b22202469707 Branch: default Author: Arihiro TAKASE <hinac****@gmail*****> Date: Sat Nov 17 18:48:00 2012 Log: 原文へのリンクを追加 http://code.google.com/p/python-doc-ja/source/detail?r=b22202469707&repo=py33 Added: /tools/sphinxext/static/_jp.js Modified: /tools/sphinxext/layout.html ======================================= --- /dev/null +++ /tools/sphinxext/static/_jp.js Sat Nov 17 18:48:00 2012 @@ -0,0 +1,12 @@ +$(document).ready(function() { + var url = document.URL.replace(/#.*/, ''); + var parts = url.split('/'); + + var base = 'http://docs.python.org/3.3/'; + base += parts[parts.length-2] + '/' + parts[parts.length-1]; + $('a.headerlink').each(function() { + var html = '<a class="headerlink" href="' + base + $(this).attr('href') + + '" title="原文へのリンク">(原文)</a>'; + $(this).after(html); + }) +}); ======================================= --- /tools/sphinxext/layout.html Tue Nov 6 01:00:41 2012 +++ /tools/sphinxext/layout.html Sat Nov 17 18:48:00 2012 @@ -8,6 +8,7 @@ {% block extrahead %} <link rel="shortcut icon" type="image/png" href="{{ pathto('_static/py.png', 1) }}" /> {% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %} + {% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/_jp.js', 1) }}"></script>{% endif %} {{ super() }} {% endblock %} {% block footer %}