mirror of
https://0xacab.org/dCF/deCloudflare.git
synced 2025-01-28 18:22:12 -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) => {
|
||||
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') {
|
||||
token = r[1];
|
||||
if (token.length == 20) {
|
||||
@ -2273,4 +2290,4 @@ browser.runtime.onInstalled.addListener(g => {
|
||||
browser.runtime.openOptionsPage();
|
||||
showreply('Hello!', 'Please set your token to begin.');
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user