Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
// @name AntiAdware
// @name:fr AntiAdware
// @name:de AntiAdware
// @name:zh-TW AntiAdware
// @name:zh-CN AntiAdware
// @author noname120
// @namespace HandyUserscripts
// @icon https://i.imgur.com/tq7PJr0.png
// @description Remove forced download accelerators, managers, and adware on
supported websites
// @description:fr Évitez les applications indésirables lors des téléchargements
sur de nombreux sites avec AntiAdware !
// @description:de Mit AntiAdware vermeidest du auf zahlreichen Webseiten den
versehentlichen Download von unerwünschten Programmen
// @description:zh-TW AntiAdware, 讓你避免在許多網站上意外下載到廣告軟體.
// @description:zh-CN AntiAdware, 让你避免在许多网站上意外下载到广告软体.
// @version 1.42.1
// @license Creative Commons BY-NC-SA
// @include http*://*180upload.com/*
// @include http*://*4upfiles.com/*
// @include http*://*get*.adobe.com/*flashplayer/*
// @include http*://*get*.adobe.com/*reader/*
// @include http*://*afterdawn.com/software/*
// @include http*://*akafile.com/akago.php
// @include http*://*chip.de/downloads/*
// @include http*://*clicknupload.com/*
// @include http*://*cloudyvideos.com/*
// @include http*://*coolrom.com/*/*
// @include http*://*clipconverter.cc/download/*
// @include http*://*dailyuploads.net/*
// @include http*://*datafilehost.com/d/*
// @include http*://*davvas.com/*
// @include http*://*d-h.st/*
// @include http*://*download.cnet.com/*
// @include http*://*telecharger.cnet.com/*
// @include http*://*descargar.cnet.com/*
// @include http*://*de.download.cnet.com/*
// @include http*://*filefactory.com/file/*
// @include http*://*filescdn.com/*
// @include http*://*filehippo.com/*download*
// @include http*://*freewarefiles.com/downloads_counter.php*
// @include http*://*google.*/earth/download/ge/agree.html
// @include http*://*hugefiles.net/*
// @include http*://*hulkload.com/*
// @include http*://*kingfiles.net/*
// @include http*://*letitbit.net/download/*
// @include http*://*loveroms.com/*
// @include http*://*up.media1fire.com/*
// @include http*://*mightyupload.com/*
// @include http*://*mp3fil.*/get/*
// @include http*://*mp3juices.to/*
// @include http*://*mp3olimp.net/*
// @include http*://*mp3olimpz.com/*
// @include http*://*opensubtitles.org/*/subtitles/*
// @include http*://*revclouds.com/*
// @include http*://*romhustler.net/download/*
// @include http*://*romhustler.net/rom/*
// @include http*://*secureupload.eu/*
// @include http*://*sendspace.com/file/*
// @include http*://*sharebeast.com/*
// @include http*://*shared.com/*
// @include http*://*softm8.com*
// @include http*://*.softonic.*
// @include http*://*sourceforge.net/*
// @include http*://*tusfiles.net/*
// @include http*://*unlimitzone.com/*
// @include http*://*uploading.com/*
// @include http*://*uploadocean.com/*
// @include http*://*uplod.ws/*
// @include http*://*uploads.to/*
// @include http*://*uptobox.com/*
// @include http*://*userscdn.com/*
// @include http*://*ziddu.com/downloadfile/*
// We don't use this method, however a side effect of it is that it restores the
Greasemonkey sandbox, avoiding jQuery conflicts
// @grant GM_addStyle
// @grant unsafeWindow
// @homepageURL https://github.com/HandyUserscripts/AntiAdware#readme
// @supportURL https://github.com/HandyUserscripts/AntiAdware/issues
// @run-at document-start
// ==/UserScript==
void
function () {
// If true, displays log in the console
var o_debug = false
document.location.replace(document.location.href.replace('installer=1',
'installer=0'))
}
// Software page
$('input[name=installer]').prop('value', '0')
var downloadButton = $('#download-main-button')
var adwareLink = downloadButton.prop('href')
adwareLink = adwareLink.replace('installer=1', 'installer=0')
downloadButton.prop('href', adwareLink)
}
},
Akafile: {
host: ['akafile.com'],
// Find the real download link in the comments section and replace the
fake one with this (if the fake is not a valid link)
exec: function () {
// If the link is already a valid one we don't replace it
var testHost = new RegExp("aik.wolfup.net", 'i')
if (testHost.test($("#download1").attr("href"))) return
// Get comment section and enumerate each element having the right
id, check if it's a proper download link
var comments = $
('#continue').comments().children('#download1').each(function () {
if (testHost.test($(this).attr("href"))) {
$("#download1").attr("href", $(this).attr("href"))
return
}
});
}
},
Chip: {
host: ['chip.de'],
hide: ['.download_button'],
exec: function() {
var dl = $('.ManualInstallLink').prop('href')
var btn = $('.dl-btn-default .Download-Button')
btn.prop('href', dl)
}
},
Clicknupload: {
host: ['clicknupload.com'],
uncheck: ['#d_acc_checkbox'],
hide: ['#w_download', '#d_acc']
},
ClipConverter: {
host: ['clipconverter.cc'],
uncheck: ['#dlcp'],
hide: ['div[style="width: 340px;margin-left: 25px;margin-top: 7px;"]']
},
CloudyVideos: {
host: ['cloudyvideos.com'],
uncheck: ['#use-manager'],
hide: ['#download-box > label']
},
Coolrom: {
host: ['coolrom.com'],
hide: ['table[align="center"][width="300"]'],
exec: function() {
window.addEventListener("load", function () {
var downloadButton = $
('img[src*="download_large.png"]').parent('a')
var downloadId = document.location.pathname.split('/')[3]
adwObj.attr('href', directUrl)
}
},
RevClouds: {
host: ['revclouds.com'],
uncheck: ['#tick-dwn'],
hide: ['.tick-box']
},
Romhustler: {
host: ['romhustler.net'],
uncheck: ['#use_accelerator'],
hide: ['.accelerator']
},
Secureupload: {
host: ['secureupload.eu'],
uncheck: ['form[name=dlmanager] > input:checkbox'],
optuncheck: {
// Never stop to try unchecking the checkbox
constantcheck: true
},
hide: ['form[name=dlmanager]',
'img[src="https://www.secureupload.eu/gfx/dlbtn.png"]',
'img[src="https://www.secureupload.eu/gfx/freedl.png"]'],
opthide: {
// Never stop to try hiding the object
constantcheck: true
}
},
Sendspace: {
host: ['sendspace.com'],
uncheck: ['#quickchk'],
hide: ["form > div:contains('with sendspace accelerator')",'#quickchk']
},
Sharebeast: {
host: ['sharebeast.com'],
uncheck: ['#sharebeast_downloader'],
hide: ['#sharebeast_downloader_container']
},
Shared: {
host: ['shared.com'],
uncheck: ['#use-manager'],
hide: ['#webpick-option']
},
SoftM8: {
host: ['.softm8.com'],
hide: ['#dinfo2[style="clear:both;"]'], // Blah blah about Adware
exec: function() {
var butMatch = '.buttonDownload.dbtndl'
var dlBut = $(butMatch)
managerButton.prop('href', directLink)
}
},
Sourceforge: {
host: ['sourceforge.net'],
hide: ['.direct-dl', '.info-circle', '.btn-ddl-toggle'],
exec: function() {
// Hotfix: if the user is on an adware-bundled download page
if (document.location.pathname.contains('/download') && !
document.location.search.contains('nowrap')) {
// Add the argument as first argument (?) or secondary
argument (&)
var prefix = document.location.search.contains('?')? '&' :
'?';
document.location.search = document.location.search +
prefix + 'nowrap';
}
try {
// Seen in browsing files pages
var toggleBtn = $('a.btn-ddl-toggle');
// In case the text contains the pattern telling to the
user that adware is enabled
if (exists(toggleBtn) &&
toggleBtn.html().contains(toggleBtn.attr('data-content-nowrap'))) {
// We disable it
unsafeWindow.$('a.btn-ddl-toggle').click();
}
} catch (e) {}
$("small:contains('Installer Enabled')").html(fileName[1])
}
// Otherwise append it
$(this).prop('href', $(this).prop('href') + '&nowrap')
})
}, 50)
}
},
Tusfiles: {
host: ['tusfiles.net'],
uncheck: ['input:checkbox[name=quick]'],
hide: ['input:checkbox[name=quick] ~ label',
'input:checkbox[name=quick]','a[target=_blank]
[href*="http://sharesuper.info/"],img[src="https://z.tusfiles.net/i/dll.png"]']
},
Uploading: {
host: ['uploading.com'],
uncheck: ['#force_exe'],
hide: ['.use_download_manager']
},
UploadOcean: {
host: ['uploadocean.com'],
uncheck: ['#tick-dwn'],
hide: ['.tick-box']
},
Uplodws:{
host: ['uplod.ws'],
uncheck: ['#chkIsAdd'],
hide: ['label:contains("offer")','img[src="http://goo.gl/CGHVVo"]']
},
Uploads: {
host: ['uploads.to'],
uncheck: ['#chkIsAdd'],
hide: ['a:contains("MANAGER")','center:contains("Offer")'],
},
Uptobox: {
host: ['uptobox.com'],
hide: ['div.reseller > table[align=center]'],
exec: function() {
var button = $('div.reseller > table[align=center]
div[align=center] > a')
var adware = button.prop('href')
// Retrieve the real download link and change the button with this
link
var download = adware.match(/&product_download_url=([^$&]+)$/)[1]
button.prop('href', download)
// Generic functions
// Avoids conflicts when the main page is also using jQuery or another library
using '$'
// this.$ = this.jQuery = jQuery.noConflict(true);
// --> Instead I use @grant GM_addStyle which restores the sandbox and thus
avoid us this trick
} else if (
blnDeep &&
(objChildNode.nodeType === 1)
) {
}
);
// Allows to remove a substring from a string even when present multiple times
String.prototype.removeAll = function (testString) {
var retString = this;
while ((currIndex = retString.indexOf(testString)) != -1) {
retString = retString.removeOnce(testString);
}
return retString
}
// FIXME: avoid to blindly set the display to block (can be inline too)
JQobject.attr("style", "display : block !important")
return true
}