()
| 54 | |
| 55 | //重置当前版本链接,不带版本号 |
| 56 | function resetCurrentVersionLink() { |
| 57 | if (!window.version) { |
| 58 | return; |
| 59 | } |
| 60 | |
| 61 | var version = window.version; |
| 62 | version = version.toString(); |
| 63 | $(".icl-nav-version").each(function (key, item) { |
| 64 | if (item.href) { |
| 65 | var reg = new RegExp("(.*)\/(" + version + ")(\/.*)"); |
| 66 | var match = item.href.match(reg); |
| 67 | if (match && match[1] && match[3]) { |
| 68 | item.href = match[1] + match[3]; |
| 69 | } |
| 70 | } |
| 71 | }); |
| 72 | } |
| 73 | |
| 74 | function localize() { |
| 75 | var lang = utils.getLanguage(); |
no test coverage detected