Greasy Fork is available in English.

AntiAdware

Remove forced download accelerators, managers, and adware on supported websites

< Valutazione su AntiAdware

Domanda/commento

§
Pubblicato: 17/03/2017
Modificato: 17/03/2017
Very many errors and mistakes.

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);
}
};
devnoname120Autore
§
Pubblicato: 17/03/2017
Your message is hard to read, please put ``` around your code ```.

Could you please change the rating of your message to "Без оценки — просто вопрос, комментарий, сообщение об ошибке, запрос добавления новых функций"?
This is the right rating for reporting bugs.
try some linter or IDE (for example webstorm or phpstorm
devnoname120Autore
§
Pubblicato: 19/03/2017

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.

sorry and forget :wink:

Pubblica risposta

Accedi per pubblicare una risposta.