mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
Improve GA's surrogate script
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1807
This commit is contained in:
parent
4efa6be96b
commit
6f49e079db
@ -38,12 +38,14 @@
|
||||
if ( typeof a === 'function' ) {
|
||||
a(); return;
|
||||
}
|
||||
if ( Array.isArray(a) === false ) {
|
||||
return;
|
||||
}
|
||||
// https://twitter.com/catovitch/status/776442930345218048
|
||||
if ( Array.isArray(a) === false ) { return; }
|
||||
// https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiDomainDirectory#_gat.GA_Tracker_._link
|
||||
if ( a[0] === '_link' && typeof a[1] === 'string' ) {
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/1807
|
||||
if (
|
||||
typeof a[0] === 'string' &&
|
||||
/(^|\.)_link$/.test(a[0]) &&
|
||||
typeof a[1] === 'string'
|
||||
) {
|
||||
window.location.assign(a[1]);
|
||||
}
|
||||
// https://github.com/gorhill/uBlock/issues/2162
|
||||
|
Loading…
Reference in New Issue
Block a user