MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / resetCurrentVersionLink

Function resetCurrentVersionLink

examples/js/common.js:56–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 1

onLoadCallBackFunction · 0.85

Calls 3

matchMethod · 0.80
$Function · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected