[Pythonjp-checkins] [py33.python-doc-ja] push by songofacandy - version switcher のドメインを .jp に変更 on 2012-11-26 06:51 GMT

Back to archive index

pytho****@googl***** pytho****@googl*****
2012年 11月 26日 (月) 15:52:19 JST


Revision: ccdc72b7beff
Branch:   default
Author:   "INADA Naoki  <songo****@gmail*****>
Date:     Sun Nov 25 22:51:55 2012
Log:      version switcher のドメインを .jp に変更
http://code.google.com/p/python-doc-ja/source/detail?r=ccdc72b7beff&repo=py33

Modified:
  /tools/sphinxext/static/version_switch.js

=======================================
--- /tools/sphinxext/static/version_switch.js	Sun Nov 25 16:07:20 2012
+++ /tools/sphinxext/static/version_switch.js	Sun Nov 25 22:51:55 2012
@@ -25,12 +25,12 @@
    }

    function patch_url(url, new_version) {
-    var url_re = /\.org\/(\d|py3k|dev|((release\/)?\d\.\d[\w\d\.]*))\//,
-        new_url = url.replace(url_re, '.org/' + new_version + '/');
+    var url_re = /\.jp\/(\d|py3k|dev|((release\/)?\d\.\d[\w\d\.]*))\//,
+        new_url = url.replace(url_re, '.jp/' + new_version + '/');

      if (new_url == url && !new_url.match(url_re)) {
        // python 2 url without version?
-      new_url = url.replace(/\.org\//, '.org/' + new_version + '/');
+      new_url = url.replace(/\.jp\//, '.jp/' + new_version + '/');
      }
      return new_url;
    }
@@ -49,7 +49,7 @@
             window.location.href = new_url;
          },
          error: function() {
-           window.location.href = 'http://docs.python.org/' + selected;
+           window.location.href = 'http://docs.python.jp/' + selected;
          }
        });
      }




Pythonjp-checkins メーリングリストの案内
Back to archive index