Fix-update NY Times (incognito mode)
This commit is contained in:
parent
c790a2dde0
commit
70d6ccc663
@ -235,7 +235,12 @@ else if (matchDomain("thehindu.com")) {
|
||||
}
|
||||
|
||||
else if (matchDomain("nytimes.com")) {
|
||||
const preview_button = document.querySelector('.css-3s1ce0');
|
||||
function nyt_main() {
|
||||
navigator.storage.estimate = undefined;
|
||||
webkitRequestFileSystem = function () {};
|
||||
}
|
||||
insert_script(nyt_main);
|
||||
let preview_button = document.querySelector('.css-3s1ce0');
|
||||
if (preview_button)
|
||||
preview_button.click();
|
||||
}
|
||||
@ -885,6 +890,16 @@ function setCookie(name, value, domain, path, days) {
|
||||
document.cookie = name + "=" + (value || "") + "; domain=" + domain + "; path=" + path + "; max-age=" + max_age;
|
||||
}
|
||||
|
||||
function insert_script(func) {
|
||||
let bpc_script = document.querySelector('script#bpc_script');
|
||||
if (!bpc_script) {
|
||||
let script = document.createElement('script');
|
||||
script.setAttribute('id', 'bpc_script');
|
||||
script.appendChild(document.createTextNode('(' + func + ')();'));
|
||||
(document.body || document.head || document.documentElement).appendChild(script);
|
||||
}
|
||||
}
|
||||
|
||||
function genHexString(len) {
|
||||
let output = '';
|
||||
for (let i = 0; i < len; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user