Skip to content

Commit f17e968

Browse files
author
shengyonggen
committed
Release 1.18.11
1 parent c6f86cc commit f17e968

14 files changed

+101
-55
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.18.11 (2021-7-31)
2+
1. 修复
3+
- 修复 `IE10``IE11``hash` 实现的单页面路由不发送 `$pageview` 事件的问题
4+
15
## 1.18.10 (2021-7-30)
26
1. 新增
37
- 新增 `Cookie` 安全 `SameSite` 配置

core/sensorsdata.amd.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/sensorsdata.es6.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/sensorsdata.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

heatmap.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sa-sdk-javascript",
3-
"version": "1.18.10",
3+
"version": "1.18.11",
44
"description": "official sensorsdata javascript sdk",
55
"main": "sensorsdata.min.js",
66
"scripts": {

product/heatmap.full.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9405,7 +9405,7 @@
94059405

94069406
window.sa_jssdk_heatmap_render = function(se, data, type, url) {
94079407
sd = se;
9408-
sd.heatmap_version = '1.18.10';
9408+
sd.heatmap_version = '1.18.11';
94099409
_ = sd._;
94109410

94119411
_.bindReady = function(fn, win) {

product/sensorsdata.amd.full.js

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,22 +1603,36 @@
16031603
var historyPushState = window.history.pushState;
16041604
var historyReplaceState = window.history.replaceState;
16051605

1606-
window.history.pushState = function() {
1607-
historyPushState.apply(window.history, arguments);
1608-
callback(current_url);
1609-
current_url = location.href;
1610-
};
1611-
window.history.replaceState = function() {
1612-
historyReplaceState.apply(window.history, arguments);
1613-
callback(current_url);
1614-
current_url = location.href;
1615-
};
1606+
if (_.isFunction(window.history.pushState)) {
1607+
window.history.pushState = function() {
1608+
historyPushState.apply(window.history, arguments);
1609+
callback(current_url);
1610+
current_url = location.href;
1611+
};
1612+
}
1613+
1614+
if (_.isFunction(window.history.replaceState)) {
1615+
window.history.replaceState = function() {
1616+
historyReplaceState.apply(window.history, arguments);
1617+
callback(current_url);
1618+
current_url = location.href;
1619+
};
1620+
}
1621+
1622+
var singlePageEvent;
1623+
if (window.document.documentMode) {
1624+
singlePageEvent = 'hashchange';
1625+
} else {
1626+
singlePageEvent = historyPushState ? 'popstate' : 'hashchange';
1627+
}
16161628

1617-
var singlePageEvent = historyPushState ? 'popstate' : 'hashchange';
16181629
_.addEvent(window, singlePageEvent, function() {
16191630
callback(current_url);
16201631
current_url = location.href;
16211632
});
1633+
1634+
1635+
16221636
};
16231637

16241638
_.cookie = {
@@ -3451,7 +3465,7 @@
34513465

34523466
sd.setInitVar = function() {
34533467
sd._t = sd._t || 1 * new Date();
3454-
sd.lib_version = '1.18.10';
3468+
sd.lib_version = '1.18.11';
34553469
sd.is_first_visitor = false;
34563470
sd.source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
34573471
};
@@ -4379,7 +4393,7 @@
43794393
source: 'sa-web-sdk',
43804394
type: 'v-is-vtrack',
43814395
data: {
4382-
sdkversion: '1.18.10'
4396+
sdkversion: '1.18.11'
43834397
}
43844398
},
43854399
'*'

product/sensorsdata.es6.full.js

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,22 +1597,36 @@ if (!String.prototype.replaceAll) {
15971597
var historyPushState = window.history.pushState;
15981598
var historyReplaceState = window.history.replaceState;
15991599

1600-
window.history.pushState = function() {
1601-
historyPushState.apply(window.history, arguments);
1602-
callback(current_url);
1603-
current_url = location.href;
1604-
};
1605-
window.history.replaceState = function() {
1606-
historyReplaceState.apply(window.history, arguments);
1607-
callback(current_url);
1608-
current_url = location.href;
1609-
};
1600+
if (_.isFunction(window.history.pushState)) {
1601+
window.history.pushState = function() {
1602+
historyPushState.apply(window.history, arguments);
1603+
callback(current_url);
1604+
current_url = location.href;
1605+
};
1606+
}
1607+
1608+
if (_.isFunction(window.history.replaceState)) {
1609+
window.history.replaceState = function() {
1610+
historyReplaceState.apply(window.history, arguments);
1611+
callback(current_url);
1612+
current_url = location.href;
1613+
};
1614+
}
1615+
1616+
var singlePageEvent;
1617+
if (window.document.documentMode) {
1618+
singlePageEvent = 'hashchange';
1619+
} else {
1620+
singlePageEvent = historyPushState ? 'popstate' : 'hashchange';
1621+
}
16101622

1611-
var singlePageEvent = historyPushState ? 'popstate' : 'hashchange';
16121623
_.addEvent(window, singlePageEvent, function() {
16131624
callback(current_url);
16141625
current_url = location.href;
16151626
});
1627+
1628+
1629+
16161630
};
16171631

16181632
_.cookie = {
@@ -3445,7 +3459,7 @@ sd.setPreConfig = function(sa) {
34453459

34463460
sd.setInitVar = function() {
34473461
sd._t = sd._t || 1 * new Date();
3448-
sd.lib_version = '1.18.10';
3462+
sd.lib_version = '1.18.11';
34493463
sd.is_first_visitor = false;
34503464
sd.source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
34513465
};
@@ -4373,7 +4387,7 @@ sd.detectMode = function() {
43734387
source: 'sa-web-sdk',
43744388
type: 'v-is-vtrack',
43754389
data: {
4376-
sdkversion: '1.18.10'
4390+
sdkversion: '1.18.11'
43774391
}
43784392
},
43794393
'*'

product/sensorsdata.full.js

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,22 +1605,36 @@
16051605
var historyPushState = window.history.pushState;
16061606
var historyReplaceState = window.history.replaceState;
16071607

1608-
window.history.pushState = function() {
1609-
historyPushState.apply(window.history, arguments);
1610-
callback(current_url);
1611-
current_url = location.href;
1612-
};
1613-
window.history.replaceState = function() {
1614-
historyReplaceState.apply(window.history, arguments);
1615-
callback(current_url);
1616-
current_url = location.href;
1617-
};
1608+
if (_.isFunction(window.history.pushState)) {
1609+
window.history.pushState = function() {
1610+
historyPushState.apply(window.history, arguments);
1611+
callback(current_url);
1612+
current_url = location.href;
1613+
};
1614+
}
1615+
1616+
if (_.isFunction(window.history.replaceState)) {
1617+
window.history.replaceState = function() {
1618+
historyReplaceState.apply(window.history, arguments);
1619+
callback(current_url);
1620+
current_url = location.href;
1621+
};
1622+
}
1623+
1624+
var singlePageEvent;
1625+
if (window.document.documentMode) {
1626+
singlePageEvent = 'hashchange';
1627+
} else {
1628+
singlePageEvent = historyPushState ? 'popstate' : 'hashchange';
1629+
}
16181630

1619-
var singlePageEvent = historyPushState ? 'popstate' : 'hashchange';
16201631
_.addEvent(window, singlePageEvent, function() {
16211632
callback(current_url);
16221633
current_url = location.href;
16231634
});
1635+
1636+
1637+
16241638
};
16251639

16261640
_.cookie = {
@@ -3453,7 +3467,7 @@
34533467

34543468
sd.setInitVar = function() {
34553469
sd._t = sd._t || 1 * new Date();
3456-
sd.lib_version = '1.18.10';
3470+
sd.lib_version = '1.18.11';
34573471
sd.is_first_visitor = false;
34583472
sd.source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
34593473
};
@@ -4381,7 +4395,7 @@
43814395
source: 'sa-web-sdk',
43824396
type: 'v-is-vtrack',
43834397
data: {
4384-
sdkversion: '1.18.10'
4398+
sdkversion: '1.18.11'
43854399
}
43864400
},
43874401
'*'

0 commit comments

Comments
 (0)