Greasy Fork is available in English.
Remove forced download accelerators, managers, and adware on supported websites
It's hard to understand what you're willing me to do. Keywords like const
are ECMA-262 (2016) features, and I don't see any reason to use them right now.
Also, your code looks broken (unescaped /
, unfinished '
, etc.) but it might be because you need to use code sections when pasting code.
If instead you think that some websites have changed and so don't work properly anymore, please give me a link and the source code of the website around the checkbox.
For example
Datafilehost: {
host: ['datafilehost.com'],
hide: ['form[name=cbf]'],
exec: function () {
let adwarelessLink;
let n;
const id = document.location.pathname.match(/^/;d/(w +);
$/;)
[1];
// DataFileHost doesn't allow to download using HTTPS
adwarelessLink = 'http:' + '//' + document.location.hostname + '/get.php?file=' + id;
n = $('#dl').find('> a')
.clone();
// Replace the adware link
n.prop('href', adwarelessLink);
// Avoid redirection to adware
$('#dl')
.replaceWith(n);
}
};
Is it i must to fix or improve?
or it...
Softonic: {
host: ['.softonic.'],
hide: ['h2:contains("Softonic Downloader") ~ ul', 'h2:contains("Softonic Downloader"), .box-download-footer'],
exec: function () {
let managerButton;
let directButton;
let directLink;
const linkFollow = $('#download_al').find('> p > a[rel=nofollow]';orfollow;]');
if (exists(linkFollow)) {
document.location.replace(linkFollow.prop('href'));
return;
}
managerButton = $('#download-button-sd, #download-button');
directButton = $('#download-button-alternative');
if (!exists(managerButton) || !exists(directButton)) {
return;
}
directLink = directButton.prop('href');
// Avoid jQuery click redirection set on the download button
setInterval(function () {
unsafeWindow.$('#download-button-sd, #download-button')
.off('click');
}, 100);
managerButton.prop('href', directLink);
}
};