Skip to content

Commit

Permalink
deploy: ac2f5d5
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaBot committed Sep 28, 2023
1 parent ec6d178 commit d1457e4
Show file tree
Hide file tree
Showing 21 changed files with 428 additions and 345 deletions.
3 changes: 2 additions & 1 deletion Assets/addthis-com_addthis_widget.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(function () {
'use strict';

const noopfn = function () {
};
window.addthis = {
Expand All @@ -15,4 +16,4 @@
toolbox: noopfn,
update: noopfn
};
})();
}());
3 changes: 2 additions & 1 deletion Assets/ampproject-org_v0.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(function () {
'use strict';

const head = document.head;
if (!head) { return; }
const style = document.createElement('style');
Expand All @@ -10,4 +11,4 @@
'}'
].join('\n');
head.appendChild(style);
})();
}());
165 changes: 83 additions & 82 deletions Assets/www-google-analytics-com_analytics.js
Original file line number Diff line number Diff line change
@@ -1,88 +1,89 @@
(function () {
'use strict';
// https://developers.google.com/analytics/devguides/collection/analyticsjs/
const noopfn = function () {
};
'use strict';

// https://developers.google.com/analytics/devguides/collection/analyticsjs/
const noopfn = function () {
};
//
const Tracker = function () {
};
const p = Tracker.prototype;
p.get = noopfn;
p.set = noopfn;
p.send = noopfn;
//
const w = window;
const gaName = w.GoogleAnalyticsObject || 'ga';
const gaQueue = w[gaName];
const ga = function () {
const len = arguments.length;
if (len === 0) { return; }
const args = Array.from(arguments);
let fn;
let a = args[len - 1];
if (a instanceof Object && typeof a.hitCallback === 'function') {
fn = a.hitCallback;
} else if (a instanceof Function) {
fn = () => { a(ga.create()); };
} else {
const pos = args.indexOf('hitCallback');
if (pos !== -1 && typeof args[pos + 1] === 'function') {
fn = args[pos + 1];
}
}
if (typeof fn !== 'function') { return; }
try {
fn();
} catch (ex) {
}
};
ga.create = function () {
return new Tracker();
};
ga.getByName = function () {
return new Tracker();
};
ga.getAll = function () {
return [new Tracker()];
};
ga.remove = noopfn;
// https://github.com/uBlockOrigin/uAssets/issues/2107
ga.loaded = true;
w[gaName] = ga;
// https://github.com/gorhill/uBlock/issues/3075
const dl = w.dataLayer;
if (dl instanceof Object) {
if (dl.hide instanceof Object && typeof dl.hide.end === 'function') {
dl.hide.end();
dl.hide.end = () => { };
const Tracker = function () {
};
const p = Tracker.prototype;
p.get = noopfn;
p.set = noopfn;
p.send = noopfn;
//
const w = window;
const gaName = w.GoogleAnalyticsObject || 'ga';
const gaQueue = w[gaName];
const ga = function (...args) {
const len = args.length;
if (len === 0) { return; }
let fn;
const a = args[len - 1];
if (typeof a === 'object' && typeof a.hitCallback === 'function') {
fn = a.hitCallback;
} else if (typeof a === 'function') {
fn = () => { a(ga.create()); };
} else {
const pos = args.indexOf('hitCallback');
if (pos !== -1 && typeof args[pos + 1] === 'function') {
fn = args[pos + 1];
}
}
if (typeof fn !== 'function') { return; }
try {
fn();
} catch (ex) {
}
};
ga.create = function () {
return new Tracker();
};
ga.getByName = function () {
return new Tracker();
};
ga.getAll = function () {
return [new Tracker()];
};
ga.remove = noopfn;
// https://github.com/uBlockOrigin/uAssets/issues/2107
ga.loaded = true;
w[gaName] = ga;
// https://github.com/gorhill/uBlock/issues/3075
const dl = w.dataLayer;
if (typeof dl === 'object') {
if (typeof dl.hide === 'object' && typeof dl.hide.end === 'function') {
dl.hide.end();
dl.hide.end = () => { };
}
if (typeof dl.push === 'function') {
const doCallback = function (item) {
if (typeof item === 'object' === false) { return; }
if (typeof item.eventCallback !== 'function') { return; }
// eslint-disable-next-line sukka/prefer-timer-id -- deliberate use of setTimeout
setTimeout(item.eventCallback, 1);
item.eventCallback = () => { };
};
dl.push = new Proxy(dl.push, {
apply(target, thisArg, args) {
doCallback(args[0]);
return Reflect.apply(target, thisArg, args);
}
if (typeof dl.push === 'function') {
const doCallback = function (item) {
if (item instanceof Object === false) { return; }
if (typeof item.eventCallback !== 'function') { return; }
setTimeout(item.eventCallback, 1);
item.eventCallback = () => { };
};
dl.push = new Proxy(dl.push, {
apply: function (target, thisArg, args) {
doCallback(args[0]);
return Reflect.apply(target, thisArg, args);
}
});
if (Array.isArray(dl)) {
const q = dl.slice();
for (const item of q) {
doCallback(item);
}
}
});
if (Array.isArray(dl)) {
const q = dl.slice();
for (const item of q) {
doCallback(item);
}
}
}
// empty ga queue
if (typeof gaQueue === 'function' && Array.isArray(gaQueue.q)) {
const q = gaQueue.q.slice();
gaQueue.q.length = 0;
for (const entry of q) {
ga(...entry);
}
}
// empty ga queue
if (typeof gaQueue === 'function' && Array.isArray(gaQueue.q)) {
const q = gaQueue.q.slice();
gaQueue.q.length = 0;
for (const entry of q) {
ga(...entry);
}
})();
}
}());
5 changes: 3 additions & 2 deletions Assets/www-google-analytics-com_cx_api.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
(function () {
'use strict';

const noopfn = function () {
};
window.cxApi = {
chooseVariation: function () {
chooseVariation() {
return 0;
},
getChosenVariation: noopfn,
Expand All @@ -12,4 +13,4 @@
setCookiePath: noopfn,
setDomainName: noopfn
};
})();
}());
16 changes: 9 additions & 7 deletions Assets/www-google-analytics-com_ga.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(function () {
'use strict';

const noopfn = function () {
};
//
Expand All @@ -20,9 +21,9 @@
if (Array.isArray(a) === false) { return; }
// https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiDomainDirectory#_gat.GA_Tracker_._link
if (
typeof a[0] === 'string' &&
/(^|\.)_link$/.test(a[0]) &&
typeof a[1] === 'string'
typeof a[0] === 'string'
&& /(^|\.)_link$/.test(a[0])
&& typeof a[1] === 'string'
) {
try {
window.location.assign(a[1]);
Expand Down Expand Up @@ -69,7 +70,7 @@
}
};
return out;
})();
}());
//
const Gat = function () {
};
Expand Down Expand Up @@ -102,6 +103,7 @@
gaq.push(aa.shift());
}
}
})();
window._gaq = gaq.qf = gaq;
})();
}());
gaq.qf = gaq;
window._gaq = gaq;
}());
5 changes: 3 additions & 2 deletions Assets/www-google-analytics-com_inpage_linkid.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
(function () {
'use strict';

window._gaq = window._gaq || {
push: function () {
push() {
}
};
})();
}());
9 changes: 5 additions & 4 deletions Assets/www-googlesyndication-com_adsbygoogle.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
(function () {
'use strict';

const init = () => {
window.adsbygoogle = {
loaded: true,
push: function () {
push() {
}
};
const phs = document.querySelectorAll('.adsbygoogle');
Expand All @@ -21,11 +22,11 @@
}
};
if (
document.querySelectorAll('.adsbygoogle').length === 0 &&
document.readyState === 'loading'
document.querySelectorAll('.adsbygoogle').length === 0
&& document.readyState === 'loading'
) {
window.addEventListener('DOMContentLoaded', init, { once: true });
} else {
init();
}
})();
}());
12 changes: 7 additions & 5 deletions Assets/www-googletagmanager-com_gtm.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
(function () {
'use strict';

const noopfn = function () {
};
const w = window;
w.ga = w.ga || noopfn;
const dl = w.dataLayer;
if (dl instanceof Object === false) { return; }
if (dl.hide instanceof Object && typeof dl.hide.end === 'function') {
if (typeof dl !== 'object') { return; }
if (typeof dl.hide === 'object' && typeof dl.hide.end === 'function') {
dl.hide.end();
}
if (typeof dl.push === 'function') {
dl.push = function (o) {
if (
o instanceof Object &&
typeof o.eventCallback === 'function'
typeof o === 'object'
&& typeof o.eventCallback === 'function'
) {
// eslint-disable-next-line sukka/prefer-timer-id -- deliberately use setTimeout
setTimeout(o.eventCallback, 1);
}
};
}
})();
}());
7 changes: 4 additions & 3 deletions Assets/www-googletagservices-com_gpt.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(function () {
'use strict';

// https://developers.google.com/doubleclick-gpt/reference
const noopfn = function () {
}.bind();
Expand Down Expand Up @@ -42,8 +43,8 @@
clearTagForChildDirectedTreatment: noopthisfn,
clearTargeting: noopthisfn,
collapseEmptyDivs: noopfn,
defineOutOfPagePassback: function () { return new PassbackSlot(); },
definePassback: function () { return new PassbackSlot(); },
defineOutOfPagePassback() { return new PassbackSlot(); },
definePassback() { return new PassbackSlot(); },
disableInitialLoad: noopfn,
display: noopfn,
enableAsyncRendering: noopfn,
Expand Down Expand Up @@ -129,4 +130,4 @@
while (cmd.length !== 0) {
gpt.cmd.push(cmd.shift());
}
})();
}());
9 changes: 7 additions & 2 deletions Clash/domainset/cdn.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
########################################
# Sukka's Ruleset - CDN Domains
# Last Updated: 2023-09-27T15:53:55.210Z
# Size: 1493
# Last Updated: 2023-09-28T16:39:37.716Z
# Size: 1498
# License: AGPL 3.0
# Homepage: https://ruleset.skk.moe
# GitHub: https://github.com/SukkaW/Surge
Expand Down Expand Up @@ -143,6 +143,8 @@ i2.wp.com
i3.wp.com
c0.wp.com
widgets.wp.com
fonts.wp.com
fonts-api.wp.com
+.gravatar.com
+.wpcomstaging.com
+.files.wordpress.com
Expand Down Expand Up @@ -1501,4 +1503,7 @@ cdn.freebiesupply.com
static.tronscan.org
asset-cdn.uscardforum.com
public.saasexch.com
img.foresightnews.pro
cdn.sunofbeaches.com
image.theblockbeats.info
################# END ###################
Loading

0 comments on commit d1457e4

Please sign in to comment.