mirror of
https://0xacab.org/dCF/deCloudflare.git
synced 2025-01-29 19:01:25 -05:00
Replace main.js
This commit is contained in:
parent
a3bba4dee7
commit
e0cd6101d3
@ -2198,6 +2198,23 @@ browser.webNavigation.onCompleted.addListener(() => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
browser.runtime.onMessage.addListener((r, s, sr) => {
|
browser.runtime.onMessage.addListener((r, s, sr) => {
|
||||||
|
if (r[0] == 'iidCACHEget') {
|
||||||
|
let iidDOMAIN = get_realdomain(r[1]) + '.mpdns_iid';
|
||||||
|
if (domainCAT[iidDOMAIN]) {
|
||||||
|
sr([true, domainCAT[iidDOMAIN][1]]);
|
||||||
|
} else {
|
||||||
|
sr([false, 0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (r[0] == 'iidCACHEset') {
|
||||||
|
let iidDOMAIN = get_realdomain(r[1]) + '.mpdns_iid';
|
||||||
|
if (!domainCAT[iidDOMAIN]) {
|
||||||
|
domainCAT[iidDOMAIN] = [tUNIX(), r[2],
|
||||||
|
[]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
sr(true);
|
||||||
|
}
|
||||||
if (r[0] == 'set') {
|
if (r[0] == 'set') {
|
||||||
token = r[1];
|
token = r[1];
|
||||||
if (token.length == 20) {
|
if (token.length == 20) {
|
||||||
@ -2273,4 +2290,4 @@ browser.runtime.onInstalled.addListener(g => {
|
|||||||
browser.runtime.openOptionsPage();
|
browser.runtime.openOptionsPage();
|
||||||
showreply('Hello!', 'Please set your token to begin.');
|
showreply('Hello!', 'Please set your token to begin.');
|
||||||
}
|
}
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user