WarBB3 - Warez-BB Links Checker (Fixed)

Automatically checks for dead links from various file hosting services.

// ==UserScript==
// @name           WarBB3 - Warez-BB Links Checker (Fixed)
// @description    Automatically checks for dead links from various file hosting services.
// @details        Based on WarBB - Warez-BB Links Checker and W.A.R. Links Checker, this script automatically checks links from 1000+ unique filehostings. For Firefox, Chrome, Safari.
// @version        3.0.7
// @license        Please do not modify yourself, contact HD3D with any problems
// @author         HD3D / Formally by iKickback & thecodingdude / Original by dkitty
// @include        *warezbook.org*
// @include        *warez-bb.org*
// @include        *safelinking.net*
// @grant          GM_xmlhttpRequest
// @grant          GM_addStyle
// @grant          GM_registerMenuCommand
// @grant          GM_getResourceText
// @require        https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @require	 	   https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js
// @homepage       https://greasyfork.org/en/scripts/3632-warbb3-warez-bb-links-checker-fixed
// @usoscript      153759
// @noframes
// @connect *
// @namespace https://greasyfork.org/users/3905
// ==/UserScript==

var WarBB_version = "3.0.7";

//separate alternative domains with "|" char (first name is considered being main)
var allHostNames = ["anonfile.com", "ddl.to", "streamwire.net", "uploadship.com", "babauploads.com", "fileup.cc", "upload.ac|uplod.io", "hotlink.cc", "uploadbuzz.cc", "dbupload.co", "desiupload.co|desiupload.to", "uploadever.com", "uploadrive.com", "snowfiles.com", "uploader.link",
 "dbree.co", "letsupload.co", "uploadev.org", "uploadgig.com", "uploadcloud.pro", "sendit.cloud", "uploadbaz.me|uploadbaz.net", "uptobox.com", "dailyuploads.net",
"mexa.sh", "mixloads.com", "dropapk.to", "clicknupload.org", "file-up.org|file-upload.com", "uploadbank.com", "megaup.net", "1fichier.com|dl4free.com",
"userscloud.com", "2shared.com", "4fastfile.com", "adrive.com", "alfafile.net", "bezvadata.cz", "filebeam.com",
"daten-hoster.de|filehosting.org", "edisk.cz", "fastshare.cz", "filehost.ro", "ifolder.ru|rusfolder.com", "allmyvideos.net",
"filefactory.com", "filerio.in", "filemonster.net", "upstore.net|upsto.re", "box.com", "files.mail.ru",
"secureupload.eu", "filesmonster.com", "filestore.to", "free.fr", "free-uploading.com",
"gigapeta.com", "gigasize.com", "hostuje.net", "vidup.me", 'seecloud.cc', 'inclouddrive.com', 'tempfiles.net',
"leteckaposta.cz|sharegadget.com", "load.to", "mediafire.com", "megafileupload.com", "megashares.com", "filemaze.ws", "movshare.net",
"myupload.dk", "narod.ru|narod.yandex.ru", "fileim.com", "uploadto.us|ultramegabit.com", "limelinx.com", "quickshare.cz", "putcker.com",
"daj.to", "depositfiles.com|dfiles.eu", "rapidgator.net|rg.to", "rarefile.net", "rghost.net", "sendmyway.com",
"sendspace.com", "solidfiles.com", "zippyshare.com", "wikiupload.com", "uloz.to|ulozto.cz|bagruj.cz|zachowajto.pl", "loudupload.com",
"ulozisko.sk", "uloziste.com", "uploaded.to|ul.to", "uploadspace.pl", "upnito.sk", "veehd.com", "videobb.com", "happystreams.net",
"videozer.com", "uploads.bizhat.com", "webshare.cz", "xdisk.cz", "yunfile.com|filemarkets.com|yfdisk.com", "mega-myfile.com",
"divshare.com", "flyfiles.net", "nowdownload.eu", "asfile.com", "prefiles.com", "axifile.com", "zalil.ru", "ortofiles.com", "uploadc.com",
"amonshare.com", "data.hu", "spaceforfiles.com|filespace.com", "zalaa.com", 'dropjiffy.com',
"netkups.com", "upfile.biz", "file-speed.com", "speedshare.eu", "tusfiles.net", "uppit.com|up.ht",
"downloadani.me", "filesabc.com", "share.az", "file4safe.com", "4upfiles.com|4up.me|4up.im", "extmatrix.com", "sendfiles.nl", "yourfilestore.com",
"filebig.net", "filefreak.com", "fileswap.com", "potload.com", "thefilebox.com", "filetut.com",
"rockdizfile.com", "exclusivefaile.com|exclusiveloader.com", "myvdrive.com", "filesin.com", "novafile.com",
"longfiles.com", "terafile.co|lumfile.com", "uploadbaz.com", "expressleech.com", "file-space.org", "vshare.eu", "files.indowebster.com", "file4u.pl", "kie.nu",
"superload.cz", "flashx.tv", "divxstage.eu", "filestore.com.ua", "cepzo.com",
"xvidstage.com", "rapidfileshare.net", "filefront.com|gamefront.com", "yourupload.com", "file-upload.net", "upload.ee", "hugefiles.cc", "mega.co.nz|mega.nz",
"unlimitshare.com", "share4web.com", "filedropper.com|filesavr.com", "yourfiles.to", "skydrive.live.com",
"uploadboy.com", "dosya.tc", "exfile.ru", "fileshare.ro", "fshare.vn", "wikifortio.com",
"wyslijto.pl", "kiwi6.com", "localhostr.com|lh.rs|hostr.co", "remixshare.com", "hidemyass.com", "tinyupload.com", "gigabase.com", "trainbit.com",
"hyperfileshare.com", "ge.tt", "mightyupload.com", "megafiles.se", "keep2share.cc|keep2share.com|k2s.cc|keep2s.cc",
"cloud-up.be", "junocloud.me", "fastupload.ro", "howfile.com", "vidspot.net", "file4go.com", "youwatch.org", "spicyfile.com", "m5zn.com",
"filesline.com", "megacache.net", "sanshare.com", "sendfile.su", "akafile.com", "todayfile.com", "lafiles.com", "mystore.to",
"anonfiles.com", "medoupload.com", "herosh.com", "bin.ge", "nowvideo.eu", "video.tt",
"shareplace.com", "terafiles.net", "uploadmb.com", "ex-load.com", 'thaicyberupload.com',
"yourfilelink.com", "backin.net", "dropbox.com", "wikisend.com", "demo.ovh.eu", "filepup.net", "koofile.com", "chayfile.com", "maherfire.com", "droidbin.com", "loadpot.net", "upfile.vn",
"limevideo.net", "lunaticfiles.com", "anysend.com", "redbunker.net", "uploadable.ch", "worldbytez.com", "moevideo.net", "filesupload.org", "filejoker.net",
"wupfile.com", "anafile.com", "shared.com", "filepi.com", "2downloadz.com", "rapidfiles.com", "rosharing.com", "storagely.com", "turtleshare.com", "vipshare.me",
"uploadzeal.com", "wipfiles.net", "tropicshare.com", "archive.org",
"filedais.com", "up09.com", "weshare.me", "lomafile.com",  "hightail.com|yousendit.com", "uploadkadeh.ir",
"4bigbox.com", "sharemods.com", "fastupload.org", "nitroflare.com", "gboxes.com", 'ozofiles.com',
'iranupload.com', 'linkz.ge', 'sdilej.cz', 'tikfile.com', 'upf.co.il', 'upload2box.com', 'uplod.ir', 'indishare.org', 'faststore.org', 'toofile.com', 'rockfile.eu',
'fileboom.me|fboom.me', 'bankupload.com', 'uplooad.net'];

//separate alternative domains with "|" char (first name is considered being main)
var allContainerNames = ["safelinking.net"];
var allContainerNames = ["kprotector.com"];

//separate alternative domains with "|" char (first name is considered being main)
var allObsoleteNames = ["4downfile.org", "www.post4earn.com", "cloudyfiles.com", "suprafiles.net", "owndrives.com", "zorofiles.com", "uploadboxs.com", "mixturecloud.com|mixturefile.com", "queenshare.com|10upload.com", "uploadjet.net", "filesbomb.com", "creafile.net", "rapidstation.com", "hulkload.com", "filewe.com", "sfshare.se", "unlimitzone.com", "filesmall.com", "easybytez.com", "filemac.com|filekom.com", "exashare.com", "jumbofiles.com", "jumbofiles.org|jumbofilebox.com", "upshared.com", "openload.co", "uploadhero.com|uploadhero.co", "easy-share.com|crocko.com", "uploading.com", "eyesfiles.com|eyesfile.net|eyesfile.com|eyesfile.co|eyesfile.org|eyesfile.ca", "100shared.com", "uloz.cz", "storage.to", "iskladka.cz", "file-rack.com", "fast-load.net", "subory.sk", "bigandfree.com", "fileop.com",
"mujsoubor.cz", "rapidturk.com", "sendfile.to", "superfastfile.com", "quickyshare.com", "duckload.com", "uploadstore.net", "meinupload.com", "dualshare.com",
"2xupload.to|2xupload.de", "filebox.ro|fbx.ro", "1000shared.com", "up07.net", "wozupload.com", "themediastorage.com", "oxedion.com", "uploadline.com", "dll.bz", "medofire.com", "medofire.co", "movieshare.in", "milledrive.com", "quickupload.net", "safelink.in",
"metadivx.com", "divxlink.com", "upload-il.com", "fiberstorage.net", "uploads.ws", "uploadrack.com", "teradepot.com", "dataup.to", "upit.to", "driveway.com", "eatlime.com", "a2zuploads.com",
"24uploading.com", "friendlyfiles.net", "gigfiles.net", "thefile.me", "promptfile.com", "yonzy.com", "flyfile.us", "uploadrocket.net", "upload-novalayer.com", "uploadspace.eu", "keepfile.com", "piggyshare.com", "share.cx", "6giga.com", "filecrown.com", "bluehost.to",
"dataport.cz", "filegu.ru", "filebase.to", "xfileload.com", "updown.bz", "files2share.ch", "tuxfile.com", "up-loading.net", "up-file.com", "ezyfile.net", "aiotool.net", "xvideos.com", "filebling.com", "uploadcell.com", "uploadshare.cz",
"mangoshare.com", "medafire.net", "free4share.de", "sendfile.pl", "filewist.com", "filedust.net", "filestab.com", "crazyupload.com|crazyupload.us", "gaiafile.com", "loaded.it", "sharejunky.com", "fileho.com", "bigfile.in",
"bigshare.eu", "depfile.com", "fujifile.me", "seenupload.com", "geupload.com|lenfile.com", "media1fire.com", "radicalshare.com", "dahosting.org", "digisofts.net", "file4save.com", "uploaddot.com", "filechip.com", "filescloud.com", "saveqube.com", "turboshare.de",
"youshare.com", "girlshare.ro", "earnupload.eu", "voowl.com|fileinz.com", "vidx.to", "ezfile.ch|filecloud.io", "grifthost.com", "sharephile.com", "loadster.sx", "airupload.com", "cloudstor.es", "brothershare.com", "forlaughs.net", "jiffyupload.com", "gigeshare.com", "datenklo.net", "z-upload.com", "upload.dj", "loadfiles.in", "dsfileshare.com", "sharesimple.net",
"4files.net", "failai.lt", "hostinoo.com", "fastflv.com", "exfilehost.com", "isavelink.com", "filesear.com", "cometfiles.com", "datafile.com", "shareswift.com", "1file.cc", "odsiebie.com|odsiebie.pl", "streamratio.com", "filenavi.com", "3oof.com", "meshwaar.com", "maxupload.com", "atserver.eu", "uploadlab.com", "i741.com",
"savefiles.net", "uncapped-downloads.com", "upitus.net", "foxishare.com", "movdivx.com", "pandamemo.com", "katzfiles.com", "filebar.kz", "file2upload.net", "d-h.st", "kingsupload.com", "filebling.com", "turboshare.com|turboshare.eu", "rarhost.com", "file2share.biz", "fofly.com", "filespawn.com",
"isharehd.com", "datei.to", "10shared.com", "fliiby.com", "clicktoview.org","vodlocker.com", "kingfiles.net", "shareblue.eu", "dataup.de", "shareonall.com", "sexuploader.com", "megaupload.com|megavideo.com|megaporn.com|megarotic.com", "caizzii.com",
"uploadhyper.com", "novamov.com", "bonanzashare.com", "qfpost.com", "volnyweb.cz", "played.to", "skyfilebox.com", "joinfile.com", "nosvideo.com", "maskfile.com", "hexupload.com", "usershare.net", "filescash.net", "metahyper.com", "combozip.com", "x7.to", "hatlimit.pl", "filepoint.de",
"enterupload.com|flyupload.com", "superupload.com", "2drive.net", "mystream.to", "srapid.eu", "sosame.cz", "filesdump.com", "2-klicks.de", "noovashare.com", "bulletupload.com",
"shareator.com|shareator.net", "fileown.com", "streaming.to", "divxpress.com", "dwn.so|dwnshare.pl", "upgiga.com", "filemup.com", "mediafree.co", "linestorage.com", "silofiles.com", "filehook.com", "uploadking.com", "uploadhere.com", "kewlshare.com", "mountfile.com", "transitfiles.com",
"filejungle.com", "roottail.com", "mrfile.me", "shareshared.com", "filemoney.com", "cloudzilla.to", "creafile.com", "quickyshare.com", "save.am", "petandrive.com", "filezlot.com", "filesonic.com|sharingmatrix.com|wupload.com",
"fileserve.com|uploadstation.com", "uploads.glumbo.com|glumbouploads.com|glumbouploads.net", "rapidable.com", "skipfile.com", "smartuploader.com",
"usaupload.net", "dualshare.com", "guizmodl.net", "sinhro.net", "twojepliki.eu", "sv-esload.com", "storeandserve.com", "cloudyvideos.com", "file2box.com|file2box.net", "flyshare.cz","yabadaba.ru", "cloudcache.cc", "yourfilehost.com", "jakfile.com",
"netkozmos.com", "filepost.com|fp.io", "filesend.net", "filesflash.com", "upafile.com", "kickload.com", "fileforever.net", "pyramidfiles.com", "rioupload.com", "rodfile.com", "filehoot.com", "mxua.com", "interfile.net", 'dogefile.com', "idup.in", "poslisoubor.cz", "gotupload.com", "mooload.com", "fooget.com", "refile.net", "zshare.net", "ddlani.me|ddlanime.com", "ftp2share.com",
"videobam.com", "rapidhide.com", "zupload.com", "bluehaste.com", "mytempdir.com", "onionshare.com", "stahnu.to", "oron.com", "badongo.com|badongo.net", "filereactor.com", "filegaze.com",
"megashare.com|MegaShare.com", "sharerun.com", "uplds.com", "1hostclick.com", "4us.to", "dinnoz.com", "upsharez.com", "snoork.com",
"euroshare.eu", "sockshare.com", "nekaka.com", "missupload.com", "sharerepo.com", "vidbull.com", "gulfup.com", "fileud.com", "up250.com", "miurl.es", "uploadspot.com", "upload.ae", "launchfile.com", "proddl.com", "fileape.com", "azushare.net",
"uploadsfiles.com", "share-online.biz|egoshare.com", "sharingmaster.com", "fileplaneta.com", "up4.im", "dropvideos.net", "cloudnxt.net", "maishare.net|maishare.com", "uploading4u.com|uploading4u.eu", "uploadboost.com", "filelaser.com", "filefat.com",
"divxden.com|vidbux.com", "burnupload.com|burnupload.ihiphop.com", "filedino.com", "4bytez.com", "anonstream.com", "bitroad.net", "brontofile.com", "cloudnator.com|shragle.com", "coolshare.cz", "seeupload.com",
"wolfshare.com", "filetrip.net", "imgjungle.com", "purevid.com", "uploadscenter.com", "vidhog.com", "qshare.com", "dark-uploads.com", "dotavi.com", "file-bit.net", "filecosy.com", "fileduct.com", "filemashine.com", "fileserver.cc", "filetechnology.com",
"fireuploads.net", "minus.com|min.us", "filesmelt.com", "hellupload.com", "rayfile.com", "getzilla.net", "hellspy.com", "holderfile.com", "ihostia.com", "k2files.com", "migahost.com", "mlfat4arab.com", "loadly.com",
"mojofile.com", "uploadic.com", "sharebeast.com", "180upload.com", "verzend.be", "host4files.com", "restfile.ca", "usersfiles.com", "upgolden.com|shallfile.com", "ovfile.com", "plunder.com", "treefile.org|treefiles.com|treesfile.com", "premiuns.org", "shafiles.me", "sharefilehost.com", "storage.novoro.net", "x-fs.com", "uploadstube.de",
"nosupload.com", "rapidsonic.com|fileparadox.com|fileparadox.in", "xfileshare.eu", "bzlink.us", "cing.be", "linksafe.me", "fileupped.com", "getthebit.com", "hackerbox.org", "afilez.com", "uploadmachine.com",
"uploadoz.com", "sharesix.com", "upthe.net", "paid4share.net|paid4share.com", "icefile.net|icefile.com", "smartsharing.net", "fxpag.com", "filebeep.com",
"smartupload.net", "videopremium.net", "timbshare.com", "iuploadfiles.com", "zizfile.com", "files-upload.com", "pointupload.com", "uploadarmy.com", "mydir.eu",
"pctoworld.com", "direktload.org", "momupload.com", "yastorage.com", "sharedzilla.com", "simpleupload.net", "quicksharing.com", "buploads.com",
"gorillavid.in", "hulkshare.com|hu.lk", "uploadhut.com", "karelia.pro", "bestreams.net", "flashdrive.it", "orbitfiles.com", "midload.com", "vidplay.net", "mydisc.net", "med1fire.com", "stahuj.to", "savefile.info", "cocoshare.cc", "sharebase.de", "filehost.to", "bit.vc", "fileholding.com",
"woofiles.com", "xuploading.com", "1st-files.com", "asixfiles.com", "zomgupload.com", "ravishare.com", "movreel.com", "wrzuc.to", "webfilehost.com", "myuplbox.com", "roshare.info", "uploadchoice.com", "speedshare.us", "uploadville.com", "supasic.com", "uploadpalace.com", "uploadr.com",
"rapidfile.fr", "openupload.com", "miniuploads.com", "titanicshare.com", "sharelor.com", "keepmyfile.com", "sharebigfile.com", "share.am",
"sprintshare.com", "rapidupload.eu", "theonlinedatastorage.com", "ugotfile.com", "MegaFTP.com|megaftp.com", "filevelocity.com", "dopeshare.com",
"filethe.net", "6ybh-upload.com", "filecore.co.nz|fcore.eu", "zetshare.net", "udic.co", "uploadables.com", "filevegas.com", "coolfilehost.com", "do32.com", "pcdesignfile.hi2.ro",
"kitwit.info", "filessharefg.3x.ro", "megafilesharing.com", "gfxheaven.co.uk", "seed-share.com", "linkrevenue.net", "neturl.info", "twinupload.com",
"midupload.com", "speedfile.cz", "filenuke.com", "speedshare.org", "tufiles.ru", "mazzikatop.com", "saba.mehargroup.org", "themeyoou.com", "sharequickly.com", "downup.us.to", "gfxshare.net", "speeddsharing.info", "sharedl.com",
"filedwon.com", "ukfilehost.com", "4savefile.com", "filebulk.com", "filestrack.com", "emodownloads.com", "fileslinks.com", "themes.pickplus.net", "mruploads.com", "warmfile.com", "gptfile.com", "uploadfloor.com",
"mafiastorage.com", "fileband.com", "bestsharing.com", "getfile.biz", "upload66.com", "fileshack.icraze.net", "mazupload.com", "halotemplate.free.fr", "desiload.com", "filegiant.net",
"shareupload.com", "hotelupload.com", "voodoom.com", "getupload.com", "url.file.am", "dago.to", "hamstershare.com", "cinshare.com", "supashare.net",
"sharepro.info", "momoshare.com", "sloveniandesigner.com", "multidesi.com", "clonefile.com", "uploadski.com", "speedie-host.com", "turboupload.com",
"blitzfiles.com", "freestorage.ro", "weefile.com", "mykupload.freei.me", "savefile.com", "upload.ps", "share2u.net", "appscene.org", "filestock.net", "filestock.ru", "youmirror.biz",
"projectcamelot.org", "gigupload.com", "fairyshare.com", "divxcloud.com", "editandshare.com", "hostupload.net", "fileshaker.com", "youload.to",
"addat.hu", "filecloud.cc", "flexydrive.com", "filedeck.net|FileDeck.net", "eyvx.net", "filesnab.com", "filetitle.com", "ufliq.com", "sharebeats.com", "yotafile.com", "xxlupload.com",
"your-filehosting.com", "uploading.to", "mummyfile.com", "play-host.net", "namipam.com", "alldrives.ge|allshares.ge", "filestrum.com", "uploadace.com",
"7ups.net", "buckshare.com", "cokluupload.com", "filefaster.com", "divxme.com", "rapidmedia.net", "filerace.com", "mdj.com", "crocshare.com",
"movbay.org", "migafile.com", "dudupload.com", "fileuploadx.de", "fufox.net", "sharefiles4u.com", "fileor.com", "filedove.com", "wickedupload.com",
"stahovadlo.cz", "datafilehost.com", "bitupload.com", "freefilehosting.ws", "uploadby.us", "kisalt.me", "wizzupload.com", "squillion.com", "37v.net", "xshar.net", "filemsg.com", "datafile.us", "smallfile.in",
"space4upload.info", "nrgfile.com", "okah.com", "filemojo.com", "filerose.com", "mega.huevn.com", "ex.ua", "filespump.com", "byethost12.com",
"filezzz.com", "xazon.com", "uploadersite.com", "filegetty.com", "nfile.eu", "box4upload.com", "envirofile.org", "omxira.com", "evilshare.com",
"uploadingit.com", "stiahni.si", "filefolks.com", "sendspace.pl", "fastshare.org", "sharehoster.de", "rapidoyun.com", "monsteruploads.eu", "coraldrive.net", "files2k.eu", "kiwiload.com", "i-filez.com", "mylordweb.com", "edoc.com",
"mooshare.net", "uploadbox.com", "aieshare.com", "filegag.com", "sharpfile.com", "gbmeister.com", "db-rap.com", "venusfile.com", "sharesystems.de",
"flameupload.com", "upload.lu", "tm.gwn.ru", "syl.me", "fast-sharing.com", "ifilehosting.net", "filehost.ws", "bubblefiles.com", "upgrand.com", "gups.in",
"fileqube.com", "upshare.eu|upshare.net", "turbo-share.com", "uploadit.ws", "alexupload.com", "littleurl.net", "rlslog.in", "faramovie4.com",
"dude.ir|DUDE.ir", "dosyakaydet.com", "filescube.com", "down.uc.ae", "filebrella.com", "filerobo.com", "nnload.com", "jamber.info", "flameload.com",
"interupload.com|InterUpload.com", "peejeshare.com|peeje.com", "speed-download.com", "uploadtornado.com", "fastyurl.info", "wantload.com", "filevo.com",
"fileflyer.com", "basicupload.com", "fileneo.com", "uploadbin.net", "bgdox.com", "grupload.com", "sms4file.com", "solidfile.com", "20g.info", "purples.byethost3.com", "tvshack.net", "eufiles.net", "rs-layer.com",
"archiv.to", "share.gulli.com", "sharebees.com", "uptorch.com", "filedownloads.org", "file4sharing.com", "terabit.to", "downupload.com", "cobrashare.sk",
"kongsifile.com", "uload.to", "filesector.cc", "groovefile.com", "upfile.in", "uploadcore.com", "kewlfile.com", "przeklej.pl", "share2many.com",
"megarapid.eu", "farmupload.com", "exzip.com", "firerapid.net", "splitr.net", "loombo.com", "superupl.com", "xoomshare.com", "file2011.co.cc",
"unextfiles.com", "sube.me", "files2upload.net", "vidto.me", "hyshare.com", "arabloads.com", "speedoshare.com", "neoupload.com", "adlee.ch", "shareupload.net", "tvchaty.com", "jumbodrop.com", "nukeshare.com", "filemates.com",
"putbit.com", "project-free-upload.com", "imzupload.com", "hostingbulk.com", "speedy-share.com", "igetfile.com", "uploadbear.com", "upload.el3lam.com", "videoal3rab.com", "upzetta.com", "paid4download.com", "mintupload.com", "home4file.com",
"fullshare.net", "down.vg", "sharehoster.com", "wootly.com", "spreadmyfiles.com", "bayfiles.com", "smallfiles.org", "mojedata.sk", "premfile.com",
"rapidspread.com", "filesforshare.com", "servup.co.il", "mydownz.com", "mozillashare.com", "good.net", "lizshare.net", "xlfile.com", "xtraupload.de",
"nahraj.cz", "primeupload.com", "bravoshare.net", "infinitemb.com", "filenavi.com", "onefile.net", "freefolder.net", "allbox4.com", "share76.com",
"sharebase.to", "fshare.eu", "profitupload.com", "seedmoon.com", "xupad.com", "youshare.eu", "filecache.de", "icushare.com", "eroshare.in", "seedfile.com",
"filepanda.com", "downloadng.info", "share-rapid.com", "gator175.hostgator.com", "pigsonic.com", "maskshare.com", "wayfile.com", "daddyfile.com",
"filezup.com", "city-upload.com", "mijnbestand.nl", "ultrashare.net", "uploadhappy.com", "live-share.com", "mirrorvip.com", "freesofty.com", "fdcupload.com", "zhostia.com", "upmega.com", "ifpost.com",
"you-love.net", "uploo.net", "6lqh.com", "free-share.ru", "okay2upload.com", "space4file.com", "filedefend.com", "sharedbit.net", "fileuplo.de",
"megashareslink.com", "filedepot.info", "gbitfiles.com", "tsarfile.com", "hsupload.com", "videoveeb.com", "freeuploads.fr|uploa.dk", "filesony.com",
"uploking.com", "vidpe.com", "upload.th.la", "loadhero.net", "filesega.com", "netuploaded.com", "filecloud.ws", "nirafile.com",
"aimini.net", "4share.ws", "enigmashare.com", "kupload.org", "filedude.com", "zooupload.com", "2download.de", "fileshare.in.ua", "openfile.ru",
"hotuploading.com", "good.com", "sprezer.com", "qubefiles.com", "demo.ovh.com|demo.ovh.net|demo.ovh.co.uk|demo.ovh.nl", "fileopic.com", "almmyz.com",
"putme.org", "98file.com", "upaj.pl", "filexb.com", "fileza.net", "erofly.cz", "filezpro.com", "multifilestorage.com", "ok2upload.com", "uploadorb.com",
"cobrashare.net", "share-now.net", "upload.tc", "bitbonus.com", "fileupup.com", "drop.st", "maxshare.pl", "saarie.com", "toucansharing.com", "hotfiles.co",
"westfiles.com", "novaup.com", "ishare.bz", "putshare.com|putshare.net", "uploadur.com", "hostfil.es", "fileprohost.me|fileprohost.com", "ddl.mn",
"aavg.net|aa.vg|downdone.com", "bitsor.com", "data-loading.com", "teradisk.cz", "skyfile.co", "xvidstream.net", "earnupload.net", "ngsfile.com",
"asapload.com", "cloudnes.com", "megaload.it", "ddl.ultimate-war3z.com", "share.vid321.com", "henchfile.com|HenchFile.com", "datacloud.to", "brutalsha.re",
"gettyfile.ru", "allmyfiles.ca", "baxfile.com", "divxmov.net", "additin.com", "afilehosting.com", "hotlinkfiles.com", "1fhs.com", "all-upload.com",
"hostingfilefree.com", "filewinds.com", "fileupper.com", "uploaders.be", "filemo.com", "banashare.com", "useupload.com", "mihd.net", "uploaded.de",
"boost.am", "fileden.com", "hotfiles.ws", "q4share.com", "megaul.com", "uploadegg.com", "saryshare.com", "sendshack.com", "easy-dump.com", "zenload.com",
"filecrunch.com", "fileupyours.com", "x7files.com", "filesurf.ru", "lionfiles.com", "faststream.in", "zefile.com", "ultrafiles.com", "megabitshare.com",
"247upload.com", "clipshouse.com", "ginbig.com", "bitload.it", "uplly.com", "zedupload.com", "load.tc", "fileking.co", "rapidupload.sk", "centupload.com",
"ritafile.com", "hotfile.com", "enjoybox.in", "filenova.net", "nutfile.com|syfiles.com", "filestay.com", "filebox.com", "load2.me", "sharemole.com",
"fastsonic.net", "bigupload.com", "treefiles.org", "wooupload.com", "fileforth.com", "ulmt.in", "upkiller.com", "somefiles.net", "cloudzer.net|clz.to",
"easyfilesharing.info", "warserver.cz", "filedock.me", "soniclocker.com", "hi5upload.com", "ezzfile.co.nz", "ifile.ws", "filehosting.pw", "ufox.com",
"oteupload.com", "nazibunny.com", "files4up.com", "filebigz.com", "filesflush.com", "embedload.com", "extabit.com", "geturfile.com", "kenshare.eu",
"rnbload.com", "share4files.com", "storagon.com", "kookfile.com", "filegrep.com", "clouds.to", "safecloud.so", "ryushare.com", "berofile.com|swatupload.com",
"rocketfile.net", "filetug.com", "epicshare.net", "egofiles.com", "cyberlocker.ch", "filesfrog.net|dogupload.com", "davvas.com", "1-click-upload.de", "ddlstorage.com",
"hulkfile.eu|duckfile.net|w.hulkfile.eu|w.hulkfile.com", "uploadinc.com", "wallobit.com", "megaupdown.com", "blueshare.be", "1clickfiles.com", "redload.net",
"megarelease.org", "lemuploads.com", "videozed.net", "goldfile.eu", "nitrobits.com", "shareprofi.com", "qkup.net", "hipfile.com|filedap.com", "albafile.com",
"fiberupload.net", "filezy.net", "czshare.com", "cloudvidz.net", "qumpy.com", "crisshare.com", "uploadnetwork.eu", "pandapla.net", "maxisharing.com", "filesbb.com",
"filesaur.com", "rapidapk.com", "uploadhunt.com", "hottera.com", "share-byte.net", "sharefiles.co", "donevideo.com", "filecity.net|filecity.eu", "u-host-it.info",
"swankshare.com", "batshare.com", "rapidshark.pl", "shareyourupload.com", "filesso.com", "uploadcapital.com", "cramit.in|cramitin.net|cramitin.eu|cramitin.us",
"migupload.com", "usefile.com", "filesbowl.com", "filemonkey.in", "mediacloud.to", "packupload.com", "firelinks.net", "vidzbeez.com", "filepom.com",
"dizzcloud.com", "uploadsat.com|nodaup.com|safashare.com", "freakbit.net", 'upbooth.com', 'fileshareup.com', "1-clickshare.com", 'file-gag.com', "gigaup.fr",
"netload.in", "speedvid.tv", "partage-facile.com", "zixshare.com", 'xerver.co', 'fileom.com', "firedrive.com|putlocker.com", 'bl.st', 'privatefiles.com', 'bayfiles.net', 'vreer.com',
'slingfile.com', 'filestorm.to', 'thefilebay.com', 'files.to', 'dodane.pl', "billionuploads.com", 'ultrafile.me', 'rapidshare.com', 'rapidshare.ru', 'boomupload.net',
'downforall.com', 'freakshare.net|freakshare.com', 'bitshare.com', 'ninjashare.com'];

var wbbCensoredHosts = ["filevice.com", "mirrorafile.com", "vip-file.com", "ufile.eu", "hitfile.net", "dirrectmirror.com", "keeplinks.me",
"jheberg.net", "go4up.com", "exoshare.com", "digzip.com", "dl4.ru", "mirrorupload.net", "maxmirror.com", "uploadtubes.com", "uploadmirrors.com",
"uploadonall.com", "embedupload.com", "megaupper.com", "qooy.com", "multisiteupload.com", "multi-up.com", "multiupload.com|multiupload.nl", "multiload.cz",
"mirrorcreator.com|mir.cr", "sharebee.com", "linkcrypt.ws", "linksave.in", "ncrypt.in", "unibytes.com", "share-links.biz|s2l.biz", "sharecash.org",
"multishare.cz", "catshare.net", "4shared.com", "muchshare.net", "netfolder.in", "ziddu.com", "uploadblast.com", "uploadjockey.com", "shareflare.net",
"adf.ly", "hellshare.com", "turbobit.pl|turbobit.net", "letitbit.net", "speedy.sh|speedyshare.com", "2downloadz.com", "anafile.com", "rapidu.net",
"gamefront.com", "fileneo.com", "queenshare.com", "filemaze.ws", "goo.gl", "tiny.cc", "bit.ly", "tinyurl.com", "is.gd", "vidxden.com",
"q.gs", "imxd.net", "unlimit.co.il", "multiup.org", "flashmirrors.com", "filemirrorupload.com", "lix.in", "toturl.us", "fff.re", "directmirror.com",
"uploadseeds.com", "uploadmagnet.com", "sflk.in", "adfoc.us", "urlz.so", "filetolink.com", "mtsafelinking.org"];

/*var update = {
	version: '',
	currentTime: new Date().valueOf(),
	updateUrl: 'https://dl.dropboxusercontent.com/u/144279696/warbb/update.json',
	changelogSuffix: '/changelog.html',
	userscriptSuffix : '/WarBB.user.js',
	
	init: function() {
		var timeDiff = update.currentTime - Last_Update_Check;
		if (timeDiff >= 3600000) update.check();
	},
	
	check: function() {
		GM_xmlhttpRequest({
			method: 'GET',
			url: update.updateUrl,
			onload: function(result) {
				lsSetVal('general', 'Last_Update_Check', new Date().valueOf());
				res = JSON.parse(result.responseText);
				if (res.version.replace(/\./g,'') > WarBB_version.replace(/\./g,'')) {
					var updateDir = res.base_url + res.version;
					update.getUpdate(updateDir, res.version);
				} else if (Show_Update_Notification) sendMessage('Your version of WarBB (v' + WarBB_version + ') is up to date.');
			}
		});
	},
	
	getUpdate: function(updateDir, version) {
		var changelogUrl = updateDir + update.changelogSuffix;
		var userscriptUrl = updateDir + update.userscriptSuffix;
        var allowedToInstall = confirm('WarBB - An update is available (v' + version + ').\nThe update will be installed once you confirm.\nNote: You may have to explicitly allow the popup in order to install WarBB.');

		sendMessage('WarBB has checked for updates and found version ' + version + '. Click <a href="' + changelogUrl + '">here</a> to load the changelog.');
		
		if (allowedToInstall) {
            window.open(userscriptUrl, '_blank');
        }
	}
};*/

String.prototype.contains = function(searchString) {
    if (searchString.constructor === RegExp) {
        if (searchString.test(this)) return true;
        else return false;

    } else if (searchString.constructor === String) {
        function replaceStr(string) {
            return string.replace(new RegExp(RAND_STRING, 'g'), '|');
        }

        searchString = searchString.replace(/\\\|/g, RAND_STRING);
        var searchArray = searchString.split('|');

        if (searchArray.length > 1) {
            var found = false;
            var i = searchArray.length;

            while (i--) {
                if (this.indexOf(replaceStr(searchArray[i])) > -1) {
                    found = true;
                    break;
                }
            }

            return found;

        } else {
            if (this.indexOf(replaceStr(searchString)) > -1) return true;
            else return false;
        }
    } else {
        throw new TypeError('String.contains: Input is not valid, string or regular expression required, ' + searchString.constructor.name + ' given.');
    }
}

var firstRun = JSON.parse(localStorage.getItem("WarBB_First_Run"));
if (firstRun == null) firstRun = true;

var chromeBrowser = /chrom(e|ium)/.test(navigator.userAgent.toLowerCase());

var preferences = JSON.parse(localStorage.getItem("WarBB_Preferences"));

allHostNames.sort();
allContainerNames.sort();
allObsoleteNames.sort();

var RAND_STRING = "8QyvpOSsRG3QWq";

var WBB_MODE = false;
if (window.location.host.contains('warez-bb.org')) {
    WBB_MODE = true;
}

var ANONYMIZE_SERVICE;
var ANONYMIZERS = ['http://www.blankrefer.com/?', 'http://hidemyass.com/?', 'http://anonym.to/?', 'http://refhide.com/?', 'http://nullrefer.com/?', 'http://anonymz.com/?'];

var TOOLTIP_MAXWIDTH = 600; //in pixels

//global settings start
var Do_not_linkify_DL_links, Display_tooltip_info, Last_Update_Check, Allow_spaces_in_DL_links, Display_full_links_in_link_containers, Show_Update_Notification, Focus_First_Link;
var Processbox_Pos_X, Processbox_Pos_Y, Progressbox_Scaling;

var cLinksTotal = 0;
var cLinksDead = 0;
var cLinksAlive = 0;
var cLinksUnava = 0;
var cLinksUnknown = 0;
var cLinksProcessed = 0;

$('head').append('<warbb name="filehosts" live="" dead="" unava="" unknown="" />'); //for cross-script compatibility

var intervalId; //for updateProgress()

//icon resources
var alive_link_png    = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIkAAACHCAYAAAAiLnq5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAB2RJREFUeNrsnU9SIkkUxlOi980RmBM0bmcjnGDgBMoJlIjZK/uJUE8AnqD1BOJmtnKE8gbMCZxMfUbXMFRV/v9T7/siKrAbqCrIH997Lyuz8uT9/V1AUJtOAAkESCBAAiWE5OTkpJcf+K+/z0byob4p/ZDbsOOtldze6O+d3PZ//v6y7eN3dMhEryGRQIzlg9rOCIhJgMPsCZoXetxKePaAJG+XUCD8QY/DRKfyAYsCRwLzCEjyAGMmt3Nyjdy0J2CeJDAbQBIXjgsCY1LQj1QBo5zlXgKzAyThXONSbhcJQ4nPkHSfo7sUCQnBcU1w9E2qalrlBEtRkPQcjmxhKQISCYcKJVcECDcpWBYp+2Cyh0QCoiqVW/Gro4urVIK7lLBUgOS/oWVdWLUSoxpSIeiOPSTkHuseVCyhtKUQVLGDhHKPWyaJqQ9XWcTowc0GErquotxjjPY30p0EZdl7SBBenKU64qahLiQmh0QCckUhBnIvlechuveTQiIBWSP/8J6nTH2DkgwSABIUlLnPzrckkACQKFr46tKPDgkAiaq5jxI5KiQApMwcJRokEhBVwVyh3coDJQokNGpsjfZKWh6f2vajHDIxCFDmTgBIco3k9uxrZ16dhK7kvgr0pOaijXSTRW5O8hOAZKULCv15OAkS1f4kskGchPIQAJKnhq45orOT0JiQV4HhhrlLjXC7SeUk1wCkCF3TGB5jOUFCB0WYKUe30SERGBdSmiY21Y51ToJe1WJViY7eWJ85yTW+7yI1Mk0RrJxEusgNIClaykV+a3ITZyehkvcS33PScLGS25S2Ff2fiYYmbmLsJMhFkmrZNJvPYoB5o5v4yEkQZtJo0Tbdk55bhHATI0jIRUZorySAbLpeRK/ZGOz33DskujuF4gNS071JpUMT5fxAUruzIZQvIMJi2OK5N0hQ0eQPiKVmZABe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BkgesybBdwK9eKrNdDzGl6gGYPuh4DRwvgbS7tmrP1mqbuHgK08NARbKctgg5wATQTlq5IoKSyLkdx1mz5egZcAM1qTEfAHUcG3oKtFoFF54rN8DQBWmzw9Rm6zwxezwhU9PpB7ylssARo0CZ3s7B+ji0gKXMy2c05A0Uu309+zxmqBZ4AQIP+toaVrBSsUkKgQRBUT/8TYAA2/fty/kH54wAAAABJRU5ErkJggg==";

//initiate notification box
$("body").append("<b class='WarBBInfoBox' style='position: fixed; top: 2px; padding-left:30px; padding-right: 5px; display:none; background: white url(" + WarBBLogo + ") no-repeat 0% 50%; background-size:28px; font-size: 20px; border:1px solid #4DD9FF; z-index:3;'></b>");

//global settings end

function linkify(filterId) { //code from http://userscripts.org/scripts/review/2254 Linkify ting
    if (!filterId) {
        var regexy = "", ikkeTilladteTags = [];

        if (Allow_spaces_in_DL_links) {
            regexy = "(?:http:\/\/.+?\\?)?(?:https?:\/\/)?(?:[\\w\\.\\-]*[\\w\\-]+\\.(?:com?\\.\\w{2}|in\\.ua|uk\\.com|\\w{2,4})(?::\\d{2,5})?\/|(?:www\\.)?\\w{6,}\\.1fichier\\.com)[\\w\\–\\-\\.+$!*\\/\\(\\)\\[\\]\',~%?:@#&=\\\\\\—;\\u0020…×Ã\\_\\u0080-\\u03FF’‘\\|]*";
        } else {
            regexy = "(?:http:\/\/.+?\\?)?(?:https?:\/\/)?(?:[\\w\\.\\-]*[\\w\\-]+\\.(?:com?\\.\\w{2}|in\\.ua|uk\\.com|\\w{2,4})(?::\\d{2,5})?\/|(?:www\\.)?\\w{6,}\\.1fichier\\.com)[\\w\\–\\-\\.+$!*\\/()\\[\\]\',~%?:@#&=\\\\\\—;…×Ã\\_\\u0080-\\u03FF’‘\\|]*";
        }

        if (Do_not_linkify_DL_links) {
            ikkeTilladteTags = ['a', 'head', 'script', 'style', 'title', 'option', 'iframe', 'textarea', 'span']; //tags, hvor det der stAΞ’Β¥r inden i ikke skal vAΞ’Β¦re links
        } else {
            ikkeTilladteTags = ['a', 'head', 'script', 'style', 'title', 'option', 'iframe', 'textarea']; //tags, hvor det der stAΞ’Β¥r inden i ikke skal vAΞ’Β¦re links
        }

        var linkRegex = new RegExp(regexy, "g");
        var censors = [ 'Disallowed',
        				'Dead File Host',
                        'Direct links only',
                        'Folders are not allowed',
                        'Multi hosts disallowed',
                        'Protected links are not allowed',
                        "Due To The Increase In Phishing,? We Now Disallow Protected URL'?s",
                        "Not allowed Direct links only",
                        "not allowed, please post direct links",
                        "Spam",
                        "If you are reading this report this SPAMMER to a moderator",
                        "3rd Party links are not allowed. Direct Links Only",
                        "Direct links only - please report me",
                        "Spyware",
                        "\\s*Ad\\-fly\\s*links\\s*are\\s*fobidden\\.\\s*Direct\\s*links only\\s*",
                        "Disallowed - Direct links only",
                        "Protected links not allowed"];

        var regexParts = [ 'https?:\/\/', //protocol
                           '[\\w\\.\\-]+' //host/server
                           ];

        var censorRegex = new RegExp(   '(?:' + regexParts.join('') + '\/\\?)?' //anonymizers
                                        + '(?:' + regexParts.join('|') + '|' + regexParts.join('') + ')' //all possible combinations of protocol + subdomain
                                        + '~ (?:' //opening of the censor + non-capturing group (for the different censors)
                                        + censors.join("|") //body of the non-capturing group, different options for censor contents
                                        +  ') ~' //closing of the group and the censor
                                        + '[\\w\\–\\-\\.+$!*\\/()\\[\\]\',~%?:@#&=\\\\\\—;…×Ã\\_\\u0080-\\u03FF’‘]+', //different characters possible in URL after the censor (END OF CENSOR BODY)
                                        'ig'); //case insensitive, multiple matches on multiple lines
        var ignoreImage = /(?:\.png|\.jpg|\.gif|\.jpeg|\.bmp)$/i, textNode, muligtLink;

        var path = "//text()[not(parent::" + ikkeTilladteTags.join(" or parent::") + ") and contains(.,'/')]";
        var textNodes = document.evaluate(path, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

        var i = textNodes.snapshotLength;

        while (i--) {
            textNode = textNodes.snapshotItem(i);
            muligtLink = $.trim(textNode.nodeValue); //all links on page without whitespace

            var myArray = null;
            if (censorRegex.test(muligtLink)) {
                var span = document.createElement('span'), lastLastIndex = 0, myArray = null;
                censorRegex.lastIndex = 0;

                while (myArray = censorRegex.exec(muligtLink)) {
                    var link = $.trim(myArray[0]); //removes whitespace from beginning and end of link (can sometimes cause issues when spaces are still picked up by the regex even when Allow_spaces_in_DL_links is false)

                    if (ignoreImage.test(link.replace(/\[\/img\]$/, ""))) continue;

                    span.appendChild(document.createTextNode(muligtLink.substring(lastLastIndex, myArray.index)));

                    var $span = $('<span class="obsolete_link" warlc_error="Cause of error: <b>Censored link.</b>">' + link + '</span>');

                    $span.appendTo(span);

                    updateHosts('dead', 'censored links');
                    cLinksTotal++; cLinksProcessed++; cLinksDead++;

                    lastLastIndex = censorRegex.lastIndex;
                }

                span.appendChild(document.createTextNode(muligtLink.substring(lastLastIndex)));
                textNode.parentNode.replaceChild(span, textNode);

                $('span.obsolete_link', textNode.parentNode).mouseover(displayTooltipError);
            } else if (linkRegex.test(muligtLink)) {
                var span = document.createElement('span'), lastLastIndex = 0, myArray = null;
                linkRegex.lastIndex = 0;

                while (myArray = linkRegex.exec(muligtLink)) {
                    var link = $.trim(myArray[0]); //removes whitespace from beginning and end of link (can sometimes cause issues when spaces are still picked up by the regex even when Allow_spaces_in_DL_links is false)

                    var hostName = gimmeHostName2(link);
                    var hostNameSafe = hostName.replace(/\./g, "_dot_").replace(/\-/g, "_dash_").toLowerCase();
                    if (hostName == gimmeHostName(window.location.hostname) || !hostsIDs[hostNameSafe] || ignoreImage.test(link.replace(/\[\/img\]$/, ""))) {
                        continue;
                    }

                    span.appendChild(document.createTextNode(muligtLink.substring(lastLastIndex, myArray.index)));

                    var $a = $("<a>" + link + "</a>")

                    if (!link.match(/https?:\/\//)) {
                        link = 'http://' + link;
                    }

                    $a.attr("href", link.replace(/\[\/hide:\w+\]/,"")).appendTo(span);

                    lastLastIndex = linkRegex.lastIndex;
                }

                span.appendChild(document.createTextNode(muligtLink.substring(lastLastIndex)));
                textNode.parentNode.replaceChild(span, textNode);
            }
        }
    }

    var jQ;
    filterId ? jQ = "a." + filterId : jQ = "a";
    var as = $(jQ);
    var i = as.length;
    var currA, hostNameSafe, hostID;
    while(i--) {
        currA = as[i];
        if (currA.href && /^https?:\/\//.test(currA.href) && gimmeHostName2(currA.href) != -1 && gimmeHostName2(currA.href) != gimmeHostName(window.location.host) && (!currA.className || currA.className == "processing_link" || currA.className == filterId)) {
            hostNameSafe = gimmeHostName2(currA.href).replace(/\./g, "_dot_").replace(/\-/g, "_dash_").toLowerCase();
            if (!hostsIDs[hostNameSafe]) {
                if (filterId) cLinksTotal--; currA.className = '';
                continue;
            } else {
                var ix = hostsIDs[hostNameSafe].length;
                while(ix--) {
                    if (new RegExp(hostsIDs[hostNameSafe][ix].linkRegex).test(currA.href)) {
                        currA.className = "processing_link";
                        hostID = hostsIDs[hostNameSafe][ix].hostID;
                        hostsCheck[hostID].links.push(currA);
                        foundMirrors[hostID.substr(0,2)].push(hostID);
                    }
                }
            }
        }
    }
}

function add_WARLC_style()
{
    if (!(document.getElementsByTagName('WARLC')[0]))
    {
        var meta_not_to_add_more_style = document.createElement("WARLC");
        meta_not_to_add_more_style.setAttribute('content', 'war_links_checker');
        meta_not_to_add_more_style.setAttribute('name', 'description');
        document.getElementsByTagName('head')[0].appendChild(meta_not_to_add_more_style);

        GM_addStyle(
            ".alive_link {background:transparent url(" + alive_link_png + ") no-repeat scroll 100% 50%;background-size:13px;padding-right:13px;color:green !important;}\
            .adead_link {background:transparent url(" + adead_link_png + ") no-repeat scroll 100% 50%;background-size:13px;padding-right:13px;color:red !important;}\
            .obsolete_link {background:transparent url(" + adead_link_png + ") no-repeat scroll 100% 50%;background-size:13px;padding-right:13px;color:red !important;}\
            .unava_link {background:transparent url(" + unava_link_png + ") no-repeat scroll 100% 50%;background-size:14px;padding-right:13px;color:#FF9900 !important;}\
            .unknown_link {background:transparent url(" + unknown_link_png + ") no-repeat scroll 100% 50%;padding-right:13px;background-size:13px;color:rgb(0, 150, 255) !important}\
            .processing_link {background:transparent url(" + processing_link_gif + ") no-repeat scroll 100% 50%;background-size:13px;padding-right:16px;color:grey !important;}\
            .container_link {background:transparent url(" + processing_link_gif + ") no-repeat scroll 100% 50%;background-size:13px;padding-right:16px;color:grey !important;}"
        );
    }
}

var warlcTooltip = null, mouseoverLink = null; //link href with mouse cursor over it

var lastX = 0, lastY = 0;

$(document).ready(initTooltip);

//inits tooltip
function initTooltip()
{    warlcTooltip = document.createElement("div");
    warlcTooltip.setAttribute("style", "background: #EAEAEA; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);padding: 6px 6px 6px 6px; border-radius:2px; border:2px solid #6699CC; color:#000000;font-family:Verdana,sans-serif;font-size:11px;position:absolute;z-index:1000; max-width: " + TOOLTIP_MAXWIDTH + "px;");
    warlcTooltip.style.visibility = "hidden";

    document.body.appendChild(warlcTooltip);
}

function updateHosts(status, hostname) {
    $('warbb[name="filehosts"]').attr(status, function(index, value) {
        if (!value.contains(hostname)) {
            return value += hostname + ",";
        }
    });
}

//"mousemove" event handler for all links
function moveTooltip(event)
{
    if ((Math.abs(lastX - event.clientX) + Math.abs(lastY - event.clientY)) < 6)
    {    //no need to reflow if the cursor moved just a little
        return;
    }
    else
    {
        lastX = event.clientX;
        lastY = event.clientY;
    }

    posX = event.clientX + window.pageXOffset + 10;
    posY = event.clientY + window.pageYOffset;

    var ttHeight = warlcTooltip.offsetHeight;
    var ttFreeSpace = window.innerHeight - event.clientY;

    if (ttHeight > ttFreeSpace)
    {    //prevents tooltip from getting out of the window
        posY -= (ttHeight - (ttFreeSpace)) + 10;
    }
    else
    {
        posY += 7;
    }

    warlcTooltip.style.top = posY + "px";
    warlcTooltip.style.left = posX + "px";
}

//"mouseout" event handler for all links
function hideTooltip(){
    warlcTooltip.style.visibility = "hidden";
    mouseoverLink = null;
}


//"mouseover" event handler for dead links
//displays tooltip error message on dead links
function displayTooltipError()
{
    mouseoverLink = this.href;

    this.addEventListener("mouseout", hideTooltip);
    this.addEventListener("mousemove", function(event) { moveTooltip(event); });

    warlcTooltip.innerHTML = '<b>LOADING...</b>';
    warlcTooltip.style.minWidth = 0;
    warlcTooltip.style.visibility = "visible";

    if ($(this).attr('warlc_error')) { //an error message is already known and stored in warlc_error attribute
        warlcTooltip.innerHTML = $(this).attr('warlc_error');
    }
    else
    {
        loadErrorInfo(this);
    }

    function loadErrorInfo(link)
    {
        var href = link.href;
        if (link.href.contains('anysend.com') && link.name) href = link.name;
        href = href.replace(/quickshare\.cz\/.+/, "quickshare.cz/chyba");

        GM_xmlhttpRequest({
            method: 'GET',
            url: href.replace(ANONYMIZE_SERVICE, ""),
            headers: {
                'User-agent': rUA(),
                'Accept': 'text/xml,application/x-httpd-php',
                'Referer': ""
            },
            onload: function(result) {
                var res = result.responseText;
                //console.log(res);
                //TODO: errorRegexs -
                var errorRegexs =     [    //generic error messages follow
                                        /(empty directory)/i,
                                        /(soubor nebyl nalezen)/i,
                                        /((?:file|page|link|folder)(?:is|not|does|has been|was|has| ){1,}(?:found|available|blocked|exists?|deleted|removed|expired))/i,

                                        //server specific error messages follow
                                        /msg error" style="cursor: default">(.+?)<\/div>/, //sendspace
                                        /color:red;font\-weight:bold;border\-style:dashed;font-size:12px;border\-width:2px;><tr><td align=center>(.+?)<\/td>/, //fastshare
                                        /errorIcon">\s*<p><strong>(.+?)<br \/>/, //filefactory
                                        /no_download_msg">\s*(.+?)<span/, //depositfiles
                                        /(Takový soubor neexistuje. Je možné, že byl již smazán.)/, //quickshare
                                        /file_info file_info_deleted">\s*<h1>(.+?)<\/h1>/, //filepost
                                        /<br \/>\s*<p style="color:#000">(.+?)<\/p>\s*<\/center>/, //letitbit
                                        /(?:error_div">|<\/h1><p>)<strong>(.+?)<\/strong>/, //share-rapid,quickshare
                                        /class="red">(.+?)<(?:span|br)>/, //megashares
                                        /class="wp640">\s*<h1 class="h1">(.+?)<\/h1>/, //uloz.to
                                        /download_file">\s*<tr>\s*<td>(.+?)<\/td>/, //hotfile
                                        /error\.gif" \/>\s*(.+?)\s*<\/div>/, //uploading.com
                                        /not-found">\s*<p>(.+?)<\/p>/, //bayfiles
                                        /(Your file could not be found. Please check the download link.)/, //stahnu.to
                                        /error_msg">\s*(<h3>.+?<\/h3><ul>(.+?)<\/ul>)/, //edisk
                                        /error">\s*(?:<[bp]>)?\s*(.+?)<\/[bp]>/, //filesmonster, shragle, gigapeta
                                        /center aC">\s*<h1>(.+?)<br \/>/, //uploaded.to
                                        /icon_err">\s*<h1>(.+?)<\/h1>/, //filejungle
                                        /Code: ER_NFF_\d+<\/h2>\s*(.+?)\s*<\/div>/, //netload
                                        /<span style="color:red;" class="result-form">(.+?)<\/span>/, //safelinking
										/<span style="color:red;" class="result-form">(.+?)<\/span>/, //kprotector
                                        /(The file link that you requested is not valid.)/, //2shared
                                        /error_msg_title">(.+?)<\/h3>/, //mediafire
                                        /<span class="bold">(?:<br \/>)+(.+?)<\/span>/, //filebox
                                        /err">(.+?)</, //speedy-share, will work for others
                                        /<h2 class="error">(.+?)<\/h2>/, //gigasize.com
                                        /<h1 class="filename" id="status">(.+?)<\/h1>/, //anysend.com
                                        /<title>(Removed download) \| AnySend<\/title>/, //anysend.com
                                    ];
                var errorIdx = errorRegexs.length;

                var error = "Cause of error: <b>unknown</b>";
                var errorCandidate = "";
                while(errorIdx--)
                {
                    var errorCandidate = res.match(errorRegexs[errorIdx]);
                    if (errorCandidate != null)
                    {
                        error = "Cause of error: <b>" + errorCandidate[1].replace(/&nbsp;/g," ") + "</b>";
                        break;
                    }
                }

                //link attributes
                $(link).attr('warlc_error', error);

                if (mouseoverLink == link.href) //mouse cursor is still over the link
                {
                    warlcTooltip.innerHTML = error;
                }
            }
        });
    }
}

//"mouseover" event handler for alive links
//displays tooltip info (file size, file name,...) on alive links
function displayTooltipInfo()
{
    mouseoverLink = this.href;

    //exclude direct download filehostings
    if (this.href.contains(/(?:uloziste\.com|filemonster\.net|uploadbin\.net|adrive\.com|dropbox(?:usercontent)?\.com|karelia\.pro|archive\.org|demo\.ovh\.eu)/))
    {
        return;
    }

    this.addEventListener("mouseout", hideTooltip);
    this.addEventListener("mousemove", function(event) { moveTooltip(event); });

    warlcTooltip.innerHTML = '<b>LOADING...</b>';
    warlcTooltip.style.minWidth = 0;
    warlcTooltip.style.visibility = "visible";

    if (this.warlc_tooltipcache) //file size is already known and stored in warlc_filename and warlc_filesize attributes
    {
        warlcTooltip.innerHTML = this.warlc_tooltipcache;
    }
    else
    {
        loadInfo(this);
    }

    function loadInfo(link)
    {
        var href = link.href;
        if (link.href.contains('anysend.com')) href = link.name;
        href = href.replace(/.*(?:share-online\.biz|egoshare\.com)\/(?:dl\/|download\.php\?id=|\?d=)(\w+)/, 'http://api.share-online.biz/linkcheck.php?links=$1');
        href = href.replace(/.*(?:uploaded|ul)\.(?:to|net)\/(?:files?\/|\?(?:lang=\w{2}&)?id=|f(?:older)?\/)?(?!img|coupon)(\w+)/, 'http://uploaded.net/api/filemultiple?apikey=lhF2IeeprweDfu9ccWlxXVVypA5nA3EL&id_0=$1');
        href = href.replace(/.*(?:depositfiles\.(?:com|lt|org)|dfiles\.(?:eu|ru))\/(?:en\/|ru\/|de\/|es\/|pt\/|)files\/(\w+)/, 'http://depositfiles.com/api/get_download_info.php?id=$1&format=json')

        GM_xmlhttpRequest({
            method: 'GET',
            url: href.replace(ANONYMIZE_SERVICE, ""),
            headers: {
                'User-agent': rUA(),
                'Accept': 'text/xml,application/x-httpd-php',
                'Referer': ""
            },
            onload: function(result) {

                var res = result.responseText;
                //console.log(res);
                var nameRegexs =     [    /File Name: (.+?)<\/p>/, //filesmall
                                        /(?:finfo|(?:file[-_]?)?name)(?:"|')?>\s*?(.+?)<\/?(?:h1|a|b|div|span style|td)/, //hellshare, uploaded.to, netload, badongo, 4fastfile, filefreak
                                        /fl" title="(.+?)">/, //edisk
                                        /<title>\s*(?:Download)?\s*(.+?)\s*(?::: DataPort|\| Ulož|- Share\-Rapid|- WEBSITENAME|download Extabit|- download now for free|\| refile)/, //dataport, uloz.to, share-rapid, shragle, extabit, filefactory, refile.net
                                        /<h3>Stahujete soubor: <\/h3>\s*<div class="textbox">(.+?)<\/div>/, //webshare
                                        /<h3><b><span style=color:black;>(.+?)<\/b><\/h3><br>/, //fastshare
                                        /title="download (.+?)">/, //sendspace
                                        /Stáhnout soubor: (.+?)<\/h1>/, //quickshare
                                        /fz24">Download:\s*<strong>(.+?)<\/strong>/, //crocko
                                        /\w+:<\/b> (.+?)<\/h2>/, //filevelocity
                                        /'file\-icon\d+ \w+'>(?:<\/span><span>)?(.+?)<\/span>/, //hitfile, turbobit
                                        /d0FileName =  "(.+?)";/, //letitbit
                                        /file(?:_name|-info)" title="">\w+: <span>(.+?)<\/span>/, //vip-file, shareflare
                                        /download_file_title" title="(.+?)">/, //mediafire
                                        /dl\-btn\-label"> (.+?) <\/div>/, //mediafire
                                        /id="file_title">(.+?)<\/h1>/, //uploading.com
                                        /recent-comments"><h2>(.+) &nbsp;/, //xdisk
                                        /fname" value="(.+?)">/, //sharerun, syfiles, grupload,
                                        /download\-header">\s*<h2>File:<\/h2>\s*<p title="(.+?)">/, //bayfiles
                                        /description">\s*<p><b>Soubor: (.+?)<\/b>/, //bezvadata
                                        /Complete name                            : (.+?)<br \/>/, //bezvadata
                                        /itemprop="name">(.+?)<\/span>/, //bezvadata
                                        /Downloading:\s*<\/strong>\s*<a href="">\s*(.+?)\s*<\/a>/, //rapidgator
                                        /Downloading:\s*<\/strong>\s*<a href="">\s*(.+?)\s*<\/a>/, //alfafile
                                        /Downloading:<\/strong> (.+?) <span>/, //hotfile
                                        /<h1 class="black xxl" style="letter-spacing: -1px" title="(.+?)">/, //megashares
                                        /(?:Filename|Dateiname):<\/b>(?:<\/td><td nowrap>)?(.+?)(?:<br>|<\/td>)/, //billionuploads
                                        /<span > (.+?) \(\d+.?\d+? \w+\)<\/span>/, //clipshouse
                                        /File Download Area<\/center><\/h1><center><h3>(.+?)<\/h3>/, //filebeam
                                        /<h2 class="float\-left">(.+?)<\/h2>/, //easyfilesharing
                                        /<h1 id="file_name" class=".+?" title="(.+?)">/, //box.com
                                        /file_info">\s+<h2><strong>(.+?)<\/strong>/, //fliiby
                                        /dateiname'>(.+?)<\/h1>/, //file-upload.net
                                        /Filename:<\/p>\s+<\/div>\s+<div class=".+?">\s+<p>\s+(.+?)\s+<\/p>/, //sharesix
                                        /File Name:<\/dt>\s+<dd>(.+?)<\/dd>/, //gamefront
                                        /dir="ltr">(.+?) <\/td>/, //unlimitshare.com
                                        /nom_de_fichier">(.+?)<\/div>/, //uploadhero
                                        /OK;(.+?);\d+/, //share-online
                                        /File:\s*<span>(.+?)<\/span>/, //keep2share
                                        /Name:<\/font>\s*<font style=".+?">(.+?)<\/font>/, //zippyshare
                                        /online,\w+,\d+,\w+,(.+)/, //uploaded.net
                                        /\{"file_info":\{"size":"\d+","name":"(.+?)"\},"/, //depositfiles.com
                                        /site-content">\s*\n*<h1>(.+?)<strong>/, //putlocker.com
                                        /<div class="external_title_left">(.+)<\/div>/, //putlocker.com
                                        /(?:Filename|Nom du fichier) :<\/th><td>(.+?)<\/td>/, //1fichier.com
                                        /<div id="file_name" class="span8">\n\s+<h2>(.+?)<\/h2>/, //filefactory.com
                                        /<span class="bgbtn sprite fileIcon ext\w+"><\/span>\s+<strong title="(.+?)">/, //gigasize.com
                                        /<span class="label label-important">Downloading<\/span>\s<br>\s(.+?)\s[\d\.]+\s\w+\s<\/h4>/, //nowdownload.eu
                                        /<!-- File header informations  -->\n\s*<br\/>\n\s*<h1>(.+?)<\/h1>/, //mixturecloud.com
                                        /<span class="file-name">(.+?)<\/span>/, //anysend.com
                                        /<td class="dofir" title="(.+?)">/, //billionuploads.com
                                        /<title>uploadto.us - (.+?)<\/title>/, //uploadto.us|ultramegabit.com
                                        /<title>Download (.+?) \| myUpload\.dk<\/title>/, //myupload.dk
                                        /<div id="download\-title">\n\s*<h2>(.+?)<\/h2>/, //solidfiles.com
                                        /<div class="content_m"><div class="download"><h1>(.+?)<\/h1>/, //mystore.to
                                        /<h4 class="dl_name w420" >\s*(.+?) <span/, //myvdrive.com
                                        /<div class='badge pull-right'>.+?<\/div>\s*<h1>Download (.+?)<\/h1>/, //filemonkey.in
                                        /<strong>File name:<\/strong> (.+?)<br \/>/, //netkups.com
                                        /<div id="file_name" title="(.+?)">/, //uploadable.ch
                                    ];
                var nameIdx = nameRegexs.length;


                //      [sizeRegexs]
                //      /    \    \?
                //   prefix (size) postfix
                //           /   \
                //          val  quant

                var quantRegex = '(?:M|G|K)?i?(?:B)(?:[y|i]te?s?)?';
                var valRegex = '\\d+(?:[\\., ]\\d+){0,2}';                 // 111([., ]222)?([., ]333)?

                var uniSizeRegex = valRegex + '(?:\\s*|&nbsp;)' + quantRegex;

                var preSizeRegex = '(?::|\\(|>|>, | - |\\[)';
                var postSizeRegex = '(?:\\))?';

                var sizeRegexs =     [     preSizeRegex + "\\s*(" + uniSizeRegex + ")\\s*" + postSizeRegex,
                                        'FileSize_master">(.+?)<\/strong>', //hellshare
                                        'Velikost: <strong>(.+?)<\/strong>', //warserver
                                        'online,\\w+,(\\d+),', //uploaded.net
                                        '"file_info":{"size":"(\\d+)","name":', //depositfiles.com
                                        '(?:File size|Taille) :<\/th><td>(.+?)<\/td>', //1fichier.com
                                        ';(\\d+)\n$', //share-online.biz
                                        'label-important">Downloading<\/span>.+?(' + uniSizeRegex + ') <\/h4>', //nowdownload.eu
                                        '<h5>Size : (' + uniSizeRegex + ')<\/h5>', //mixturecloud.com,
                                        '<td>\\n\\s*Total size:\\n\\s*</td>\\n\\s*<td>\\n\\s*(.+?)\\s*</td>', //anysend.com
                                        'span class="filename_normal">\\((' + uniSizeRegex + ')\\)</span>', //uploadable.ch
                                    ];
                var sizeIdx = sizeRegexs.length;

                //
                //

                var tooltip = "File Name: <b>";

                var fileName = "unknown";
                var nameCandidate = "";
                while(nameIdx--)
                {
                    var nameCandidate = res.match(nameRegexs[nameIdx]);
                    if (nameCandidate != null)
                    {
                        fileName = nameCandidate[1].replace(/&nbsp;/g," ").replace("<br>", "");
                        break;
                    }
                }

                tooltip += fileName + "</b><br>File Size:  <b>";

                var fileSize = "unknown";
                var sizeCandidate = "";
                while(sizeIdx--)
                {
                    sizeCandidate = res.match(new RegExp(sizeRegexs[sizeIdx], "i"));
                    if (sizeCandidate != null)
                    {
                        fileSize = sizeCandidate[1].replace(/&nbsp;/g," ");
                        if (/^\d+$/.test(fileSize) && fileSize >= 1024)  //assume bytes
                        {
                            if(fileSize > (1<<30)) fileSize = Math.round(10 * fileSize / (1<<30)) / 10 + ' GB';
                                else if(fileSize > (1<<20)) fileSize = Math.round(fileSize / (1<<20)) + ' MB';
                                    else fileSize = Math.round(fileSize / 1024) + ' KB';
                        }
                        break;
                    }
                }

                tooltip += fileSize + "</b>";

                // Safelinking package info
                if (href.contains('safelinking.net/'))
                {
                    var linkStatus = res.match(/<span style="color:green;" class="result-form">(.+?)<\/span>/);
                    var linkTitle = res.match(/link\-title">(.+?)<\/span>/);
                    var linkDesc = res.match(/description" class="result-form">(.+?)<\/span>/);
                    if (linkStatus) { tooltip = "<b>Link status:</b> " + linkStatus[1].replace(/<\/?strong>/,"").replace(/<br\/>/, " "); }
                    if (linkTitle) { tooltip += "<br><b>Title:</b> " + linkTitle[1]; }
                    if (linkDesc) { tooltip += "<br><b>Description:</b> " + linkDesc[1]; }
                }
				
				// kprotector package info
                if (href.contains('kprotector.com/p4/'))
                {
                    var linkStatus = res.match(/<span style="color:green;" class="result-form">(.+?)<\/span>/);
                    var linkTitle = res.match(/link\-title">(.+?)<\/span>/);
                    var linkDesc = res.match(/description" class="result-form">(.+?)<\/span>/);
                    if (linkStatus) { tooltip = "<b>Link status:</b> " + linkStatus[1].replace(/<\/?strong>/,"").replace(/<br\/>/, " "); }
                    if (linkTitle) { tooltip += "<br><b>Title:</b> " + linkTitle[1]; }
                    if (linkDesc) { tooltip += "<br><b>Description:</b> " + linkDesc[1]; }
                }

                link.warlc_tooltipcache = tooltip;

                if (mouseoverLink == link.href) //mouse cursor is still over the link
                {
                    warlcTooltip.innerHTML = tooltip;
                }
            }
        });
    }
}

//function to return hostname + tld
function gimmeHostName(link) {
    if (link.contains(/([\w-]+\.(?:com?\.\w{2}|in\.ua|uk\.com|\w{2,4}))(?::\d+)?$/)) return link.match(/([\w-]+\.(?:com?\.\w{2}|in\.ua|uk\.com|\w{2,4}))(?::\d+)?$/)[1];
    else {
        console.warn("gimmeHostName error.", link);
        return -1;
    }
}
//Second gimmehostname function to match whole hostname
function gimmeHostName2(link) {
    link = link.replace(/http:\/\/.*?\?http:\/\//, 'http://'); //anonymizers
    if (link.contains(/(?:https?:\/\/)?(?:www\.|[\w\.])*?[\w-]+\.(?:com?\.\w{2}|in\.ua|uk\.com|\w{2,4})(?::\d+)?\//)) return link.match(/(?:https?:\/\/)?(?:www\.|[\w\.])*?([\w-]+\.(?:com?\.\w{2}|in\.ua|uk\.com|\w{2,4}))(?::\d+)?\//)[1];
    else if (link.contains(".1fichier.com")) {
        return "1fichier.com";
    } else {
        console.warn("gimmeHostName error.", link);
        return -1;
    }
}

function uniqArray(array) {
    var uniqueArray = [];
    $.each(array, function(i, el){
        if($.inArray(el, uniqueArray) === -1) uniqueArray.push(el);
    });
    return uniqueArray;
}

function randArr(array) {
    return array[Math.floor(Math.random() * array.length)];
}

var UA = { //obj used for rUA()
    OSes: [
        "Windows NT 5.1",
        "Windows NT 6.1; WOW64",
        "Windows NT 6.3; Win64; x64",
        "Macintosh; Intel Mac OS X 10_9_2",
        "Macintosh; Intel Mac OS X 10_9_3",
        "Macintosh; Intel Mac OS X 10_10_0"
    ],
    UAs: [
        "Mozilla/5.0 (%) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36", //Chrome 35
        "Mozilla/5.0 (%) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36", //Chrome 36
        "Mozilla/5.0 (%) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36", //Chrome 37
        "Mozilla/5.0 (%) Gecko/20100101 Firefox/30.0", //FF 30
        "Mozilla/5.0 (%) Gecko/20100101 Firefox/31.0", //FF 31
        "Mozilla/5.0 (%) AppleWebKit/600.1.8 (KHTML, like Gecko) Version/8.0 Safari/600.1.8" //Safari 6
    ]
}

function rUA() { //generates a random user agent to fool websites about browser signatures
    return navigator.userAgent;//randArr(UA.UAs).replace('%', randArr(UA.OSes));
}

function sendMessage(content)
{
    var msgDiv = "<div class='WarBBInfoMsg'>" + content + "</div>";
    $(".WarBBInfoBox").append(msgDiv).show();
    setTimeout(function(){$(".WarBBInfoBox").hide()}, 5000);
}

function genset(pref, def) {
    var val = preferences.general[pref];
    if (val == undefined) val = def;
    return val;
}

function lsSave() {
    localStorage.setItem("WarBB_Preferences", JSON.stringify(preferences));
}

function setVariables()
{
    if (firstRun)
    {
        console.warn('First run, compiling preferences object...');
        preferences = {
            hosts: {},
            general: {}
        }

        lsSetVal("general", "Display_tooltip_info", true);
        lsSetVal("general", "Display_full_links_in_link_containers", false);
        lsSetVal("general", "Allow_spaces_in_DL_links", false);
        lsSetVal("general", "Do_not_linkify_DL_links", false);
        lsSetVal("general", "Filefactory_API_Check", false);
        lsSetVal("general", "Processbox_Pos_Y", 0);
        lsSetVal("general", "Processbox_Pos_X", 90);
        lsSetVal("general", "Progressbox_Scaling", 100);
        lsSetVal("general", "Last_Update_Check", new Date().valueOf());
        lsSetVal("general", "Ref_anonymize_service", ANONYMIZERS[0]);
        lsSetVal("general", "Show_Update_Notification", true);
        lsSetVal("general", "Focus_First_Link", false);

        localStorage.setItem("WarBB_First_Run", false);
        lsSave();
    }

    Display_tooltip_info = genset("Display_tooltip_info", true);
    Display_full_links_in_link_containers = genset("Display_full_links_in_link_containers", true);
    Allow_spaces_in_DL_links = genset("Allow_spaces_in_DL_links", false);
    Do_not_linkify_DL_links = genset("Do_not_linkify_DL_links", false);
    Processbox_Pos_Y = genset("Processbox_Pos_Y", 0);
    Processbox_Pos_X = genset("Processbox_Pos_X", 90);
    Progressbox_Scaling = genset("Progressbox_Scaling", 100);
    Last_Update_Check = genset("Last_Update_Check", 0);
    Show_Update_Notification = genset("Show_Update_Notification", true);
    Focus_First_Link = genset("Focus_First_Link", false);
    ANONYMIZE_SERVICE = genset("Ref_anonymize_service", ANONYMIZERS[0]);
    ANONYMIZE_SERVICE = (ANONYMIZE_SERVICE != 'NoRed' ? ANONYMIZE_SERVICE : '');
}

function hostSet(key, def) { //will get the value of the key in pref object, if key is undefined -> opposite value of default returned (to keep the compatibility with old GM_getValue and the inversed default values in WarBB 2.0)
    var val = preferences.hosts[key];
    if (val == undefined) val = !def;
    return val;
}

function lsSetVal(section, key, value) { //replacement of GM_setValue, valid for both sections of preferences object
    preferences[section][key] = value;
    lsSave();
}

// Delinkifies the links
// params:
// links -> list of links or link components (note they should be sufficiently unique to identify the link on page,
// e.g. 'uloz.to/xs68skxl8')
function delinkifySnapshot(snapshot)
{
    var n = snapshot.snapshotLength;

    while (n--)
    {
        thisLink = snapshot.snapshotItem(n);

        var spanElm = document.createElement("span");
        spanElm.className = thisLink.className;
        spanElm.innerHTML = thisLink.innerHTML;

        if (Display_tooltip_info)
        {
            spanElm.href = thisLink.href;

            switch (thisLink.className){
            case "alive_link": spanElm.addEventListener("mouseover", displayTooltipInfo, false); break;
            case "adead_link": spanElm.addEventListener("mouseover", displayTooltipError, false); break;
            case "obsolete_link": spanElm.addEventListener("mouseover", displayTooltipError, false); break;
            case "unava_link": //reserved
            default:
            }
        }

        thisLink.parentNode.replaceChild(spanElm, thisLink);
    }
}


    function checkLinks(filterId)
    {
        start(filterId);
    }

    /**
     * Initialises progress box including event binding and CSS
     */
    function initProgressBox()
    {
        if ($("#warlc-progressbox").length > 0)
            return;

        //progressbox css
        var progressboxCss = "#warlc-progressbox  {position:fixed; background:white; bottom:" + Processbox_Pos_Y + "%; left:" + Processbox_Pos_X + "%; padding:5px; font-size:10px; font-weight:bold; font-family:Helvetica; width:130px; cursor:default; border:1px solid #4DD9FF; z-index:200;}\
                    \
                    #warlc-hostdetails  {position:fixed; background:white; bottom:" + (parseInt(Processbox_Pos_Y) + 9) + "%; left:" + Processbox_Pos_X + "%; padding:5px; font-size:10px; font-weight:bold; cursor:default; border:1px solid #4DD9FF; display:none; z-index:201;}\
                    \
                    .warlc-progressbox-contents {right: 5px;}\
                    \
                    .warlc-progressbar {text-align:left; background: lightGrey; height:3px; margin-bottom:5px; width:0px; border-radius:1.5px; }\
                    \
                    .warlc-progressitem { display: block; padding:2.5px 0px 2.5px 20px }\
                    \
                    .alive {color: rgb(133, 195, 49); background:transparent url(" + alive_link_png + ") no-repeat scroll 0% 50%;background-size:15px;}\
                    \
                    .adead {color: red; background:transparent url(" + adead_link_png + ") no-repeat scroll 0% 50%;background-size:15px;}\
                    \
                    .unava {color: #FF9900; background:transparent url(ToBeAddedLater) no-repeat scroll 0% 50%;background-size:15px;}\
                    \
                    .unknown {color: rgb(0, 150, 255); background:transparent url(" + unknown_link_png + ") no-repeat scroll 0% 50%;background-size:15px;}\
                    \
                    .processing {color: grey; background:transparent url(" + processing_link_gif + ") no-repeat scroll 0% 50%;}"

        if (Progressbox_Scaling != 100) {
            $.each(progressboxCss.match(/[\d\.]+px/g), function(i, el) { //dynamic rescaling of the progressbox according to user settings
                progressboxCss = progressboxCss.replace(new RegExp(el + "(?!" + RAND_STRING + ")"), parseFloat(el) * Progressbox_Scaling/100 + "px" + RAND_STRING); //RAND_STRING to prevent the same value replaced twice
            });
        }

        progressboxCss = progressboxCss.replace(new RegExp(RAND_STRING, "g"), "").replace("ToBeAddedLater", unava_link_png); //inserting the unava_link_png at the end because the function messes up its base64 string

        GM_addStyle(progressboxCss);

        $('body').append('    <div id="warlc-progressbox">\
                                <div class="warlc-progressbox-contents">\
                                    <div class="warlc-progressbar" aria-valuenow=0></div>\
                                    <div class="warlc-progressitems">\
                                        <span class="warlc-progressitem alive"></span>\
                                        <span class="warlc-progressitem adead"></span>\
                                        <span class="warlc-progressitem unava"></span>\
                                        <span class="warlc-progressitem unknown"></span>\
                                        <span class="warlc-progressitem processing"></span>\
                                    </div>\
                                </div>\
                            </div>\
                            <div id="warlc-hostdetails"></div>');

        $('#warlc-progressbox').hide().click(function(){
                                                clearInterval(intervalId);
                                                $(this).hide();
                                                return false;
                                            });

        $(".warlc-progressitem").hover(function() {
            showHostDetails(this);
        }, function() {
            showHostDetails("none");
        });

    }

    function showHostDetails(item) {
        var $div = $("#warlc-hostdetails");
        if (item == "none") {
            $div.hide().removeClass();
            if ($("#warlc-progressbox").css("display") != "none") intervalId = setInterval(function() { updateProgress(); }, 1000);
        }
        else {
            function help(status) {
                return $('warbb[name="filehosts"]').attr(status);
            }
            var statusArr;
            var divTxt = "The following hosts ";
            switch(item.className) {
            case "warlc-progressitem alive": divTxt += "have been found alive: "; statusArr = help('live'); break;
            case "warlc-progressitem adead": divTxt += "have been found dead: "; statusArr = help('dead'); break;
            case "warlc-progressitem unava": divTxt += "have been found unavailable: "; statusArr = help('unava'); break;
            case "warlc-progressitem unknown": divTxt += "are unknown: "; statusArr = help('unknown'); break;
            case "warlc-progressitem processing": divTxt += "are still processing: "; statusArr = getProcHosts(); break;
            }
            $div.addClass(item.className);
            $("#warlc-progressbox").append($div);
            if (statusArr == "") divTxt = divTxt.replace("The following", "No").replace(":", ".");
            $div.text(divTxt + statusArr.slice(0,statusArr.length-1).replace(/,/g, ", "));
            clearInterval(intervalId);
            $div.show();
        }

    }

    function getProcHosts() {
        var filehostsProc = "";
        var $links = $(".processing_link");
        if ($links.length > 0) {
            var i = $links.length;
            var hostname;
            while (i--)
            {
                hostname = gimmeHostName2($links[i].href);
                if (!filehostsProc.contains(hostname)) {
                    filehostsProc += hostname + ",";
                }
            }
        }
        return filehostsProc;
    }

    function dismissProgressbar() {
        $(".warlc-progressbar").fadeOut();
        $(".warlc-progressitem.processing").fadeOut();
        clearInterval(intervalId); //stops refreshing the stats
    }

    /**
     * Updates progress data in progress box
     */
    var percAlive, percDead, percUnava, percProc;
    function updateProgress()
    {
        if (cLinksTotal) // some links were detected on page
        {
            var percProgress = Math.round(((100 / cLinksTotal) * cLinksProcessed));
            var $progressItems = $('.warlc-progressitems > .warlc-progressitem');

            $(".warlc-progressbar").css("width", percProgress + "%");
            $(".warlc-progressbar").attr("aria-valuenow", percProgress);

            percAlive = Math.round((cLinksAlive / cLinksTotal) * 100);
            percDead =     Math.round((cLinksDead / cLinksTotal) * 100);
            percUnava = Math.round((cLinksUnava / cLinksTotal) * 100);
            percUnknown = Math.round((cLinksUnknown / cLinksTotal) * 100);
            percProc = Math.round(((cLinksTotal - cLinksProcessed) / cLinksTotal) * 100);

            $progressItems.first().text(cLinksAlive + " - " + percAlive + "% Alive")
                            .next().text(cLinksDead + " - " + percDead + "% Dead")
                            .next().text(cLinksUnava + " - " + percUnava + "% Unavailable")
                            .next().text(cLinksUnknown + " - " + percUnknown + "% Unknown")
                            .next().text(cLinksTotal - cLinksProcessed + " - " + percProc + "% Processing");
            if (percProgress > 0) $("#warlc-progressbox").show();
            if (percProgress == 100) dismissProgressbar();

            if (Focus_First_Link) {
                $('html, body').animate({
                    scrollTop: ($("a[class$='_link']").first().offset().top)
                }, 500);
            }
        }
    }



    function check_all_links()
    {
        add_WARLC_style();

        initProgressBox();
        intervalId = setInterval(function(){updateProgress();}, 1000);

        start(null);
    }

    function KeyDownHandler(event)
    {
        var kcode = (event.keyCode) ? event.keyCode : event.which;
        if (event.ctrlKey && event.altKey)
        {
            switch(kcode)
            {
                case 65 : check_all_links(); break;
                case 67 : configuration(); break;
            }
        }
    }

    //
    //
    //   SCRIPT EXECUTION START POINT
    //
    //

    //init the stuff
    setVariables();

    //register GM menu commands & keyboard shortcut event handler
    $(document).keydown(KeyDownHandler);
    GM_registerMenuCommand("[WarBB - Warez-BB Links Checker] Configuration  (CTRL + ALT + C)", configuration);
    GM_registerMenuCommand("[WarBB - Warez-BB Links Checker] Check All Links (CTRL + ALT + A)", check_all_links);

    //start linkchecking
    $(document).ready(check_all_links);
    //
    //
    //   SCRIPT EXECUTION END POINT
    //
    //

    //shows configuration box
    function configuration()
    {

        //prevent multiple creating of config window
        if ($("#hideshow").length)
        {
            $("#hideshow").show();
            return;
        }

        var settingsIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACGCAYAAAAcjCKsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAEVdJREFUeNrsXY114roSVnK2ALaCdSoIqSDmNrBQQaCCQAWECkgqgFQQUkGcCuJUEN8KllfBPov7iQyDJMvGMth4zvFhN/wZzaf5n9HF379/RUstKbpsl6ClFhAttYBoyY1+0P9cXFw08keGvTBMHzrp1cWffqVX4PDWdzwm6oreoqSJa6RsyQtqVNYdECnjJdNDMP4Wjx0PXxWlV5xen/IxBUncAuJ0QNAH8/uOu94HrQGSV/lYRylSW0BACkjm/8bjKZKUGM/ptaoLOGoHCNgBdwBBp0abT0qO5xQYyxYQ5QBhmD7cE4OwriTVylN6LU9Rapw0IKAWxpAIgWgeSWkxOyVgnCwgUjBIIExrphZqD4yTAwS8hXlDJYKLKnlMgbE+e0CkQJAAWCB+cM4kpcQkBcXqbAGRguEBBmNHtKRIAmJUtbQ4KiAgFV4a4Dn4VCOjKqXF0QABN3LeSgUneoTRuW4kIFIwSFth2PI5F8mo58C3J1IpIBBXeGtVxEEqRIIi8g0I7/UQKRgkCL5aMBxEmw0FdeuVLj2DIYRkaO2FcmiRrum8loAAmlswlE9j2GL1AQTAsGh5542GvkBx2YKhBQWlUr0M5CNeWl5VSjKdPjo5LwPeRCsZjiMpxiclIRCK/mgNyKPS6JCqrNICU23Q6WRIBq96RSvAy1QZixYMYpZeE8NzkkE/xX/FMD5JBa8OktIHAQK6q3/uWzPdlQ/p9ahhugo5y8f3Cm6lc6hRf3kAGKRUmIuWYgKMEUBAPYBEPV3R/YSoM6kOEBBLi3NmvuNrqFQIdC5jet04fm4emmLDViYhpmdoN0jRL5nXYwzswsvaWvt4TY9JhZCpkhspUWAEJh7ud1EJI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/RdFhzC1ly7wvjgx80bvIXCW7txT4IOD5QhzluGBhWurnfpQMCoHgUJRfHEvqCgTfW2B2U6FwqXh1NZ0vdOdgzTZss55o1LgcQRHX4qDruGOIGXSIB+uw1XdNrxX+RSeouB6L5lFtVFDYqmWgORbVNriNIJl1cQB1ZZAokqczqvOFgeHSZrlNKHMIAivGJLLJKp7ucbtNUygxAeQcEc+VaOh5Jb+qmqKooGpgy0UTUu2GlCUbkoCgYyjIquSvaa0FxNBpknVBYKSAIKJrQ71hHjyIq68NKnUIHlPZaUFQKhmWZH1j6WMIWFPUFgxdAMFAkLd/qA4bS3E6LO2o6hrGl4t7EqEiOotI4hAMoZK4gbPl5MBh6ZXkTRwMEAUbT5kNXSTHA4M0uqxwQAMVQmKuqW9JTodxELQABUKi2+tauOJK9cFKAIMB4EA07a6JMRw1gqMxLOzogAIpQ6M//PmepMEMBUqV0EoBg0uL+zG0LVRV+lIDeSQECoAjEfo/GuaiHWZn5iEYAggFjcQZxiwRAWJ7CzZwsIJg3ct9AiSFjCk+nAoTaAIJJDAWMOtsYKwAhOsWbqw0gGDgkKH6L+tRMSrVgHGHQAqJcqSFBcXuC4EggDZ595R1aQNjBofo41ByIqmMa6oC39zpIgsYDwgAQNcJIdnAFJXosMQCgDoeL6wqAswFEBlgUMDoOkkQdrLJRA01hfC5AtNTSZbsELbWAaMlI/xdgACZvWugac3GNAAAAAElFTkSuQmCC";

        var configcss = '\
        .popup_block .popup fieldset{\
           padding: 1%;\
           border-style: none;\
           border-width: 0;\
           border-color: white;\
           margin-bottom: 1px;\
        }\
        .popup_block .popup hr {\
            height: 1px;\
            border-color:black;\
        }\
        #WarBBTitle{\
         font-size: 2em;\
         width:100%;\
        }\
        #hideshow {\
         position: fixed;\
         width: 100%;\
         height: 100%;\
         top: 0;\
         left: 0;\
         font-size:12px;\
         z-index:2147483647;\
         text-align:left;\
        }\
        #fade {\
         background: #000;\
         position: fixed;\
         width: 100%;\
         height: 100%;\
         opacity: .80;\
         -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";\
         left: 0;\
         z-index: 10;\
        }\
        .popup_block {\
         font-family:verdana;\
         color:black;\
         background: #ddd;\
         padding: 10px 20px;\
         border: 2px solid #4DD9FF;\
         float: left;\
         width: 700px;\
         position: absolute;\
         top: 7%;\
         left: 50%;\
         bottom: 7%;\
         margin: 0 0 0 -350px;\
         -moz-border-radius:10px;\
         z-index: 100;\
        }\
        .popup_block .popup {\
         display: block;\
         float: left;\
         width: 100%;\
         height: 95%;\
         background: #fff;\
         margin: 10px 0px;\
         border: 1px solid #4DD9FF;\
        }\
        .popup p {\
         padding: 1px 10px;\
         margin: 0px 0;\
         -x-system-font:none;\
         font-family:verdana,geneva,lucida,"lucida grande",arial,helvetica,sans-serif;\
         font-size:10pt;\
         font-size-adjust:none;\
         font-stretch:normal;\
         font-style:normal;\
         font-variant:normal;\
         font-weight:normal;\
         line-height:normal;\
        }\
        #note {\
            font-size:7pt;\
            color:gray;\
            padding: 1px 10px;\
            margin: 0px 0;display:inline-block;\
            min-width:100px;\
        }\
        #configinfo {\
            font-size:8pt;\
            color:gray;\
            padding: 1px 10px;\
            margin: 0px 0;display:inline-block;width:60em;\
        }\
        #WarBBTabs > input[type="button"], .WarBBButtons > input[type="button"] {\
            display: inline-block;\
            font-size: 12px;\
            font-weight: normal;\
            background-color: rgb(238, 238, 238);\
            background-position: 0px -178px;\
            background-repeat: repeat-x;\
            text-shadow: 0px 1px rgb(255, 255, 255);\
            padding: 4px 8px;\
            position: relative;\
            overflow: hidden;\
            color: rgb(51, 51, 51);\
            margin: 0 0;\
            border: 1px solid rgb(170, 170, 170);\
            border-radius: 0 0 0 0;\
            box-shadow: 0px 12px rgb(255, 255, 255) inset;\
            float: left;\
        }\
        #WarBBTabs > input[type="button"] {\
            border-bottom: none;\
        }\
        #WarBBSeparator {\
            border-bottom: 1px solid rgb(170, 170, 170);\
            margin-top: 24px;\
        }\
        #selectAllButton {\
            border-radius: 3px 0 0 3px;\
            border-right: none;\
        }\
        #invertButton {\
            border-radius: 0 3px 3px 0;\
            border-left: none;\
        }\
        #WarBBTabs > input[name="WarBBHosts"] {\
            border-radius: 3px 0 0 0;\
            border-right:none;\
            margin-left:10px;\
        }\
        #WarBBTabs > input[name="WarBBAbout"] {\
            border-radius: 0 3px 0 0;\
            border-left:none;\
        }\
        .WarBBButtons > input[type="button"]:hover {\
            padding: 5px 8px 3px;\
            box-shadow: 0 0 white;\
            background: none;\
        }\
        #WarBBTabs > input.activeTab {\
            padding: 5px 8px 3px;\
            box-shadow: 0 0 white;\
            background: none;\
        }\
        .WarBBTab {\
            display: none;\
        }\
        .WarBBButtons, #WarBBTabs, #warlcsitelist1 {\
            margin-left: 5px;\
        }\
        #warlcsitelist1 {\
            border-top: 1px solid grey;\
            padding-top: 5px;\
            overflow:auto;\
            margin-top:2px;\
        }\
        .WarBBTabContainer {\
            overflow:auto;\
        }\
        input:hover+label {\
            background:#F1F77C;\
            font-size:110%;\
        }\
        .popup_block .popup legend {\
            display:block;\
            width:100%;\
            padding:0;\
            margin-bottom:2px;\
            font-size:15px;\
            line-height:inherit;\
            color:#333;\
            border:0;\
            border-bottom:1px solid #e5e5e5\
        }\
        ';

        GM_addStyle(configcss);

        var configurationinnerHTML =
        '<div id="fade"></div>\
        <div class="popup_block">\
            <div class="popup">\
                <div id="WarBBTitle" style="height: 1.2em"><img src=' + settingsIcon + ' style="height:35px;margin-left:2px;vertical-align:middle;"></img>WarBB - Configuration</div><br>\
                <div id="WarBBTabs">\
                    <input type="button" name="WarBBHosts" class="activeTab" value="Filehostings">\
                    <input type="button" name="WarBBSettings" value="Settings">\
                    <input type="button" name="WarBBAbout" value="About">\
                </div>\
                <div id="WarBBSeparator"></div>\
                <div id="WarBBHosts" class="WarBBTab">\
                    <br><div class="WarBBButtons">\
                        <input type="button" id="selectAllButton" value="Select All">\
                        <input type="button" id="selectNoneButton" value="Select None">\
                        <input type="button" id="invertButton" value="Invert">\
                    </div><br><br>\
                    <input style="margin-left:5px;" type="textbox" placeholder="Search filehost" id="hostSearchBox" value="">\
                    <div id="warlcsitelist1"><span>Empty</span></div>\
                </div>\
                <div id="WarBBSettings" class="WarBBTab">\
                    <br>\
                    <div id="WarBBPreferences" class="WarBBTabContainer">\
                        <fieldset>\
                            <legend>General settings</legend>\
                            <p><input type="checkbox" id="Do_not_linkify_DL_links"> Do NOT linkify DL links</p>\
                            <p><input type="checkbox" id="Allow_spaces_in_DL_links"> Allow spaces in DL links<br><div id="configinfo">Note: All links must end with a new line!</div></p>\
                            <p><input type="checkbox" id="Display_full_links_in_link_containers"> Display full links in link containers</p>\
                            <p><input type="checkbox" id="Display_tooltip_info"> Display tooltip info<br><div id="configinfo">Note: File name, file size, error messages etc.</div></p>\
                            <p><input type="checkbox" id="Show_Update_Notification">Show notification when WarBB is up to date</p>'
                            //<p><input type="checkbox" id="Focus_First_Link">Focus on the first link found</p>\
                        + '</fieldset>\
                        <fieldset>\
                            <legend>Progressbox settings</legend>\
                            <p>Horizontal positioning of the progressbox: <input type="text" id="Processbox_Pos_X"><br><div id="configinfo">Note: Define this value in percentages starting from the left of the screen.</div></p>\
                            <p>Vertical positioning of the progressbox: <input type="text" id="Processbox_Pos_Y"><br><div id="configinfo">Note: Define this value in percentages starting from the bottom of the screen.</div></p>\
                            <p>Scaling of the progressbox: <input type="text" id="Progressbox_Scaling"><br><div id="configinfo">Note: Resizes the progressbox. Define this value in percentages. 100% = full size, 200% = double size, etc</div></p>\
                        </fieldset>\
                        <fieldset>\
                            <legend>Host options</legend>\
                            <p>Anonymizer:\
                            <select style="margin-left:5px;" id="redirector">\
                                <option>Lorem ipsum dolorem</option>\
                            </select></p>\
                            <p><input type="checkbox" id="Filefactory_API_Check"> Check Filefactory.com links through API</p>\
                            <div id="configinfo">Note: We cannot guarantee this will work. If disabled, WarBB will use a website check instead.</div>\
                        </fieldset>\
                    </div>\
                </div>\
                <div id="WarBBAbout" class="WarBBTab">\
                    <br>\
                    <div class="WarBBTabContainer">\
                    <fieldset>\
                    <legend>WarBB3 - Warez-BB Link Checker v' + WarBB_version + '</legend>\
                    <p>Authors: HD3D (<a href="https://www.warez-bb.org/profile.php?mode=viewprofile&u=3240849">Warez-BB</a> | <a href="https://greasyfork.org/en/users/3905-hd3d">GreasyFork</a>)</p>\
                    <p>Former Authors: iKickback (<a href="https://www.warez-bb.org/profile.php?mode=viewprofile&u=2348347">Warez-BB</a>) & thecodingdude (<a href="https://www.warez-bb.org/profile.php?mode=viewprofile&u=2089048">Warez-BB</a>)</p>\
                    <p>Based on W.A.R. Links Checker - Dev</p>\
                    <p>Original by dkitty</p>\
                    <p>Graphics by LiabilityZero (<a href="https://www.warez-bb.org/profile.php?mode=viewprofile&u=3229521">Warez-BB</a> | <a href="http://liabilityzero.deviantart.com/">deviantART</a> | <a href="mailto:liabilityjeeru@gmail.com">Contact</a>)</p>\
                    </fieldset>\
                    <br />\
                    <fieldset>\
                    <legend>Currently supported</legend>\
                    <p>Filehostings: ' + allHostNames.length + '<br />\
                    Containers: ' + allContainerNames.length + '<br />\
                    Obsolete sites: ' + allObsoleteNames.length + '<br /></p>\
                    </fieldset>\
                    <br />\
                    <fieldset>\
                    <legend>Uses</legend>\
                    <p>adam_3\'s <a href="http://userscripts.org/scripts/show/2254">Linkify ting</a> (modified)</p>\
                    <p><a href="http://jquery.com/">jQuery</a> JavaScript Library</p>\
                    </fieldset>\
                    <br />\
                    <fieldset>\
                    <legend>License</legend>\
                    <p>GPL version 3 or any later version (<a href="http://www.gnu.org/copyleft/gpl.html">http://www.gnu.org/copyleft/gpl.html</a>)</p>\
                    </fieldset>\
                    </div>\
                </div>\
            </div>\
        </div>';

        $('body').append('<div id="hideshow">' + configurationinnerHTML + '</div>');
        $("#WarBBHosts").show();

        //sets height of warlcsitelist1
        var totalHeight = $(".popup").height();
        $("#warlcsitelist1").height(totalHeight - 155); $(".WarBBTabContainer").height(totalHeight - 90);
        $("#WarBBSeparator").css("margin-top", 9 + $(".activeTab").height() + "px"); //because the buttons have a different height on the different themes

        $("#WarBBTabs > input[type='button']").click(function() {
            var $target = $(this);
            var current = "#" + $(".activeTab").removeClass().attr("name"); $(current).hide();
            var targetTab = "#" + $target.addClass("activeTab").attr("name"); $(targetTab).show();
        });

        $("#fade").click(function(event) {
            $("#hideshow").hide(); event.preventDefault();
        });

        var elmHostList = document.getElementById("warlcsitelist1");

        buildSettings();
        buildSitelist("", allHostNames, elmHostList);
        appendObsolete("", allObsoleteNames, elmHostList);

        //handler for checkbox state change
        function changeConfiguration(e)
        {
            var element = e.target;

            if (element.type == 'checkbox')
            {
                if (element.checked == 1)
                {
                    lsSetVal("hosts", element.id, true);
                }
                else
                {
                    lsSetVal("hosts", element.id, false);
                }

            }
        }

        //Selects all filehosting checkboxes
        function selectAll()
        {
            $(":checkbox:visible:not(:checked)").prop("checked",true)
                         .each(function(index, element){lsSetVal("hosts", this.id, true)});
        }

        //Deselects all filehosting checkboxes
        function selectNone()
        {
            $(":checkbox:visible:checked").prop("checked",false)
                         .each(function(index, element){lsSetVal("hosts", this.id, false)});
        }

        //Inverts filehosting checkboxes selection
        function selectInvert()
        {
            var $checked = $(":checkbox:visible:checked");
            var $unchecked = $(":checkbox:visible:not(:checked)");

            $unchecked.prop("checked",true)
                         .each(function(index, element){lsSetVal("hosts", this.id, true)});
            $checked.prop("checked",false)
                         .each(function(index, element){lsSetVal("hosts", this.id, false)});
        }

        //Sets anonymizer setting
        function changeAnonymizer()
        {
            var val = $("#redirector").val();
            lsSetVal("general", "Ref_anonymize_service", (val == ANONYMIZERS.length ? '' : ANONYMIZERS[val]));
            $('#redirector option[value=' + val + ']').prop('selected', true);
        }

        //Sets selected redirector option
        var anonlist = "";
        $(ANONYMIZERS).each(function(index, value) {
            anonlist += '<option value=' + index  + (value == ANONYMIZE_SERVICE ? ' selected' : '') + '>' + gimmeHostName2(value) + '</option>';
        });
        anonlist += '<option value="' + ANONYMIZERS.length + '">No referer</option>';
        $('#redirector').html(anonlist);

        //Sets Processbox position setting
        function changeProgBox(event) {
            var setting;
            switch(event.data.set) {
                case "X": setting = "Processbox_Pos_X"; break;
                case "Y": setting = "Processbox_Pos_Y"; break;
                case "Scale": setting = "Progressbox_Scaling"; break;
            }

            var $setting = $("#" + setting);
            var newSet = $setting.val().replace("%", "");
            lsSetVal("general", setting, newSet);
        }

        //Sets value of Processbox position
        $("#Processbox_Pos_X").val(Processbox_Pos_X + "%");
        $("#Processbox_Pos_Y").val(Processbox_Pos_Y + "%");
        $("#Progressbox_Scaling").val(Progressbox_Scaling + "%");

        function buildSettings()
        {
            $("#WarBBPreferences :checkbox").each(function(){
                $(this).prop("checked", genset($(this).attr("id")))
                    .click(function(e){
                        lsSetVal("general", $(this).attr("id"), $(this).prop("checked"));
                        setVariables();
                    });
            })
        }

        //Dynamic build of host list
        //param search         [string]    searches for hostnames matching search substring
        //param siteNames     [array]        array of site names
        //param targetNode     [DOM Node]    where the list should be built
        //                                first child node is replaced
        function buildSitelist(search, siteNames, targetNode)
        {
            var searchRegex = new RegExp("\\|?([\\w\\.-]*" + search.replace(/\./g,"\\.").replace(/-/g, "\\-") + "[\\w\\.-]*)\\|?", "i");

            $(targetNode).empty().append("<fieldset id='WarBBHosts1'><legend>Filehosts</legend></fieldset>");
            var $targetNode = $("#WarBBHosts1");

            var searchedSite = "";
            $.each(siteNames, function(i, site){
                if (searchedSite = site.match(searchRegex))
                {
                    var baseSite = site.replace(/\|.+/, ""); //filehosting main domain

                    //ensuring backward compatibility with the rest of code, to be refactored later
                    var oldRSLCvalue = "Check_" + baseSite.replace(/\|.+/, "").replace(/\./g,"_dot_").replace(/-/g, "_dash_") + "_links";
                    //

                    $targetNode.append('<input type="checkbox" id="' + oldRSLCvalue +'" />\
                        <label for="' + oldRSLCvalue + '">' + searchedSite[1] + '</label>' +
                        ((searchedSite[1] != baseSite) ? ('<div id="note"> ( ~ ' + baseSite + ' )</div>') : (""))
                        );

                    $("#" + oldRSLCvalue).prop("checked", hostSet(oldRSLCvalue, false))
                                        .change(changeConfiguration);

                    $targetNode.append('<br />');
                }
            });

            $(targetNode).append("<fieldset id='WarBBHosts2'><legend>Containers</legend></fieldset>");
            $targetNode = $("#WarBBHosts2");

            searchedSite = "";
            $.each(allContainerNames, function(i, site) {
                if (searchedSite = site.match(searchRegex)) {
                var oldRSLCvalue = "Check_" + searchedSite[1].replace(/\|.+/, "").replace(/\./g,"_dot_").replace(/-/g, "_dash_") + "_links";
                $targetNode.append('<input type="checkbox" id="' + oldRSLCvalue +'" />\
                    <label for="' + oldRSLCvalue + '">' + searchedSite[1] + '</label>');
                $("#" + oldRSLCvalue).prop("checked", hostSet(oldRSLCvalue, false))
                                    .change(changeConfiguration);
                $targetNode.append('<br />');
                }
            });
        }

        //obsolete hosts checkbox
        function appendObsolete(search, siteNames, targetNode) {
            var searchRegex = new RegExp("\\|?([\\w\\.-]*" + search.replace(/\./g,"\\.").replace(/-/g, "\\-") + "[\\w\\.-]*)\\|?", "i");
            $(targetNode).append('<fieldset id="WarBBHosts3"><legend>Obsolete hosts</legend><input type="checkbox" id="Obsolete_file_hosts" /><label for="Obsolete_file_hosts">Check obsolete file hosts</label><br /></fieldset>');
            $("#Obsolete_file_hosts").prop("checked", hostSet("Obsolete_file_hosts", false))
                                    .change(changeConfiguration);

            var $targetNode = $("#WarBBHosts3");

            var foundName = "";
            $.each(siteNames, function(i, site){
                if (foundName = siteNames[i].match(searchRegex))
                {
                    $targetNode.append('<div id="note">' + foundName[1] + '</div>');
                }
            })
        }

        //event listener binding
        $("#hostSearchBox").keyup(function() {
            buildSitelist($("#hostSearchBox").val(), allHostNames, elmHostList);
            appendObsolete($("#hostSearchBox").val(), allObsoleteNames, elmHostList);
        });
        $("#selectAllButton").click(selectAll);
        $("#selectNoneButton").click(selectNone);
        $("#invertButton").click(selectInvert);
        $("#redirector").change(changeAnonymizer);
        $("#Processbox_Pos_X").change({ set: "X" }, changeProgBox);
        $("#Processbox_Pos_Y").change({ set: "Y" }, changeProgBox);
        $("#Progressbox_Scaling").change({ set: "Scale" }, changeProgBox);

        //buttons and edit boxes init end
    }

//Objects for linkchecking
var hostsIDs = {}; //hosts IDs and link regexes
var hostsCheck = {}; //host status IDs and links
var foundMirrors = { //mirrors found on the page, listed by type of check
    BC: [],
    HC: [],
    OH: [],
    RH: [],
    WC: []
}

//begin standard link checking algorithm
function start(filterId)
{
    var doNotLinkify = Do_not_linkify_DL_links;
    var redirectorTypes = { "HTTP_302": 0,
                            "INNER_LINK": 1};

    // USER SELECTED FILE HOSTS INITIALIZATION START
    if (!filterId) {
        initFileHosts();
        initBulkHosts();
        initRedirectors();
        initFileHostsHeadersOnly();
    }
    // USER SELECTED FILE HOSTS INITIALIZATION END

    // LINKIFICATION START
    linkify(filterId);
    //LINKIFICATION END

    //
    //HANDLING REDIRECTORS START
    //
    var redirFunctions = {
        //HTTP_302
        tries: 0,
		processRedirectorLink: function(link, redirectorId) {
			link.className = 'container_link';
			var hostname = gimmeHostName2(link.href);
			if (link.href.match("safelinking")) { link.href = link.href.replace(/http:\/\//,"https://"); }
			GM_xmlhttpRequest({
				method: 'HEAD',
				url: link.href,
				headers: {
					'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey',
					'Accept': 'text/xml',
					'Referer': ""
				},
				onload: function(result) {
					if (result.status == 404) {
						if (result.finalUrl.match(/skydrive\.live\.com/)) return; 
						else {
							link.className = 'adead_link';
							hostsCheck[redirectorId].cProcessed++;
							cLinksProcessed++; cLinksDead++;
							if (filehostsDead.search(hostname) == -1) filehostsDead += hostname + ",";
						}
					} else if (result.finalUrl.replace("https", "http") == link.href || result.finalUrl == link.href) // service hasn't redirected anywhere
					{
						if (result.status == 404) {
							link.className = 'adead_link';
							hostsCheck[redirectorId].cProcessed++;
							cLinksProcessed++; cLinksDead++;
							if (filehostsDead.search(hostname) == -1) filehostsDead += hostname + ",";
						} else if (redirFunctions.tries < 25) {
							redirFunctions.tries++;
							processRedirectorLink(link, redirectorId);
						} else if (redirFunctions.tries >= 25) {
							cLinksProcessed++; cLinksUnknown++;
							hostsCheck[redirectorId].cProcessed++;
							link.className = 'unknown_link';
							if (filehostsUnknown.search(hostname) == -1) filehostsUnknown += hostname + ",";
						}
					}					
					else
					{
						hostsCheck[redirectorId].cProcessed++;		
						if (Display_full_links_in_link_containers){
							link.innerHTML = result.finalUrl;
						}

						link.href = result.finalUrl;
	
						if (hostsCheck[redirectorId].cProcessed >= hostsCheck[redirectorId].cTotal){
							checkLinks('container_link');
						}
					}					
				},
				onerror: function(result) { //probably caused by unresponsive filehosting
					hostsCheck[redirectorId].cProcessed++;
					
					link.className = 'adead_link';
					cLinksProcessed++; cLinksDead++;
					if (filehostsDead.search(hostname) == -1) filehostsDead += hostname + ",";
					
					if (hostsCheck[redirectorId].cProcessed >= hostsCheck[redirectorId].cTotal)
						checkLinks('container_link');
				}
			});
		},

        //INNER_LINK (Hotfile.com/links/)
        processRedirectorLinkEx: function(link, redirectorId) {
            link.className = 'container_link';

            GM_xmlhttpRequest({
                method: 'GET',
                url: link.href,
                headers: {
                    'User-agent': rUA(),
                    'Accept': 'text/xml',
                    'Referer': ""
                },
                onload: function(result) {
                    link.href = result.responseText.match(hostsCheck[redirectorId].innerLinkRegex)[1];

                    hostsCheck[redirectorId].cProcessed++;

                    if (hostsCheck[redirectorId].cProcessed >= hostsCheck[redirectorId].cTotal)
                        checkLinks('container_link');
                }
            });
        }
    }

    foundMirrors.RH = uniqArray(foundMirrors.RH);
    redirLength = foundMirrors.RH.length;
    if (redirLength > 0) {
        //process redirector links
        var hostID, links, y;
        for(var redirIdx = 0; redirIdx < redirLength; redirIdx++)
        {
            hostID = foundMirrors.RH[redirIdx];
            links = uniqArray(hostsCheck[hostID].links)
            hostsCheck[hostID].cTotal = links.length;

            cLinksTotal += links.length;
            y = links.length;

                while(y--) {
                    switch(hostsCheck[hostID].type) {
                        case redirectorTypes.HTTP_302:       redirFunctions.processRedirectorLink(links[y], hostID); break;
                        case redirectorTypes.INNER_LINK:        redirFunctions.processRedirectorLinkEx(links[y], hostID); break;
                        default:
                    }
                }

            hostsCheck[hostID].links = [];
        }
    }
    foundMirrors.RH = [];
    //
    //HANDLING REDIRECTORS END
    //

    //STANDARD LINKCHECKING START
    foundMirrors.WC = uniqArray(foundMirrors.WC);
    var WCLength = foundMirrors.WC.length;
    if (WCLength > 0) {
        var hostID, links, isAliveRegex, isDeadRegex, isUnavaRegex, tryLoop, y;
        while(WCLength--) {
            hostID = foundMirrors.WC[WCLength];
            links = uniqArray(hostsCheck[hostID].links);

            if (filterId == null)
            {
                cLinksTotal += links.length;
            }

            isAliveRegex = hostsCheck[hostID].liveRegex;
            isDeadRegex = hostsCheck[hostID].deadRegex;
            isUnavaRegex = hostsCheck[hostID].unavaRegex;
            tryLoop = hostsCheck[hostID].tryLoop;

            y = links.length;

            while (y--)
            {
                geturl(links[y], isAliveRegex, isDeadRegex, isUnavaRegex, tryLoop);
            }
            hostsCheck[hostID].links = [];
        }
    }
    foundMirrors.WC = [];
    //STANDARD LINKCHECKING END

    //OBSOLETE FILE HOSTS PROCESSING START
    foundMirrors.OH = uniqArray(foundMirrors.OH);
    var OHLength = foundMirrors.OH.length;
    if (OHLength > 0) {
        var hostID, links, y;
        while(OHLength--) {
            hostID = foundMirrors.OH[OHLength];
            links = uniqArray(hostsCheck[hostID].links);

            if (filterId == null)
            {
                cLinksTotal += links.length;
            }

            y = links.length;

            while (y--)
            {
                $(links[y]).attr('warlc_error', 'Cause of error: <b>Obsolete filehosting.</b>');
                displayTheCheckedLink(links[y], "obsolete_link");
            }
            hostsCheck[hostID].links = [];
        }
    }
    foundMirrors.OH = [];
    //OBSOLETE FILE HOSTS PROCESSING END

    //DIRECT LINKCHECKING START
    foundMirrors.HC = uniqArray(foundMirrors.HC);
    var HCLength = foundMirrors.HC.length;
    if (HCLength > 0) {
        var hostID, links, isAliveRegex, isDeadRegex, y;
        while(HCLength--) {
            hostID = foundMirrors.HC[HCLength];
            links = uniqArray(hostsCheck[hostID].links);

            if (filterId == null)
            {
                cLinksTotal += links.length;
            }

            isAliveRegex = hostsCheck[hostID].liveRegex;
            isDeadRegex = hostsCheck[hostID].deadRegex;

            y = links.length;

            while (y--)
            {
                geturlHeader(links[y], isAliveRegex, isDeadRegex);
            }
            hostsCheck[hostID].links = [];
        }
    }
    foundMirrors.HC = [];
    //DIRECT LINKCHECKING END

    //Bulkcheck hosts controller
    foundMirrors.BC = uniqArray(foundMirrors.BC);
    var BCLength = foundMirrors.BC.length;
    if (BCLength > 0) {
        var hostID, links, y, corrLink, m, n;
        while(BCLength--) {
            hostID = foundMirrors.BC[BCLength];
            links = uniqArray(hostsCheck[hostID].links);
            if (filterId == null)
            {
                cLinksTotal += links.length;
            }

            //Replace anchors by href's, and processes link corrections
            y = links.length;
            while(y--) {
                corrLink = links[y].href;
                if (hostsCheck[hostID].corrMatch && hostsCheck[hostID].corrMatch.test(corrLink)) corrLink = corrLink.match(hostsCheck[hostID].corrMatch)[1]; //link match corrections
                if (hostsCheck[hostID].corrReplWhat && hostsCheck[hostID].corrReplWith) corrLink = corrLink.replace(hostsCheck[hostID].corrReplWhat, hostsCheck[hostID].corrReplWith); //link replace corrections
                links[y] = corrLink;
            }

            //Filter out dupe links
            links = uniqArray(links);

            m = links.length;
            n = hostsCheck[hostID].blockSize;
            if (m > n) {
                //insert block separators (RAND_STRING) into the array
                for(var i = n; i < (Math.floor(m/n)+1)*n; i += n + 1)
                {
                    links.splice(i, 0, RAND_STRING);
                }
            }

            var sep = hostsCheck[hostID].splitSeparator;

            hostsCheck[hostID].func.call({     links:            links.join(sep).replace(new RegExp(sep.replace(/\\/g, "\\") + RAND_STRING + sep.replace(/\\/g, "\\"), "g"), RAND_STRING).replace(new RegExp(RAND_STRING + "$"), "").split(RAND_STRING),
                                            apiUrl:         hostsCheck[hostID].apiUrl,
                                            postData:         hostsCheck[hostID].postData,
                                            resLinkRegex:    hostsCheck[hostID].resLinkRegex,
                                            resLiveRegex:    hostsCheck[hostID].resLiveRegex,
                                            resDeadRegex:    hostsCheck[hostID].resDeadRegex,
                                            resUnavaRegex:     hostsCheck[hostID].resUnavaRegex,
                                            separator:         sep
                                        });

            hostsCheck[hostID].links.length = 0;
        }
    }
    foundMirrors.BC = [];

    //Processes link
    //
    // [string]        link            link URL
    // [string]     isAliveRegex    alive link regex
    // [string]     isDeadRegex        dead link regex
    // [string]     isUnavaRegex    unavailable link regex
    // [boolean]    tryLoop            repeats request until succeeded
    function geturl(link, isAliveRegex, isDeadRegex, isUnavaRegex, tryLoop)
    {
        //host exceptions
        if ((link.href.contains("yourfilelink.com/")) && (!link.href.contains("&dv=1"))) link.href += "&dv=1"; //to bypass yourfilelink wait times
        link.href = link.href.replace("shareplace.com/?", "shareplace.com/index1.php?a="); //to bypass shareplace iframe on shareplace.com/?{id} links
        link.href = link.href.replace('ultramegabit.com', 'uploadto.us'); //to bypass ultramegabit ssl certificates warnings

        GM_xmlhttpRequest(
        {
            method: 'GET',
            url: link.href,
            headers: {
                'User-agent': rUA(),
                'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
                'Accept-Charset': 'windows-1250,utf-8;q=0.7,*;q=0.7',
                'Referer': ""
            },
            onload: function (result)
            {
                var res = result.responseText;

                //console.log(res);

                if (res.contains(isAliveRegex))
                {
                    displayTheCheckedLink(link, 'alive_link');
                    return;
                }

                if (res.contains(isDeadRegex))
                {
                    displayTheCheckedLink(link, 'adead_link');
                    return;
                }

                if (res.contains(isUnavaRegex))
                {
                    displayTheCheckedLink(link, 'unava_link');
                    return;
                }

                var resStatus = result.status;

                if (resStatus == 404)
                {
                    displayTheCheckedLink(link, 'adead_link');
                    return;
                }

                if (resStatus == 500 || resStatus == 503 || resStatus == 403 || res.contains('>Too Many Requests')) //not found/available/temp. unava/too many requests: solely for k2s.cc
                {
                    if (tryLoop)
                    {
                        //wait 1-5 seconds and repeat the request
                        setTimeout(function(){geturl(link, isAliveRegex, isDeadRegex, isUnavaRegex, tryLoop)}, 1000 + (Math.random() * 4000));
                    }
                    else
                    {
                        displayTheCheckedLink(link, 'unava_link');
                    }

                    return;
                }

                displayTheCheckedLink(link, 'unknown_link');
                res = "";
            },
            onerror: function ()
            {
                displayTheCheckedLink(link, 'unknown_link');
            }
        });
    }

    function geturlHeader(link, isAliveRegex, isDeadRegex)
    {
        if (link.href.contains("disk.karelia.pro/") && !link.href.contains(/karelia\.pro\/fast\/\w+\/.+?/)) {
            geturl(link, 'diskFile\"', '<div id="center">\n+<\/div>', 'optional--', false);
            return;
        }

        if (link.href.contains("demo.ovh.") && link.href.contains("/download/")) {
            specificOvhCheck(link);
            return;
        }

        GM_xmlhttpRequest(
        {
            method: 'HEAD',
            url: link.href,
            headers: {
                'User-agent': rUA(),
                'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
                'Accept-Charset': 'windows-1250,utf-8;q=0.7,*;q=0.7',
                'Referer': ""
            },
            onload: function (result)
            {
                var resStatus = result.status;
                var resHeaders = "";

                if (resStatus == 403 || resStatus == 404 || resStatus == 500) //not found/available
                {
                    displayTheCheckedLink(link, 'adead_link');
                    return;
                }

                if (resStatus == 509) //public traffic exhausted
                {
                    displayTheCheckedLink(link, 'unava_link');
                    return;
                }

                resHeaders = result.responseHeaders;
                //console.log(resHeaders);

                if (resHeaders.contains(isDeadRegex) && !link.href.contains('archive.org/'))
                {
                    displayTheCheckedLink(link, 'adead_link');
                    return;
                } else if (link.href.contains('archive.org/') && resHeaders.contains(isDeadRegex)) {
                    specArchCheck(link);
                    return;
                }

                if (resHeaders.contains(isAliveRegex))
                {
                    displayTheCheckedLink(link, 'alive_link');
                    return;
                }

                if (link.href.contains('rapidgator.net|rg.to')) {
                    geturl(
                        link,
                        /btm" style="height: \d+px;">\s*<p/,
                        '<h3>File not found</h3>|<span>Get the advantages of premium-account',
                        'optional--',
                        true);
                    return;
                }
				
                if (link.href.contains('alfafile.net')) {
                    geturl(
                        link,
                        /btm" style="height: \d+px;">\s*<p/,
                        '<h3>File not found</h3>|<span>Get the advantages of premium-account',
                        'optional--',
                        true);
                    return;
                }

                displayTheCheckedLink(link, 'unknown_link');
            },
            onerror: function ()
            {
                displayTheCheckedLink(link, 'unknown_link');
            }
        });
    }

    function specArchCheck(link) {
        var alive = /<title>Index of/;
        var dead = /<h1>Item not available<\/h1>/;
        var unava = /optional--/;
        geturl(link, alive, dead, unava);
    }

    //Specific handler for demo.ovh.com/download/ direct link
    function specificOvhCheck(link) {
        GM_xmlhttpRequest(
        {
            method: 'HEAD',
            url: link.href,
            headers: {
                'User-agent': rUA(),
                'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
                'Accept-Charset': 'windows-1250,utf-8;q=0.7,*;q=0.7',
                'Referer': ""
            },
            onload: function (result)
            {
                var resHeaders = "";
                resHeaders = result.responseHeaders;
                if (resHeaders.contains('Content-Type: application/octet-stream'))
                {
                    displayTheCheckedLink(link, 'alive_link');
                    return;
                }

                if (resHeaders.contains('Content-Type: text/html'))
                {
                    var liveRegex = 'download.gif"';
                    var deadRegex = 'p_point">';
                    var unavRegex = 'optional--';
                    geturl(link, liveRegex, deadRegex, unavRegex);
                    return;
                }

            },
            onerror: function ()
            {
                displayTheCheckedLink(link, 'unava_link');
            }
        });
    }

    //Delinkfifies the <a> element object
    function delinkifyLink(link)
    {
        var spanElm = document.createElement("span");
        spanElm.className = link.className;
        spanElm.innerHTML = link.innerHTML;

        if (Display_tooltip_info)
        {
            spanElm.href = link.href;
            $(spanElm).attr('warlc_error', $(link).attr('warlc_error'));

            switch (link.className){
            case "alive_link": spanElm.addEventListener("mouseover", displayTooltipInfo, false); break
            case "adead_link": spanElm.addEventListener("mouseover", displayTooltipError, false); break;
            case "unava_link": //reserved
            default:
            }
        }

        link.parentNode.replaceChild(spanElm, link);
    }

    //Assigns result status to the <a> element object and calls delinkifying eventually
    //Possible result states: adead_link, alive_link, unava_link
    function displayTheCheckedLink(link, resultStatus)
    {
        //console.log(link);
        link.className = resultStatus;
        var hostname = gimmeHostName2(link.href);
        link.href = ANONYMIZE_SERVICE + link.href;

        if (Display_tooltip_info)
        {
            switch (resultStatus){
            case "alive_link": link.addEventListener("mouseover", displayTooltipInfo, false); break;
            case "adead_link": link.addEventListener("mouseover", displayTooltipError, false); break;
            case "obsolete_link": link.addEventListener("mouseover", displayTooltipError, false); break;
            case "unava_link": //reserved
            default:
            }
        }

        if (doNotLinkify)
        {
            delinkifyLink(link);
        }

        cLinksProcessed++;

        if (resultStatus == "alive_link")
        {
            cLinksAlive++;
            updateHosts('live', hostname);
            return;
        }

        if (resultStatus == "adead_link")
        {
            cLinksDead++;
            updateHosts('dead', hostname);
            return;
        }

        if (resultStatus == "obsolete_link")
        {
            cLinksDead++;
            updateHosts('dead', hostname);
            return;
        }

        if (resultStatus == "unava_link")
        {
            updateHosts('unava', hostname);
            cLinksUnava++;
        }

        if (resultStatus == "unknown_link")
        {
            updateHosts('unknown', hostname);
            cLinksUnknown++;
        }
    }

    function DisplayTheCheckedLinks(links, resultStatus, tooltipInfo)
    {
        //(a[href*=link_1], a[href*=link_2], ..., a[href*=link_n])
        var $links = $('a[href*="' + links.join('"], a[href*="') + '"]');

        if (Do_not_linkify_DL_links)
        {    //TODO into separate jQuery function
            $links.replaceWith(function(){
                return '<span href="' + this.href + '">' + $(this).text() + '</span>';
            });

            $links = $('span[href*="' + links.join('"], span[href*="') + '"]');
        }
        $links.removeClass().addClass(resultStatus);
        if (tooltipInfo && resultStatus == 'unknown_link' && Display_tooltip_info) {
            $links.mouseover(displayTooltipError);
            $links.attr('warlc_error', 'Cause of error: <b>' + tooltipInfo + '</b>');
        }
        var hostname = gimmeHostName2($links[0].href);
        $links.each(function() {
            if (!this.href.contains('mega.co.nz|mega.nz')) this.href = ANONYMIZE_SERVICE + $(this).attr("href");
        });

        switch(resultStatus)
        {
            case "alive_link":        cLinksAlive += $links.length;
                                    if (Display_tooltip_info) $links.mouseover(displayTooltipInfo);
                                    updateHosts('live', hostname);
                                    break;
            case "adead_link":         cLinksDead += $links.length;
                                    if (Display_tooltip_info) $links.mouseover(displayTooltipError);
                                    updateHosts('dead', hostname);
                                    break;
            case "obsolete_link":    cLinksDead += $links.length;
                                    if (Display_tooltip_info) $links.mouseover(displayTooltipError);
                                    updateHosts('dead', hostname);
                                    break;
            case "unava_link":         cLinksUnava += $links.length;
                                    updateHosts('unava', hostname);
                                    break;
            case "unknown_link":    cLinksUnknown += $links.length;
                                    updateHosts('unknown', hostname);
                                    break;
            default:
        }

        cLinksProcessed += $links.length;
    }

    function initRedirectors()
    {
        var aRCount = 1;
        function addRedirector(hostName, linkRegex, redirType, innerLinkRegex)
        {
            hostName = hostName.split("|");
            var i = hostName.length;

            var hostID = "RH" + aRCount;

            while(i--) {
                var filehost = hostName[i].replace(/\./g, "_dot_").replace(/\-/g, "_dash_");
                if (!hostsIDs[filehost]) {
                    hostsIDs[filehost] = [];
                }
                hostsIDs[filehost].push({
                    hostID: hostID,
                    linkRegex: linkRegex,
                });
            }
            var RHObj = {
                cProcessed: 0,
                cTotal: 0,
                type: redirType,
                innerLinkRegex: innerLinkRegex,
                links: []
            }

            hostsCheck[hostID] = RHObj;
            aRCount++;
        }

        if (hostSet("Check_safelinking_dot_net_links", false))
        {
            addRedirector(
            'safelinking.net',
            'safelinking\\.net\/d\/[a-zA-Z0-9-_]+',
            redirectorTypes.HTTP_302,
            null);
        }
		
		if (hostSet("Check_kprotector_dot_com_links", false))
        {
            addRedirector(
            'kprotector.com',
            'kprotector\\.com\/p4\/\\w{10}',
            redirectorTypes.HTTP_302,
            null);
        }

    }

    function initBulkHosts()
    {
        var aHCount = 1;
        function addHost(hostName, linkRegex, blockSize, corrMatch, corrReplWhat, corrReplWith, splitSeparator,
                            apiUrl, postData, resLinkRegex, resLiveRegex, resDeadRegex, resUnavaRegex, func)
        {
            hostName = hostName.split("|");
            var i = hostName.length;

            var hostID = "BC" + aHCount;

            while(i--) {
                var filehost = hostName[i].replace(/\./g, "_dot_").replace(/\-/g, "_dash_");
                if (!hostsIDs[filehost]) {
                    hostsIDs[filehost] = [];
                }
                hostsIDs[filehost].push({
                    hostID: hostID,
                    linkRegex: linkRegex,
                });
            }

            var BCObj = {
                blockSize: 50,
                corrMatch: corrMatch,
                corrReplWhat: corrReplWhat,
                corrReplWith: corrReplWith,
                splitSeparator: '\r\n',
                apiUrl: apiUrl,
                postData: postData,
                resLinkRegex: resLinkRegex,
                resLiveRegex: resLiveRegex,
                resDeadRegex: resDeadRegex,
                resUnavaRegex: resUnavaRegex,
                func: genBulkCheck,
                links: []
            }

            if (blockSize != null) {
                BCObj.blockSize = blockSize;
            }
            if (splitSeparator != null) {
                BCObj.splitSeparator = splitSeparator;
            }
            if (func != null) {
                BCObj.func = func;
            }

            hostsCheck[hostID] = BCObj;
            aHCount++;

        }

        var genType1 = [    {    host: "rarefile.net",            apiurl: "default"                                       },
                            {    host: "filesabc.com",            apiurl: "http://filesabc.com/checkfiles.html"           },
                            {    host: "uploadbaz.com",           apiurl: "default"                                       },
                            {    host: "filemaze.ws",             apiurl: "default"                                       },
                            {    host: "novafile.com",            apiurl: "http://novafile.com/checkfiles.html"           },
                            {    host: "longfiles.com",           apiurl: "http://longfiles.com/checkfiles.html"          },
                            {    host: "youwatch.org",            apiurl: "http://youwatch.org/checkfiles.html"           },
                            {    host: "allmyvideos.net",         apiurl: "http://allmyvideos.net/checkfiles.html"        },
                            {    host: "filesline.com",           apiurl: "default"                                       },
                            {    host: "file4safe.com",           apiurl: "http://www.file4safe.com/?op=checkfiles"       },
                            {    host: "loadpot.net",             apiurl: "http://www.loadpot.net/checkfiles.html"        },
                            {    host: "uploadzeal.com",          apiurl: "http://www.uploadzeal.com/checkfiles.html"     },
                            {    host: "vidspot.net",             apiurl: "http://vidspot.net/?op=checkfiles"             },
                            {    host: "filejoker.net",           apiurl: "https://filejoker.net/checkfiles.html"         },
                        ];


        var genType2 = [    {    host: "dailyuploads.net",        apiurl: "https://dailyuploads.net/?op=checkfiles"       },
                            {    host: "sanshare.com",            apiurl: "http://sanshare.com/?op=checkfiles"            },
                            {    host: "mightyupload.com",        apiurl: "http://mightyupload.com/?op=checkfiles"        },
                            {    host: "megafiles.se",            apiurl: "http://megafiles.se/?op=checkfiles"            },
                            {    host: "daj.to",                  apiurl: "http://daj.to/?op=checkfiles"                  },
                            {    host: "upfile.biz",              apiurl: "http://upfile.biz/?op=checkfiles"              },
                            {    host: "cepzo.com",               apiurl: "http://cepzo.com/?op=checkfiles"               },
                            {    host: "vidup.me",                apiurl: "http://vidup.me/?op=checkfiles"                },
                            {    host: "amonshare.com",           apiurl: "http://amonshare.com/?op=checkfiles"           },
                            {    host: "medoupload.com",          apiurl: "http://medoupload.com/?op=checkfiles"          },
                            {    host: "file-speed.com",          apiurl: "http://file-speed.com/?op=checkfiles"          },
                            {    host: "secureupload.eu",         apiurl: "http://www.secureupload.eu/checklinks.html"    },
                            {    host: "rockdizfile.com",         apiurl: "http://rockdizfile.com/?op=checkfiles"         },
                            {    host: "ortofiles.com",           apiurl: "http://www.ortofiles.com/?op=checkfiles"       },
                            {    host: "expressleech.com",        apiurl: "http://expressleech.com/?op=checkfiles"        },
                            {    host: "upshared.com",            apiurl: "http://upshared.com/?op=checkfiles"            },
                            {    host: "exclusivefaile.com",      apiurl: "http://exclusiveloader.com/?op=checkfiles"     },
                            {    host: "exclusiveloader.com",     apiurl: "http://exclusiveloader.com/?op=checkfiles"     }, //same host as exclusivefaile.com
                            {    host: "rapidfileshare.net",      apiurl: "http://www.rapidfileshare.net/?op=checkfiles"  },
                            {    host: "sendmyway.com",           apiurl: "http://www.sendmyway.com/?op=checkfiles"       },
                            {    host: "unlimitshare.com",        apiurl: "http://www.unlimitshare.com/?op=checkfiles"    },
                            {    host: "speedshare.eu",           apiurl: "http://speedshare.eu/?op=checkfiles"           },
                            {    host: "uploadboy.com",           apiurl: "http://uploadboy.com/?op=checkfiles"           },
                            {    host: "spicyfile.com",           apiurl: "http://spicyfile.com/checkfiles.html"          },
                            {    host: "hugefiles.cc",           apiurl: "http://www.hugefiles.cc/?op=checkfiles"       },
                            {    host: "megacache.net",           apiurl: "http://megacache.net/?op=checkfiles"           },
                            {    host: "potload.com",             apiurl: "http://potload.com/?op=checkfiles"             },
                            {    host: "akafile.com",             apiurl: "http://akafile.com/?op=checkfiles"             },
                            {    host: "backin.net",              apiurl: "http://backin.net/?op=checkfiles"              },
                            {    host: "todayfile.com",           apiurl: "http://todayfile.com/?op=checkfiles"           },
                            {    host: "koofile.com",             apiurl: "http://koofile.com/op/checkfiles"              },
                            {    host: "limevideo.net",           apiurl: "http://limevideo.net/?op=checkfiles"           },
                            {    host: "lunaticfiles.com",        apiurl: "http://lunaticfiles.com/?op=checkfiles"        },
                            {    host: "vozupload.com",           apiurl: "http://vozupload.com/?op=checkfiles"           },
                            {    host: "wupfile.com",           apiurl: "http://wupfile.com/?op=checkfiles"           },
                            {    host: "anafile.com",             apiurl: "http://www.anafile.com/?op=checkfiles"         },
                            {    host: "rosharing.com",           apiurl: "http://rosharing.com/?op=checkfiles"           },
                            {    host: "storagely.com",           apiurl: "http://storagely.com/?op=checkfiles"           },
                            {    host: "wipfiles.net",            apiurl: "http://wipfiles.net/?op=checkfiles"            },
                            {    host: "filedais.com",            apiurl: "http://www.filedais.com/?op=checkfiles"        },
                            {    host: "vshare.eu",               apiurl: "http://vshare.eu/?op=checkfiles"               },
                            {    host: "spaceforfiles.com",       apiurl: "http://www.filespace.com/?op=checkfiles"       },
                            {    host: "filespace.com",           apiurl: "http://www.filespace.com/?op=checkfiles"       }, //same host as spaceforfiles
                            {    host: "up09.com",                apiurl: "http://file.up09.com/?op=checkfiles"           },
                            {    host: "lomafile.com",            apiurl: "http://lomafile.com/?op=checkfiles"            },
                            {    host: "sharemods.com",           apiurl: "http://sharemods.com/?op=checkfiles"           },
                            {    host: "worldbytez.com",          apiurl: "http://worldbytez.com/?op=checkfiles"          },
                            {    host: "vipshare.me",             apiurl: "http://vipshare.me/?op=checkfiles"             },
                            {    host: "loudupload.com",          apiurl: "http://loudupload.net/?op=checkfiles"          },
                            {    host: "loudupload.net",          apiurl: "http://loudupload.net/?op=checkfiles"          },
                            {    host: "uploadkadeh.ir",          apiurl: "http://uploadkadeh.ir/?op=checkfiles"          },
                            {    host: "gboxes.com",              apiurl: "http://www.gboxes.com/?op=checkfiles"          },
                            {    host: "chayfile.com",            apiurl: "http://www.chayfile.com/checkfiles"            },
                            {    host: "filetut.com",             apiurl: "http://filetut.com/?op=checkfiles"             },
                            {    host: "iranupload.com",          apiurl: "http://iranupload.com/?op=checkfiles"          },
                            {    host: "tikfile.com",             apiurl: "http://tikfile.com/?op=checkfiles"             },
                            {    host: "uplod.ir",                apiurl: "http://uplod.ir/?op=checkfiles"                },
                            {    host: "upload.ac",                apiurl: "https://upload.ac/?op=checkfiles"              },
                            {    host: "uplod.io",               apiurl: "https://upload.ac/?op=checkfiles"              }, //same host as uplodac
                            {	 host: "userscloud.com",          apiurl: "https://userscloud.com/?op=checkfiles"         },
                            {    host: "ozofiles.com",            apiurl: "http://ozofiles.com/?op=checkfiles"			  },
                            {    host: "indishare.org",           apiurl: "https://www.indishare.org/?op=check_files"     },
                            {    host: 'bdupload.net',            apiurl: 'http://bdupload.net/?op=checkfiles'            },
                            {    host: 'faststore.org',           apiurl: 'http://faststore.org/?op=checkfiles'           },
                            {    host: 'rockfile.eu',             apiurl: 'http://rockfile.eu/checklinks'                 },
                            {    host: 'bankupload.com',          apiurl: 'http://bankupload.com/?op=checkfiles'          },
                        ];

        //xfilesharing 1.0
        function addGenericType1()
        {
            var i = genType1.length;

            while(i--)
            {
                var host = genType1[i].host;
                var apiUrl = genType1[i].apiurl;

                if (apiUrl == "default") apiUrl = "http://www." + host + "/?op=check_files";

                if (hostSet("Check_" + host.replace(/\./g, "_dot_").replace(/-/g, "_dash_") + "_links", false))
                {
                    var regexSafe = host.replace(/\./g, "\\.").replace(/-/g, "\\-");

                    addHost(
                        host, //hostname
                        regexSafe + "\/\\w+", //linkregex
                        null, //blocksize
                        new RegExp("(https?:\/\/(?:|www\\.)" + regexSafe + "\/\\w+)",""), //corrmatch
                        null, //corrreplwhat
                        null, //corrreplwith
                        null, //separator
                        apiUrl, //api url
                        "op=check_files&process=Check+URLs&list=", //postdata
                        new RegExp("(" + regexSafe + "\/\\w+)",""), //linkregex
                        new RegExp("<font color='green'>https?:\/\/(?:|www\.)" + regexSafe + "\/\\w+","g"), //liveregex
                        new RegExp("<font color='red'>https?:\/\/(?:|www\.)" + regexSafe + "\/\\w+","g"), //deadregex
                        new RegExp("<font color='orange'>https?:\/\/(?:|www\.)" + regexSafe + "\/\\w+","g"), //unavaregex
                        null //function delegate
                    )
                }
            }
        }

        //xfilesharing 2.0
        function addGenericType2()
        {
            var i = genType2.length;

            while(i--)
            {
                var host = genType2[i].host;
                var apiUrl = genType2[i].apiurl;

                if (hostSet("Check_" + host.replace(/\./g, "_dot_").replace(/-/g, "_dash_") + "_links", false))
                {
                    var regexSafe = host.replace(/\./g, "\\.").replace(/-/g, "\\-");

                    addHost(
                        host, //hostname
                        "https?:\/\/(?:www\\.|file\\.)?" + regexSafe + "\/\\w+", //linkregex
                        null, //blocksize
                        new RegExp("(https?:\/\/(?:|www\\.)" + regexSafe + "\/\\w+)",""), //corrmatch
                        null, //corrreplwhat
                        null, //corrreplwith
                        null, //separator
                        apiUrl, //api url
                        "op=checkfiles&process=Check+URLs&list=", //postdata
                        new RegExp("(" + regexSafe + "\/\\w+)",""), //linkregex
                        new RegExp(regexSafe + "\/\\w+.*?\\s*<\/td>\\s*<td style=\\s*\"color:(?:green|#00f100);","g"), //liveregex
                        new RegExp(regexSafe + "\/\\w+.*?\\s*<\/td>\\s*<td style=\\s*\"color:(?:red|#f10000);","g"), //deadregex
                        new RegExp(regexSafe + "\/\\w+.*?\\s*<\/td>\\s*<td style=\\s*\"color:orange;","g"), //unavaregex
                        null //function delegate
                    )
                }
            }
        }

        // TEMPLATE
        // if (hostSet("Check__dot_com_links", false))
        // {
            // addHost(
                // "", //hostname
                // "", //linkregex
                // null, //blocksize
                // null, //corrmatch
                // null, //corrreplwhat
                // null, //corrreplwith
                // null, //separator
                // "", //api url
                // "", //postdata
                // /()/, //linkregex
                // //liveregex
                // //deadregex
                // //unavaregex
                // null //function delegate
            // )
        // }


        addGenericType1();
        addGenericType2();

        if (hostSet("Check_myvdrive_dot_com_links", false))
        {
            addHost(
                "myvdrive.com|fileserving.com", //hostname
                "(?:fileserving|myvdrive)\\.com\/files\/[\\w-]+", //linkregex
                null, //blocksize
                null, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                "http://www.myvdrive.com/Public/linkchecker", //api url
                "links=", //postdata
                /(?:fileserving|myvdrive)\.com\/(files\/[\w-]+)/, //linkregex
                /icon_file_check_valid"><\/span>\s*http:\/\/(?:www\.)?(?:fileserving|myvdrive)\.com\/files\/[\w-]+/g, //liveregex
                /icon_file_check_(?:removed|notvalid)"><\/span>\s*http:\/\/(?:www\.)?(?:fileserving|myvdrive)\.com\/files\/[\w-]+/g, //deadregex
                null, //unavaregex
                null //function delegate
            )
        }

        /*if (hostSet("Check_edisk_dot_cz_links", false))
        {
            addHost(
                "edisk.cz|edisk.sk|edisk.eu", //hostname
                "(?:(?:muj|data)\\d*\\.|)edisk\\.(?:cz|sk|eu)\/(?:|(?:cz|sk|en|pl)\/)", //linkregex
                null, //blocksize
                null, //corrmatch
                /edisk\.\w{2}\/(?:|\w{2}\/)stahni/, //corrreplwhat
                'edisk.cz/stahni', //corrreplwith
                null, //separator
                'http://www.edisk.cz/zkontrolovat-odkazy',
                'submitBtn=Zkontrolovat&checkFiles=',
                /((?:download|stahn(?:i|out-soubor))\/\d+)/,
                /"ano"\/>\s*<\/td>\s*<td>\s*http:\/\/.+/g,
                /"ne"\/>\s*<\/td>\s*<td>\s*http:\/\/.+/g,
                null,
                null //function delegate
            )
        }*/

        if (hostSet("Check_bezvadata_dot_cz_links", false))
        {
            addHost(
                "bezvadata.cz", //hostname
                "(?:beta\\.|)bezvadata\.cz\/stahnout\/\\d+\\w+", //linkregex
                null, //blocksize
                null, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                'http://bezvadata.cz/nastroje/kontrola-odkazu?do=kontrolaOdkazuForm-submit',
                'zkontrolovat=Zkontrolovat&odkazy=',
                /(bezvadata\.cz\/stahnout\/\d+)/,
                /bezvadata\.cz\/stahnout\/.+?<\/td>\s*<td style="background-color: #d9ffb2/g,
                /bezvadata\.cz\/stahnout\/.+?<\/td>\s*<td style="background-color: #ffb2b2/g,
                null,
                null //function delegate
            )
        }

        if (hostSet("Check_depositfiles_dot_com_links", false))
        {
            addHost(
                "depositfiles.com|dfiles.eu|dfiles.ru|depositfiles.org|depositfiles.lt", //hostname
                "(?:depositfiles\\.(?:com|lt|org)|dfiles\\.(?:eu|ru))\/(?:en\/|ru\/|de\/|es\/|pt\/|)files\/\\w+", //linkregex
                100000, //blocksize
                null, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                null,
                null,
                null,
                null,
                null,
                null,
                depositfilesBulkCheck //function delegate
            )
        }

        if (hostSet("Check_videobb_dot_com_links", false))
        {
            addHost(
                "videobb.com", //hostname
                "videobb\\.com\/(?:video\/|watch_video\\.php\\?v=)\\w+", //linkregex
                null, //blocksize
                null, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                'http://www.videobb.com/link_checker.php',
                'links=',
                /(videobb\.com\/(?:watch_video\.php\?v?=|video\/)\w+)/,
                /<td>http:\/\/(?:www\.|)videobb.com\/(?:watch_video\.php\?v?=|video\/)\w+<\/td>\s+<td>.+?<\/td>\s+<td>\d+:\d+<\/td>\s+<td>Available/g,
                /<td>http:\/\/(?:www\.|)videobb.com\/(?:watch_video\.php\?v?=|video\/)\w+<\/td>\s+<td>(?:|.+?)<\/td>\s+<td>N\/A<\/td>\s+<td>Not Available/g,
                null,
                null //function delegate
            )
        }

        if (hostSet("Check_filefactory_dot_com_links", false) && genset("Filefactory_API_Check", false))
        {
            addHost(
                "filefactory.com", //hostname
                "filefactory\\.com\/+file\/[a-z0-9]", //linkregex
                100, //blocksize
                null, //corrmatch
                /(?:www\.|)filefactory\.com\/+file/, //corrreplwhat
                'www.filefactory.com/file', //corrreplwith
                "\n", //separator
                "http://www.filefactory.com/account/tools/link-checker.php", //api url
                "Submit=Check+Links&links=", //postdata
                /filefactory\.com\/(file\/\w+)/, //linkregex
                /<i class="icon-ok.+\n.+\n.+http:\/\/(?:www\.)?filefactory\.com\/file\/\w+/g, //liveregex
                /<i class="icon-remove.+\n.+\n.+http:\/\/(?:www\.)?filefactory\.com\/file\/\w+/g, //deadregex
                /<i class="icon-wrench.+\n.+\n.+http:\/\/(?:www\.)?filefactory\.com\/file\/\w+/g, //unavaregex
                null //function delegate
            );
        }

        if (hostSet("Check_megashares_dot_com_links", false))
        {
            addHost(
                "megashares.com",
                "(?:d01\.)?megashares\.com\/(?:dl\/|(?:index\\.php)?\\?d01=)\\w+",
                null, //blocksize
                null, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                "http://d01.megashares.com/checkit.php",
                "submit_links=Check+Links&check_links=",
                /megashares\.com\/(?:dl\/|(?:index\.php)?\?d01=)(\w+)/,
                /megashares\.com\/(?:dl\/|(?:index\.php)?\?d01=)\w+.*?\s*-\s*ok/g,
                /megashares\.com\/(?:dl\/|(?:index\.php)?\?d01=)\w+.*?\s*-\s*invalid/g,
                null,
                null
            )
        }

        if (hostSet("Check_mega_dot_co_dot_nz_links", false))
        {
            addHost(
                "mega.co.nz|mega.nz",
                "mega(?:\\.co)?\\.nz\/#!?\\w+",
                100000, //blocksize
                null, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                null,
                null,
                null,
                null,
                null,
                null,
                megaBulkCheck //function delegate
            )
        }

        if (hostSet("Check_4upfiles_dot_com_links", false))
        {
            addHost(
                "4up.me|4up.im|4upfiles.com",
                "(?:4upfiles\\.com|4up\\.(?:me|im))\/\\w+",
                null, //blocksize
                null, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                "http://4upfiles.com/?op=checkfiles", //api url
                "op=checkfiles&process=Check+URLs&list=", //postdata
                /(4up(?:files)?\.(?:com|me|im)\/\w+)/, //linkregex
                /4up(?:files)?\.(?:com|me|im)\/\w+.*?<\/td>\s*<td style=\"color:green;\">/g, //liveregex
                /4up(?:files)?\.(?:com|me|im)\/\w+.*?<\/td>\s*<td style=\"color:red;\">/g, //deadregex
                /4up(?:files)?\.(?:com|me|im)\/\w+.*?<\/td>\s*<td style=\"color:orange;\">/g, //unavaregex
                null //function delegate
            )
        }

        if (hostSet("Check_uploaded_dot_to_links", false))
        {
            addHost(
                "uploaded.to|uploaded.net|ul.to",
                '(?:uploaded\\.(?:to|net)|ul\\.to)\/(?:files?\/|\\?(?:lang=\\w{2}&)?id=|folder\/)?(?!img\/|coupon\/)\\w{8}',
                1000,
                /(?:uploaded|ul)\.(?:to|net)\/(?:files?|\?(?:lang=\w{2}&)?id=|f\/|folder)?\/*(?!img\/|coupon\/)(\w{8})/,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                uploadedBulkCheck
            )
        }

        if (hostSet("Check_junocloud_dot_me_links", false))
        {
            addHost(
                "junocloud.me",
                "junocloud\\.me\/\\w+",
                null,
                null,
                null,
                null,
                null,
                "http://junocloud.me/checkfiles.html",
                "op=checkfiles&process=Check+URLs&list=",
                /(junocloud\.me\/\w+)/,
                /junocloud\.me\/\w+.*?<span style="color: green;/g,
                /junocloud\.me\/\w+.*?<span style="color: red;/g,
                /junocloud\.me\/\w+.*?<span style="color: orange;/g,
                null //function delegate
            )
        }

        if (hostSet("Check_terafile_dot_co_links", false))
        {
            addHost(
                "terafile.co|lumfile.com|lumfile.eu|lumfile.se", //hostname
                "(?:terafile\\.co|lumfile\\.(?:com|eu|se))\/\\w+", //linkregex
                null, //blocksize
                /(http:\/\/(?:www\.|)(?:lumfile\.(?:com|eu|se)|terafile\.co)\/\w+)/, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                'http://www.terafile.co/?op=checkfiles',
                'op=checkfiles&process=Check+URLs&list=',
                /((?:terafile\.co|lumfile\.(?:se|eu|com))\/\w+)/,
                /(?:terafile\.co|lumfile\.(?:se|eu|com))\/\w+.*?<\/td>\s*<td style="color:green;">/g, //liveregex
                /(?:terafile\.co|lumfile\.(?:se|eu|com))\/\w+.*?<\/td>\s*<td style="color:red;">/g, //deadregex
                /(?:terafile\.co|lumfile\.(?:se|eu|com))\/\w+.*?<\/td>\s*<td style="color:orange;">/g, //unavaregex
                null //function delegate
            )
        }

        if (hostSet("Check_ge_dot_tt_links", false))
        {
            addHost(
                "ge.tt", //hostname
                "ge\\.tt\/(?:api\/1\/files\/)?\\w+", //linkregex
                1000000, //blocksize
                /ge\.tt\/(?:api\/1\/files\/)?(\w+.*)/, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                'https://open.ge.tt/1/files/', //api url
                null, //postdata
                null, //linkregex
                null, //liveregex
                null, //deadregex
                null, //unavaregex
                gettBulkCheck //function delegate
            )
        }

        if (hostSet("Check_filepup_dot_net_links", false))
        {
            addHost(
                "filepup.net", //hostname
                "filepup\\.net\/(?:files|get)\/\\w+", //linkregex
                null, //blocksize
                null, //corrmatch
                /\/get\/(\w+)\/.+/, //corrreplwhat
                "/files/$1.html", //corrreplwith
                null, //separator
                'http://www.filepup.net/link_checker.php', //api url
                'task=doCheck&submit=Check+Links&urls=', //postdata
                /filepup\.net\/files(\/\w+)/, //linkregex
                /green">http:\/\/(?:www\.)?filepup\.net\/files\/\w+/g, //liveregex
                /red">http:\/\/(?:www\.)?filepup\.net\/files\/\w+/g, //deadregex
                /orange">http:\/\/(?:www\.)?filepup\.net\/files\/\w+/g, //unavaregex
                null //function delegate
            )
        }

        if (hostSet("Check_anysend_dot_com_links", false))
        {
            addHost(
                "anysend.com", //hostname
                "anysend\\.com\/\\w{32}", //linkregex
                100000, //blocksize
                /anysend\.com\/(\w{32})/, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                null, //api url
                null, //postdata
                null, //linkregex
                null, //liveregex
                null, //deadregex
                null, //unavaregex
                anysendBulkCheck //function delegate
            )
        }

        if (hostSet("Check_webshare_dot_cz_links", false))
        {
            addHost(
                "webshare.cz", //hostname
                "webshare\\.cz\/(?:(?:#/)?file/\\w+|\\w+-.*)", //linkregex
                100000, //blocksize
                null, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                null, //api url
                null, //postdata
                null, //linkregex
                null, //liveregex
                null, //deadregex
                null, //unavaregex
                webshareBulkCheck //function delegate
            )
        }

        if (hostSet("Check_uploadable_dot_ch_links", false))
        {
            addHost(
                "uploadable.ch", //hostname
                "uploadable\\.ch\/file\/\\w+", //linkregex
                null, //blocksize
                null, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                'http://www.uploadable.ch/check.php', //api url
                'urls=', //postdata
                /(uploadable\.ch\/file\/\w+)/, //linkregex
                /<div class="col1"><a href="">http:\/\/(?:www\.)?uploadable\.ch\/file\/\w+.*<\/a><\/div>\s+<div class="col2">.+<\/div>\s+<div class="col3">.+<\/div>\s+<div class="col4"><span class="[\w\s]+">&nbsp;<\/span>\s+<span class="left">Available<\/span>/g, //liveregex
                /<div class="col1"><a href="">http:\/\/(?:www\.)?uploadable\.ch\/file\/\w+.*<\/a><\/div>\s+<div class="col2">.+<\/div>\s+<div class="col3">.+<\/div>\s+<div class="col4"><span class="[\w\s]+">&nbsp;<\/span>\s+<span class="left">Not Available<\/span>/g, //deadregex
                null, //unavaregex
                null //function delegate
            )
        }

        if (hostSet("Check_prefiles_dot_com_links", false))
        {
            addHost(
                "prefiles.com", //hostname
                "prefiles\\.com\/\\w+", //linkregex
                null, //blocksize
                /(https?:\/\/(?:www\.)?prefiles\.com\/\w+)/, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                "http://prefiles.com/checker", //api url
                "op=checkfiles&list=", //postdata
                /(prefiles\.com\/\w+)/, //linkregex
                /prefiles\.com\/\w+.*<\/div>\s*<div class="copy" style="color:#6ab621;">/g, //liveregex
                /prefiles\.com\/\w+.*<\/div>\s*<div class="copy" style="color:#f10000;">/g, //deadregex
                null, //unavaregex
                null //function delegate
            )
        }

        /*if (hostSet("Check_rapidu_dot_net_links", false))
        {
            addHost(
                "rapidu.net", //hostname
                "rapidu\\.net\/\\d+", //linkregex
                1000000, //blocksize
                /rapidu\.net\/(\d+)/, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                "http://rapidu.net/api/getFileDetails/", //api url
                "id=", //postdata
                null, //linkregex
                null, //liveregex
                null, //deadregex
                null, //unavaregex
                rapiduBulkCheck //function delegate
            )
        }*/

        if (hostSet("Check_uplea_dot_com_links", false))
        {
            addHost(
                "uplea.com", //hostname
                "uplea\\.com\/dl\/\\w+", //linkregex
                1000000, //blocksize
                /(https?:\/\/(?:www\.)?uplea\.com\/dl\/\w+)/, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                "http://api.uplea.com/api/check-my-links", //api url
                null, //postdata
                null, //linkregex
                null, //liveregex
                null, //deadregex
                null, //unavaregex
                upleaBC //function delegate
            )
        }

        if (hostSet("Check_oboom_dot_com_links", false))
        {
            addHost(
                "oboom.com", //hostname
                "oboom\\.com\/#?\\w{8}", //linkregex
                null, //blocksize
                /oboom\.com\/#?(\w{8})/, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                null, //api url
                null, //postdata
                null, //linkregex
                null, //liveregex
                null, //deadregex
                null, //unavaregex
                oboomBulk //function delegate
            )
        }

        if (hostSet("Check_inclouddrive_dot_com_links", false))
        {    
            addHost(
                "inclouddrive.com", //hostname
                "inclouddrive\\.com\/(?:file|#\/file_download)\/[a-zA-Z0-9_-]+", //linkregex
                100000000, //blocksize
                null, //corrmatch
                null, //corrreplwhat
                null, //corrreplwith
                null, //separator
                null, //api url
                null, //postdata
                null, //linkregex
                null, //liveregex
                null, //deadregex
                null, //unavaregex
                inclouddriveCheck //function delegate
            );
        }

        function genBulkCheck()
        {
            var blockIdx = this.links.length;

            while (blockIdx--)
            {
                postRequest(this.apiUrl, this.postData, this.links[blockIdx],
                    this.resLinkRegex, this.resLiveRegex, this.resDeadRegex, this.resUnavaRegex, this.separator);

            }

            function postRequest(api, postData, links, linkRegex, liveRegex, deadRegex, unavaRegex, sep)
            {
                GM_xmlhttpRequest(
                {
                    method: 'POST',
                    url: api,
                    headers: {
                        'User-agent': rUA(),
                        'Content-type': 'application/x-www-form-urlencoded',
                        'Referer': api,
                        'X-Requested-With': 'XMLHttpRequest'
                    },
                    data: postData + encodeURIComponent(links),
                    onload: function (result)
                    {
                        var res = result.responseText;
                        
                        //console.log(res);

                        if ((res.contains(">DDoS protection by CloudFlare") && res.contains(">Checking your browser before accessing<")) || res.contains('<iframe src="/_Incapsula_Resource?') || res.contains('>Please complete the security check')) {
                            DisplayTheCheckedLinks(links.split(sep), 'unknown_link', 'Captcha required to check links');
                            sendMessage('Some links require you to fill out a captcha! Please open them manually.')
                        }

                        var i;

                        var livelinks = res.match(liveRegex);
                        var deadlinks = res.match(deadRegex);

                        //console.log(livelinks);
                        //console.log(deadlinks);

                        if (livelinks != null)
                        {
                            i = livelinks.length - 1;
                            do
                            {
                                livelinks[i] = livelinks[i].match(linkRegex)[1];
                            }
                            while (i--);
                            DisplayTheCheckedLinks(livelinks, 'alive_link');
                        }

                        if (deadlinks != null)
                        {
                            i = deadlinks.length - 1;
                            do
                            {
                                deadlinks[i] = deadlinks[i].match(linkRegex)[1];
                            }
                            while (i--);
                            DisplayTheCheckedLinks(deadlinks, 'adead_link');
                        }

                        if (unavaRegex != null)
                        {
                            var unavalinks = res.match(unavaRegex)
                            if (unavalinks)
                            {
                                i = unavalinks.length - 1;
                                do
                                {
                                    unavalinks[i] = unavalinks[i].match(linkRegex)[1];
                                }
                                while (i--);
                                DisplayTheCheckedLinks(unavalinks, 'unava_link');
                            }
                        }
                    },
                    onerror: function (e) {
                        var linkArr = links.split(sep);
                        DisplayTheCheckedLinks(linkArr, "unknown_link");
                    }
                });

            }
        }

        //specialized bulkchecking handlers follow
        function OnefichierCheck() {
            var blockIdx = this.links.length;

            while (blockIdx--)
            {
                postRequest(this.apiUrl, this.postData, this.links[blockIdx].split(this.separator).join('&links[]='),
                    this.resLinkRegex, this.resLiveRegex, this.resDeadRegex, this.resUnavaRegex, '&links[]=');

            }

            function postRequest(api, postData, links, linkRegex, liveRegex, deadRegex, unavaRegex, sep)
            {
                GM_xmlhttpRequest(
                {
                    method: 'POST',
                    url: api,
                    headers: {
                        'User-agent': rUA(),
                        'Content-type': 'application/x-www-form-urlencoded',
                        'Referer': api,
                        'X-Requested-With': 'XMLHttpRequest'
                    },
                    data: postData + encodeURIComponent(links).replace(/%26links%5B%5D%3D/g, '&links[]='), //replace for 1Fichier (Doesn't recognize different request parameters)
                    onload: function (result)
                    {
                        var res = result.responseText;

                        //console.log(res);

                        var i;

                        var livelinks = res.match(liveRegex);
                        var deadlinks = res.match(deadRegex);

                        //console.log(livelinks);
                        //console.log(deadlinks);

                        if (livelinks != null)
                        {
                            i = livelinks.length - 1;
                            do
                            {
                                livelinks[i] = livelinks[i].match(linkRegex)[1];
                            }
                            while (i--);
                            DisplayTheCheckedLinks(livelinks, 'alive_link');
                        }

                        if (deadlinks != null)
                        {
                            i = deadlinks.length - 1;
                            do
                            {
                                deadlinks[i] = deadlinks[i].match(linkRegex)[1];
                            }
                            while (i--);
                            DisplayTheCheckedLinks(deadlinks, 'adead_link');
                        }

                        if (unavaRegex != null)
                        {
                            var unavalinks = res.match(unavaRegex)
                            if (unavalinks)
                            {
                                i = unavalinks.length - 1;
                                do
                                {
                                    unavalinks[i] = unavalinks[i].match(linkRegex)[1];
                                }
                                while (i--);
                                DisplayTheCheckedLinks(unavalinks, 'unava_link');
                            }
                        }

                        var unknownlinks = res.match(/https?:\/\/\w+\.1fichier.com.*;;;BAD LINK/g);
                        if (unknownlinks) {
                            i = unknownlinks.length - 1;
                                do
                                {
                                    unknownlinks[i] = unknownlinks[i].match(linkRegex)[1];
                                }
                                while (i--);
                                DisplayTheCheckedLinks(unknownlinks, 'unknown_link');
                        }
                    },
                    onerror: function (e) {
                        var linkArr = links.split(sep);
                        DisplayTheCheckedLinks(linkArr, "unknown_link");
                    }
                });

            }
        }

        function inclouddriveCheck() {
            var links = this.links[0].split('\r\n');
            var x = links.length;
            var link;
            while (x--) {
                checkLink(links[x]);
            }

            function checkLink(link) {
                GM_xmlhttpRequest({
                    method: 'GET',
                    url: link.replace('/file/', '/index.php/file_download/').replace('/#/', '/index.php/'),
                    headers: {
                        'X-Requested-With': 'XMLHttpRequest'
                    },
                    onload: function (result) {
                        var res = result.responseText;
                        if (res.contains('<p style="font-size:17px;">The requested file isn\'t anymore!</p>')) {
                            DisplayTheCheckedLinks([link], 'adead_link');
                        } else if (res.contains('<button style="border:none;" id="download_from_link"')) {
                            DisplayTheCheckedLinks([link], 'alive_link');
                        } else {
                            DisplayTheCheckedLinks([link], 'unknown_link');
                        }
                    }
                });
            }
        }

        function oboomBulk() {
            var a = [], b = [], c = [];
            var array = this.links;

            GM_xmlhttpRequest({
                method: 'GET',
                url: 'https://www.oboom.com/1/guestsession',
                headers: {
                    'User-agent': rUA(),
                    'Content-type': 'application/x-www-form-urlencoded',
                    'Referer': 'https://www.oboom.com'
                },
                onload: function(result) {
                    //console.log(result);
                    var blockIdx = array.length;
                    var token = JSON.parse(result.responseText)[1];
                    while (blockIdx--) {
                        startCheck(array[blockIdx].split('\r\n'), token);
                    }
                }
            });

            function startCheck(links, token) {
                GM_xmlhttpRequest({
                        method: 'POST',
                        url: "https://api.oboom.com/1/info",
                        headers: {
                            'User-agent': rUA(),
                            'Content-type': 'application/x-www-form-urlencoded',
                            'Referer': 'https://www.oboom.com/',
                            'X-Requested-With': 'XMLHttpRequest'
                        },
                        data: "token=" + token + "&items=" + links.join(","),
                        onload: function(result) {
                            var res = JSON.parse(result.responseText)[1];
                            var i = res.length, s;

                            while (i--) {
                                s = res[i].state;
                                if (s == 'online') a.push(res[i].id);
                                else if (s == 'blocked' || s == 'abused' || s == 'lost' || s == 'not_found' || s =='expired') b.push(res[i].id);
                                else c.push(res[i].id);
                            }

                            if (a.length > 0) DisplayTheCheckedLinks(a, 'alive_link');
                            if (b.length > 0) DisplayTheCheckedLinks(b, 'adead_link');
                            if (c.length > 0) DisplayTheCheckedLinks(c, 'unknown_link');
                        }
                    });
            }
        }

        function upleaBC() {
            var json = {
                links: this.links[0].split('\r\n')
            };

            GM_xmlhttpRequest({
                method: 'POST',
                url: this.apiUrl,
                data: 'json=' + JSON.stringify(json),
                headers: {
                    'User-agent': rUA(),
                    'Content-type': 'application/x-www-form-urlencoded',
                    'Referer': 'http://uplea.com/checker',
                    'X-Requested-With': 'XMLHttpRequest'
                },
                onload: function(result) {
                    var res = JSON.parse(result.responseText);

                    if (res.error.length > 0) {
                        var mes = 'Error in checking Uplea.com! Error message(s):';
                        $.each(res.error, function(key, val) { mes += '\r\n' + val; });
                        console.warn(mes); return;
                    }

                    var deadlinks = [], alivelinks = [], unavalinks = [];
                    $.each(res.result, function(key, val) {
                        if (val.status == 'OK') alivelinks.push(val.link);
                        else if (val.status == 'DELETE') deadlinks.push(val.link);
                        else unknownlinks.push(val.link);
                    });

                    if (deadlinks.length > 0) DisplayTheCheckedLinks(deadlinks, 'adead_link');
                    if (alivelinks.length > 0) DisplayTheCheckedLinks(alivelinks, 'alive_link');
                    if (unknownlinks.length > 0) DisplayTheCheckedLinks(unavalinks, 'unknown_link');
                }
            });
        }

        /*function rapiduBulkCheck() {
            var arr = this.links[0].split('\r\n').join(',');
            GM_xmlhttpRequest({
                method: 'POST',
                url: this.apiUrl,
                data: this.postData + arr,
                headers: {
                    'User-agent': rUA(),
                    'Content-type': 'application/x-www-form-urlencoded',
                    'Referer': 'http://rapidu.net',
                    'X-Requested-With': 'XMLHttpRequest'
                },
                onload: function(result) {
                    var res = JSON.parse(result.responseText);
                    var deadlinks = [], alivelinks = [];
                    $.each(res, function(key, value) {
                        if (value.fileStatus && value.fileStatus == 1) {
                            alivelinks.push(value.fileId);
                        } else if (value.fileStatus && value.fileStatus == 0) {
                            deadlinks.push(value.fileId);
                        }
                    });

                    if (deadlinks.length > 0) DisplayTheCheckedLinks(deadlinks, 'adead_link');
                    if (alivelinks.length > 0) DisplayTheCheckedLinks(alivelinks, 'alive_link');
                }
            });
        }*/

        function webshareBulkCheck()
        {
            var arr = this.links[0].split('\r\n');
            var i = arr.length;

            while(i--)
            {
                postRequest(arr[i]);
            }

            function postRequest(wsLink) {
                var id = wsLink.match(/webshare\.cz\/(?:(?:#\/)?file\/)?(\w+)/)[1];

                GM_xmlhttpRequest({
                    method: 'POST',
                    url: "http://webshare.cz/api/file_info/",
                    headers: {
                        'User-agent': rUA(),
                        'Content-type': 'application/x-www-form-urlencoded',
                        'Referer': "",
                    },
                    data: "wst=&ident=" + id,
                    onload: function (result) {
                        var res = result.responseText;

                        if (res.contains(/<name>.+?<\/name>/))
                        {
                            DisplayTheCheckedLinks([id], 'alive_link');
                        }
                        else
                        {
                            DisplayTheCheckedLinks([id], 'adead_link');
                        }
                    }
                });
            }
        }

        function anysendBulkCheck() {
            var arr = this.links[0].split('\r\n');
            var blockIdx = arr.length;
            while (blockIdx--) {
                check(arr[blockIdx]);
            }

            function check(id) {
                GM_xmlhttpRequest({
                    url: 'http://im.anysend.com/check_file.php?key=' + id,
                    method: 'GET',
                    onload: function(result) {
                        var res = result.responseText;
                        if (res.contains(/"[0-9\.]+"/)) {
                            DisplayTheCheckedLinks([id], 'alive_link');
                        } else if (res.contains('<a href="/download.php" class="btn btn-large btn-success"')) { //request has redirected to homepage => link dead
                            DisplayTheCheckedLinks([id], 'adead_link');
                        } else {
                            DisplayTheCheckedLinks([id], 'unknown_link');
                        }

                    }
                });
            }
        }

        function gettBulkCheck() {
            var arr = this.links[0].split("\r\n");
            var i = arr.length;
            var params, sharename, fileid;
            while (i--) {
                params = arr[i].match(/(\w+)(?:\/v\/(\d+))?/);
                sharename = params[1], fileid = params[2] ? params[2] : 0;
                GM_xmlhttpRequest({
                    method:"GET",
                    url: this.apiUrl + sharename + "/" + fileid,
                    headers: {
                        'User-agent': rUA(),
                        'Content-type': 'application/x-www-form-urlencoded',
                        'Referer': this.apiUrl,
                        'X-Requested-With': 'XMLHttpRequest'
                    },
                    onload: function(result) {
                        var res = JSON.parse(result.responseText);
                        if (res.readystate == "uploaded") {
                            DisplayTheCheckedLinks([res.sharename], 'alive_link');
                        } else if (res.readystate == "removed") {
                            DisplayTheCheckedLinks([res.sharename], 'adead_link');
                        } else {
                            DisplayTheCheckedLinks([res.sharename], 'unknown_link');
                        }
                    }
                });
            }
        }

        function uploadingBulkCheck()
        {
            var blockIdx = this.links.length;

            while (blockIdx--)
            {
                postRequest(this.apiUrl, this.postData, this.links[blockIdx],
                    this.resLinkRegex, this.resLiveRegex, this.resDeadRegex, this.resUnavaRegex);

            }

            function postRequest(api, postData, links, linkRegex, liveRegex, deadRegex, unavaRegex)
            {
                GM_xmlhttpRequest(
                {
                    method: 'POST',
                    url: api,
                    headers: {
                        'User-agent': rUA(),
                        'Content-type': 'application/x-www-form-urlencoded',
                        'Referer': api,
                        'X-Requested-With': 'XMLHttpRequest'
                    },
                    data: postData + encodeURIComponent(links),
                    onload: function (result)
                    {
                        var res = result.responseText;

                        var i;

                        var livelinks = res.match(liveRegex);
                        var deadlinks = res.match(deadRegex);
                        var allLinks = links.split("\r\n");
                        for(i=0;i<allLinks.length;i++) {
                            allLinks[i] = allLinks[i].match(/uploading\.com\/(?:files\/|\w+\/\?get=)?(\w+)/)[1];
                        }

                        if (livelinks != null)
                        {
                            i = livelinks.length - 1;
                            do
                            {
                                livelinks[i] = livelinks[i].match(linkRegex)[1].toLowerCase();
                                livelinks.push(livelinks[i].toUpperCase());
                                allLinks.splice($.inArray(livelinks[i], allLinks), 1);
                            }
                            while (i--);
                            DisplayTheCheckedLinks(livelinks, 'alive_link');
                        }

                        if (deadlinks != null)
                        {
                            i = deadlinks.length - 1;
                            do
                            {
                                deadlinks[i] = deadlinks[i].match(linkRegex)[1].toLowerCase();
                                deadlinks.push(deadlinks[i].toUpperCase());
                                allLinks.splice($.inArray(deadlinks[i], allLinks), 1);
                            }
                            while (i--);
                            DisplayTheCheckedLinks(deadlinks, 'adead_link');
                        }

                        if (allLinks.length > 0)
                        {
                            i = allLinks.length - 1;
                            do
                            {
                                websiteCheck(allLinks[i]);
                            }
                            while (i--);
                        }
                    }
                });

            }

            function websiteCheck(link) {
                var realLink = "http://uploading.com/files/" + link;
                GM_xmlhttpRequest({
                    method: 'GET',
                    url: realLink,
                    headers: {
                        'User-agent': rUA(),
                        'Content-type': 'application/x-www-form-urlencoded',
                        'Referer': realLink,
                        'X-Requested-With': 'XMLHttpRequest'
                    },
                    onload: function (result) {
                        if (result.status == 503) websiteCheck(link);
                        res = result.responseText;
                        if (res.contains('file_error">|error_404">')) {
                            DisplayTheCheckedLinks([link], 'adead_link');
                        }
                        else if (res.contains('free_method">')) {
                            DisplayTheCheckedLinks([link], 'alive_link');
                        }
                    }
                });
            }
        }

        function uploadedBulkCheck()
        {
            var t = this.links.length;
            while (t--) {
                var arr = this.links[t].split("\r\n");
                var data = "apikey=lhF2IeeprweDfu9ccWlxXVVypA5nA3EL";

                $.each(arr, function (key, value) {
                    data += '&id_' + key + '=' + value;
                });

                GM_xmlhttpRequest(
                    {
                        method: "POST",
                        url: "https://uploaded.net/api/filemultiple",
                        data: data,
                        headers: {
                            'User-agent': rUA(),
                            'Content-type': 'application/x-www-form-urlencoded',
                            'Referer': ""
                        },
                        onload: function (result)
                        {
                            var res = result.responseText;

                            var i;

                            var livelinks = res.match(/online,\w+,/g);
                            var deadlinks = res.match(/offline,\w+,/g);

                            if (livelinks)
                            {
                                var i = livelinks.length - 1;
                                do
                                {
                                    livelinks[i] = livelinks[i].match(/,(\w+),/)[1];
                                }
                                while (i--);
                                DisplayTheCheckedLinks(livelinks, 'alive_link');
                            }

                            if (deadlinks)
                            {
                                var i = deadlinks.length - 1;
                                do
                                {
                                    deadlinks[i] = deadlinks[i].match(/,(\w+),/)[1];
                                }
                                while (i--);
                                DisplayTheCheckedLinks(deadlinks, 'adead_link');
                            }
                        }
                    });
            }
        }

        function megaBulkCheck()
        {
            var arr = this.links[0].split("\r\n");
            var i = arr.length;
            var seqno = Math.floor(Math.random()*1000000000);

            while(i--)
            {
                postRequest(arr[i]);
            }

            function postRequest(megaLink)
            {
              megaLink=megaLink.replace('mega.nz/','mega.co.nz/');  
              var id = megaLink.match(/mega\.co\.nz\/#!(\w+)(?:!\w+)?/)[1];

                GM_xmlhttpRequest(
                {
                    method: "POST",
                    url: 'https://g.api.mega.co.nz/cs?id=' + seqno++,
                    data: '[{"a":"g","p":"' + id + '","ssl": "1"}]',
                    headers: {
                        'User-agent': rUA(),
                        'Content-Type': 'application/xml',
                        'Referer': "https://mega.co.nz/"
                    },
                    onload: function (result)
                    {
                        var res = $.parseJSON(result.responseText.match(/\[(.+?)\]/)[1]);

                        if ((typeof res == "number" && (res == -9 || res == -16 || res == -6)) || res.d) {
                            DisplayTheCheckedLinks([id], 'adead_link');
                        } else if (res.e == "ETEMPUNAVAIL") {
                            DisplayTheCheckedLinks([id], 'unava_link');
                        } else if (res.at) {
                            DisplayTheCheckedLinks([id], 'alive_link');
                        } else {
                            console.warn("Error in checking Mega.co.nz! Please notify devs.\r\nError code: " + result.responseText);
                        }
                    }
                });
            }
        }

        function depositfilesBulkCheck()
        {
            var arr = this.links[0].split("\r\n");
            var i = arr.length;

            while(i--)
            {
                postRequest(arr[i]);
            }

            function postRequest(dfLink)
            {
                var id = dfLink.match(/(?:depositfiles\.(?:com|lt|org)|dfiles\.(?:eu|ru))\/(?:en\/|ru\/|de\/|es\/|pt\/|)files\/(\w+)/)[1];

                GM_xmlhttpRequest(
                {
                    method: "POST",
                    url: 'http://depositfiles.com/api/get_download_info.php?id=' + id + "&format=json",
                    headers: {
                        'User-agent': rUA(),
                        'Content-Type': 'application/x-www-form-urlencoded',
                        'Referer': ""
                    },
                    onload: function (result)
                    {
                        var res = result.responseText;
                        //console.log(res);

                        if (res == "") {
                            postRequest(dfLink);
                        }

                        if (res.contains('no_file'))
                        {
                            DisplayTheCheckedLinks(["files/" + id], 'adead_link');
                            return;
                        }

                        if (res.contains('file_ban')) {
                            DisplayTheCheckedLinks(["files/" + id], 'unknown_link');
                            return;
                        }

                        if (res.contains(/download_li(?:nk|mit)|password_check|file_storage/))
                        {
                            DisplayTheCheckedLinks(["files/" + id], 'alive_link');
                        }
                    }
                });
            }
        }
    }

    function initFileHosts()
    {
        var aOHCount = "1";
        function addObsoleteHost(hostName, linkRegex)
        {
            hostName = hostName.split("|");
            var i = hostName.length;

            var hostID = "OH" + aOHCount;

            while(i--) {
                var filehost = gimmeHostName(hostName[i]).replace(/\./g, "_dot_").replace(/\-/g, "_dash_");
                if (!hostsIDs[filehost]) {
                    hostsIDs[filehost] = [];
                }
                hostsIDs[filehost].push({
                    hostID: hostID,
                    linkRegex: linkRegex,
                });
            }

            var OHObj = {
                links: []
            }

            hostsCheck[hostID] = OHObj;
            aOHCount++;
        }

        //obsolete file hosts init start
        if (hostSet("Obsolete_file_hosts", false))
        {
            addObsoleteHost("superfastfile.com", "superfastfile\\.com\/\\w+");
            addObsoleteHost("uploadlab.com", "files\\.uploadlab\\.com\/\\w+");
            addObsoleteHost("zupload.com", "z\\d+\\.zupload\\.com\/\\w+");
            addObsoleteHost("filesdump.com", "(?:s\\d+\\.|)filesdump\\.com\/file\/\\w+");
            addObsoleteHost("speedie-host.com", "uploads\\.speedie\\-host\\.com\/\\w+");
            addObsoleteHost("turboupload.com", "(?:d\\.|)turboupload\\.com\/\\w+");
            addObsoleteHost("share2u.net", "dl\\.share2u\\.net\/\\w+");
            addObsoleteHost("filestock.net|filestock.ru", "(?:download\\.)?filestock\\.(?:net|ru)\/\\w+");
            addObsoleteHost("ex.ua", "(?:fs\\d{1,2}\\.)?(?:www\\.|)ex\\.ua\/\\w+");
            addObsoleteHost("omxira.com", "(?:get\\.|)omxira\\.com\/\\w+");
            addObsoleteHost("uploadtornado.com", "(?:\\w{2}\\.)uploadtornado\\.com\/\\w+");
            addObsoleteHost("bgdox.com", "(?:turbo\\.)?bgdox\\.com\/\\w+");
            addObsoleteHost("fshare.eu", "www\\d?\\.fshare\\.eu\/\\w+");
            var i = allObsoleteNames.length;
            while(i--)
            {
                addObsoleteHost(
                    allObsoleteNames[i],
                    "https?:\/\/(?:[a-zA-Z0-9-]+\\.)?(?:" + allObsoleteNames[i].replace(/\./g, "\\.").replace(/\-/g, "\\-") + ")\/"
                );
            }

            if (WBB_MODE) {
                var x = wbbCensoredHosts.length;
                while (x--) {
                    addObsoleteHost(
                        wbbCensoredHosts[x],
                        "https?:\/\/(?:[a-zA-Z0-9-]+\\.)?(?:" + wbbCensoredHosts[x].replace(/\./g, "\\.").replace(/\-/g, "\\-") + ")\/"
                    );
                }
                addObsoleteHost("hellshare.com|hellshare.sk|hellshare.pl|hellshare.cz|hellshare.hu","(?:|download\\.(?:\\w{2}\\.|)|www\\.)hellshare\\.(?:\\w{2,3})\/[\\w-\\.]+");
            }
        }
        //obsolete file hosts init end
        var aFHCount = 1;
        function addFileHost(hostName, linkRegex, isAliveRegex, isDeadRegex, isUnavaRegex, tryLoop)
        {
            hostName = hostName.split("|");
            var i = hostName.length;

            var hostID = "WC" + aFHCount;

            while(i--) {
                var filehost = hostName[i].replace(/\./g, "_dot_").replace(/\-/g, "_dash_");

                if (!hostsIDs[filehost]) {
                    hostsIDs[filehost] = [];
                }
                hostsIDs[filehost].push({
                    hostID: hostID,
                    linkRegex: linkRegex,
                });
            }

            var WCObj = {
                liveRegex: isAliveRegex,
                deadRegex: isDeadRegex,
                unavaRegex: isUnavaRegex,
                tryLoop: false,
                links: []
            }

            if (tryLoop) WCObj.tryLoop = true;

            hostsCheck[hostID] = WCObj;
            aFHCount++;
        }

        var genericWC = [   'rabidfiles.com', 'box4up.com', 'upfile.vn', 'weshare.me',
                            'sv-esload.com'];

        var XFSPWC =     [     "xvidstage.com", "ex-load.com", "share.az",
                            "downloadani.me", "uppit.com|up.ht", 'toofile.com',
                            "tusfiles.net|tusfiles.com", "lafiles.com", "redbunker.net", 'happystreams.net'];

        var genThird =    [    "4bigbox.com", "skyfilebox.com"]

        var gWC = genericWC.length;
        while(gWC--) {
            if (hostSet("Check_" + genericWC[gWC].replace(/\./g, "_dot_").replace(/\-/g, "_dash_") + "_links", false))
            {
                addFileHost(
                    genericWC[gWC],
                    genericWC[gWC].replace(/\./g, "\\.").replace(/\-/g, "\\-") + "\/\\w+",
                    '$(\'.download-timer\').html("<a class=\'btn btn-|<a class="link btn-free"',
                    /<ul class='pageErrors'><li>(?:Datei wurde entfernt|File has been removed)/,
                    'optional--'
                );
            }
        }

        var xWC = XFSPWC.length;
        while (xWC--) {
            if (hostSet("Check_" + XFSPWC[xWC].match(/[\w\.\-]+/)[0].replace(/\./g, "_dot_").replace(/\-/g, "_dash_") + "_links", false))
            {
                addFileHost(
                XFSPWC[xWC],
                "(?:" + XFSPWC[xWC].replace(/\./g, "\\.").replace(/\-/g, "\\-") + ")\/\\w+",
                'name="method_free"|id="btn_download"|value="Free Download"',
                />(?:File not found|We're sorry, the file you are looking for could not be found.|The file was removed by administrator|Datei nicht gefunden|No such file|The file you are trying to download is no longer available)\s*<|<div id="div_file" class="upload_block">/i,
                '>This server is in maintenance mode|<img src="/images/under.gif"',
                true);
            }
        }

        var tWC = genThird.length;
        while (tWC--) {
            if (hostSet("Check_" + genThird[tWC].match(/[\w\.\-]+/)[0].replace(/\./g, "_dot_").replace(/\-/g, "_dash_") + "_links", false))
        {
            addFileHost(
            genThird[tWC],
            "(?:" + genThird[tWC].replace(/\./g, "\\.").replace(/\-/g, "\\-") + ")\/newfile\\?n=\\w+",
            '<div class="downloadfree">',
            'div_file"',
            'optional--'
            );
        }
        }

        if (hostSet("Check_megafileupload_dot_com_links", false))
        {
            addFileHost(
            "megafileupload.com",
            "megafileupload\.com\/..\/file\/",
            'downloadbtn',
            'is not found',
            'optional--');
        }

        if (hostSet("Check_uploadto_dot_us_links", false))
        {
            addFileHost(
            "uploadto.us|ultramegabit.com",
            "(?:uploadto\\.us|ultramegabit\\.com)\/file\/details\/[\\w+-]",
            '>Your download is ready<|>We\'re sorry. This file is temporarily unavailable',
            '>File has been deleted|<img src="/images/drag_to_upload.png|>File not available',
            '>This download server is overloaded<',
            true);
        }

        if (hostSet("Check_fastshare_dot_cz_links", false))
        {
            addFileHost(
            "fastshare.cz",
            "fastshare\\.cz\/\\d+\/\\w*",
            'dwntable">',
            'nebyla nalezena|nebola nájdená|nie została odnaleziona|color:red;font-weight:bold;border-style:dashed|<b>Requested page not found.',
            'optional--');
        }

        /*if (hostSet("Check_1fichier_dot_com_links", false))
        {
            addFileHost(
            "1fichier.com",
            "\\w+\\.(?:1fichier)\\.com\/?",
            'value="Download"',
            'errorDiv"|File not found|Fichier introuvable',
            'optional--');
        }*/

        if (hostSet("Check_rapidgator_dot_net_links", false) && chromeBrowser)
        {
            addFileHost(
            "rapidgator.net|rg.to",
            "(?:rapidgator\\.net|rg.to)\/file\/\\w+",
            /btm" style="height: \d+px;">\s*<p/,
            '<h3>File not found</h3>|<span>Get the advantages of premium-account',
            'optional--',
            true
            );
        }
		
		/*if (hostSet("Check_alfafile_dot_net_links", false) && chromeBrowser)
        {
            addFileHost(
            "alfafile.net",
            "alfafile\\.net\/file\/\\w+",
            'class="big_button big_button02"',
            'File not found!|Файл не найден',
            'optional--'
            );
        }*/

        if (hostSet("Check_relink_dot_us_links", false))
        {
            addFileHost(
            "relink.us",
            "relink\\.us\/(?:f\/\\w+|go\\.php\\?id=\\d+|view\\.php\\?id=\\d+)",
            'online_detail.png" alt="Status',
            /(?:offline|partially)_detail\.png" alt="Status|File deleted/,
            'unknown_detail.png" alt="Status'
            );
        }

        if (hostSet("Check_flyfiles_dot_net_links", false))
        {
            addFileHost(
            "flyfiles.net",
            "flyfiles\\.net\/\\w+",
            'download_button"|"Download file"',
            'File not found!|Файл не найден',
            'optional--'
            );
        }

        if (hostSet("Check_wikiupload_dot_com_links", false))
        {
            addFileHost(
            "wikiupload.com",
            "wikiupload\\.com\/\\w+",
            'download-button">',
            'Sorry, File not found|theme-container">',
            'optional--'
            );
        }

        if (hostSet("Check_hostuje_dot_net_links", false))
        {
            addFileHost(
            "hostuje.net",
            "hostuje\\.net\/file\\.php\\?id=\\w+",
            'file.php">|Pobierz Plik',
            'Podany plik zosta. skasowany z powodu naruszania praw autorskich...|Podany plik nie zosta. odnaleziony...',
            'optional--'
            );
        }

        if (hostSet("Check_4fastfile_dot_com_links", false))
        {
            addFileHost(
            "4fastfile.com",
            "4fastfile\\.com\/abv-fs\/\\d+",
            'file-download">',
            'v><div id="block',
            'optional--'
            );
        }

        /*if (hostSet("Check_slingfile_dot_com_links", false))
        {
            addFileHost(
            "slingfile.com",
            "slingfile\\.com\/(?:dl|file|video)\/\\w+",
            'fileinfo">',
            'errorbox">|<a id="ubutton" class="btn-guest',
            'optional--'
            );
        }*/

        if (hostSet("Check_data_dot_hu_links", false))
        {
            addFileHost(
            "data.hu",
            "data\\.hu\/get\/\\d+\/",
            'download_box_button',
            'missing.php',
            'optional--',
            true
            );
        }

        if (hostSet("Check_files_dot_indowebster_dot_com_links", false))
        {
            addFileHost(
            "indowebster.com",
            "files\\.indowebster\\.com\/download\/\\w+\/",
            'premiumBtn"',
            'errorMessage"',
            'optional--'
            );
        }

        if (hostSet("Check_superload_dot_cz_links", false))
        {
            addFileHost(
            "superload.cz",
            "superload\\.cz\/dl\/\\w+",
            'icon-download">',
            'soubor nebyl nalezen',
            'optional--'
            );
        }

        if (hostSet("Check_filestore_dot_com_dot_ua_links", false))
        {
            addFileHost(
            "filestore.com",
            "filestore\\.com\\.ua\/\\?d=\\w+",
            'tdrow1>',
            'class=warn',
            'optional--'
            );
        }

        if (hostSet("Check_netkups_dot_com_links", false))
        {
            addFileHost(
            "netkups.com",
            "netkups\\.com\/\\?d=\\w+",
            '<form method="post"',
            '<div align="center">|>File not found',
            'optional--'
            );
        }

        if (hostSet("Check_extmatrix_dot_com_links", false))
        {
            addFileHost(
            "extmatrix.com",
            "extmatrix\\.com\/files\/\\w+",
            'div class="success"',
            'div class="error"',
            'optional--'
            );
        }

        if (hostSet("Check_sendfiles_dot_nl_links", false))
        {
            addFileHost(
            "sendfiles.nl",
            "sendfiles\\.nl\/download.aspx\\?ID=\\w+",
            'content_lnkDownload',
            'error.aspx?',
            'optional--'
            );
        }

        if (hostSet("Check_yourfilestore_dot_com_links", false))
        {
            addFileHost(
            "yourfilestore.com",
            "yourfilestore\\.com\/download\/\\d+\/",
            'download_data">',
            'may have been deleted|<h1>Sorry!</h1>',
            'optional--'
            );
        }

        if (hostSet("Check_filebig_dot_net_links", false))
        {
            addFileHost(
            "filebig.net",
            "filebig\\.net\/files\/\\w+",
            'downloadFile">',
            '<p>File not found</p>',
            'optional--'
            );
        }

        if (hostSet("Check_filefront_dot_com_links", false))
        {
            addFileHost(
            "filefront.com|gamefront.com",
            "(?:files\\.|\\w+\\.|)(?:file|game)front\\.com\/\\w+",
            'downloadLink">|class="downloadNow"|<strong>Download',
            /File not found, you|(?:File|Page) Not Found/,
            'unavailable at the moment'
            );
        }

        if (hostSet("Check_filesin_dot_com_links", false))
        {
            addFileHost(
            "filesin.com",
            "filesin\\.com\/\\w+",
            'download_area">',
            'error_note">',
            'optional--',
            true
            );
        }

        if (hostSet("Check_nowdownload_dot_eu_links", false))
        {
            addFileHost(
            "nowdownload.eu|nowdownload.ch|nowdownload.co",
            "nowdownload\\.(?:eu|ch|co)\/dl\/\\w+",
            'alert-success"',
            'This file does not exist!',
            'The file is being transfered'
            );
        }

        if (hostSet("Check_axifile_dot_com_links", false))
        {
            addFileHost(
            "axfile.com",
            "axifile\\.com(?:\/\w(2))?\/\\??\\w+",
            'Dbutton_big"',
            'download-error.php',
            'optional--'
            );
        }

        if (hostSet("Check_asfile_dot_com_links", false))
        {
            addFileHost(
            "asfile.com",
            "asfile\\.com\/file\/\\w+",
            'link_line">',
            /Page not found|(?:deleted|is not exist|gelöscht)<\/strong>/,
            'optional--'
            );
        }

        if (hostSet("Check_movshare_dot_net_links", false))
        {
            addFileHost(
            "movshare.net",
            "movshare\\.net\/\\w+",
            'videoPlayer"',
            'no longer exists',
            'optional--'
            );
        }

        if (hostSet("Check_uploadspace_dot_pl_links", false))
        {
            addFileHost(
            "uploadspace.pl",
            "uploadspace\.pl\/plik\\w+",
            /Downloading .+? \|/,
            'Downloading a file',
            'optional--'
            );
        }

        if (hostSet("Check_rghost_dot_net_links", false))
        {
            addFileHost(
            "rghost.net|rghost.ru",
            "rghost\.(?:net|ru)\/(?:|private\/)\\d+",
            'download_link|btn large download"',
            'file is restricted|File is deleted|503 Service Unavailable',
            'File was deleted'
            );
        }

        if (hostSet("Check_xdisk_dot_cz_links", false))
        {
            addFileHost(
            "xdisk.cz",
            "xdisk\\.cz\/(?:..\/)?download\\.php\\?id=\\w+",
            /">Staženo:\\s*<\/span>/,
            'Soubor, který hledáte nenalezen',
            'optional--'
            );
        }

        if (hostSet("Check_videozer_dot_com_links", false))
        {
            addFileHost(
            "videozer.com",
            "videozer\\.com\/video\/\\w+",
            'video_player"',
            'error_404"',
            'optional--'
            );
        }

        if (hostSet("Check_daten_dash_hoster_dot_de_links", false))
        {
            addFileHost(
            "daten-hoster.de|filehosting.org|filehosting.at",
            "(?:daten-hoster\\.de|filehosting\\.(?:org|at))\/file\/\\w+",
            '<table class="table table-bordered',
            '<div class="alert alert-error',
            'optional--'
            );
        }

        if (hostSet("Check_filestore_dot_to_links", false))
        {
            addFileHost(
            "filestore.to",
            "filestore\.to\/\\?d=\\w+",
            '"downloading"',
            'Datei wurde nicht gefunden',
            'optional--'
            );
        }

        if (hostSet("Check_yunfile_dot_com_links", false))
        {
            addFileHost(
            "yunfile.com|filemarkets.com|yfdisk.com",
            "(?:\\w+\\.)?(?:yunfile|filemarkets|yfdisk)\\.com\/f(?:ile|s)\/\\w+",
            /<h2 class="title">.+?&nbsp;(?:<a><\/a>)?&nbsp;.+?<\/h2>/,
            /<h2 class="title">.+?&nbsp;&nbsp;<\/h2>|Been deleted|> Access denied/,
            'optional--'
            );
        }

        if (hostSet("Check_nitroflare_dot_com_links", false))
        {
            addFileHost(
            "nitroflare.com",
            "nitroflare\\.com\/view\/\\w+",
            '<button id="slow-download',
            'This file has been removed',
            'optional--'
            );
        }

        if (hostSet("Check_filefreak_dot_com_links", false))
        {
            addFileHost(
            "filefreak.com",
            "filefreak\\.com\/(?:uploaded\/file\/id\/)?\\d+",
            '<div id="dl-high-first"',
            />[Nn]o such file/,
            'optional--',
            true);
        }

        if (hostSet("Check_load_dot_to_links", false))
        {
            addFileHost(
            "load.to",
            '(?:www\\.|\/)load\\.to\/(?:|\\?d\\=)\\w+',
            '"download_table_left">Size|<input class="input-button" type="submit" value="Download"',
            'Can\'t find file',
            'optional--'
            );
        }

        /*if (hostSet("Check_files_dot_to_links", false))
        {
            addFileHost(
            "files.to",
            "files\.to\/get\/\\d+\/",
            'You requested the following',
            'requested file couldn|This download link is invalide.',
            'optional--'
            );
        }*/

        if (hostSet("Check_divshare_dot_com_links", false))
        {
            addFileHost(
            "divshare.com",
            "divshare\\.com\/download\/",
            'download_new.png',
            'have been removed',
            'optional--'
            );
        }

        if (hostSet("Check_files_dot_mail_dot_ru_links", false))
        {
            addFileHost(
            "mail.ru",
            'files\\.mail\\.ru/(?:\\w*)',
            'fileList',
            'errorMessage|error">',
            'optional--'
            );
        }

        if (hostSet("Check_narod_dot_ru_links", false))
        {
            addFileHost(
            "narod.ru|yandex.ru",
            'narod\\.(?:yandex\\.|)ru\/disk\/',
            '<a id="b-submit"',
            '<p class="b-download-virus-note"|headCode">404<',
            'Внутренняя ошибка сервиса'
            );
        }

        if (hostSet("Check_filesmonster_dot_com_links", false))
        {
            addFileHost(
            "filesmonster.com",
            "filesmonster\\.com\/download\\.php\\?id=\\w+",
            'button_green_body"',
            'error">',
            'optional--'
            );
        }

        if (hostSet("Check_sendspace_dot_com_links", false))
        {
            addFileHost(
            "sendspace.com",
            'sendspace\\.com\/file\/\\w+',
            'file_description',
            'msg error"',
            'optional--'
            );
        }

        if (hostSet("Check_gigasize_dot_com_links", false))
        {
            addFileHost(
            "gigasize.com",
            'gigasize\\.com\/get(?:\\.php(?:\/[\\d-]+|\\?d=\\w+)|\/\\w+)',
            'fileId"',
            'error">',
            'optional--'
            );
        }

        if (hostSet("Check_2shared_dot_com_links", false))
        {
            addFileHost(
            "2shared.com",
            '2shared\\.com\/(?:file|video|document)\/\\w*',
            'File size',
            'var msg = \'VGhlIGZpbGUgbGluayB0aGF0IHlvdSByZ',
            'optional--'
            );
        }

        if (hostSet("Check_gigapeta_dot_com_links", false))
        {
            addFileHost(
            "gigapeta.com",
            'gigapeta\\.com\/dl\/\\w+',
            'Download file|Скачать файл| Herunterzuladen|Scarica il file|Cargar el fichero|Charger le fichier|<table id="download">',
            '404|page_error',
            'optional--'
            );
        }

        if (hostSet("Check_veehd_dot_com_links", false))
        {
            addFileHost(
            "veehd.com",
            'veehd\.com\/video\/.*?',
            'No sound|Download video',
            'Featured Videos',
            'optional--'
            );
        }

        if (hostSet("Check_ifolder_dot_ru_links", false))
        {
            addFileHost(
            "ifolder.ru|rusfolder.com|rusfolder.net",
            '(?:ifolder\.ru|rusfolder\\.(?:com|net))\/\\d+',
            'file-info',
            'ui-state-error',
            'optional--'
            );
        }

        if (hostSet("Check_fileswap_dot_com_links", false))
        {
            addFileHost(
            "fileswap.com",
            'fileswap\\.com\/dl\/\\w+',
            'dlslowbutton"',
            '<div class="rounded_block_error',
            'is temporary unavailable|disponible en estos momentos|vorläufig unerreichbar|Файл временно недоступен'
            );
        }

        if (hostSet("Check_solidfiles_dot_com_links", false))
        {
            addFileHost(
            "solidfiles.com",
            'solidfiles\\.com\/d\/\\w+',
            '<i class="fa fa-download"></i>',
            '<title>File not available - Solidfiles</title>',
            'optional--'
            );
        }

        if (hostSet("Check_uloz_dot_to_links", false))
        {
            addFileHost(
            "uloz.to|ulozto.cz|bagruj.cz|zachowajto.pl",
            "(?:uloz|ulozto|bagruj|zachowajto)\\.(to|cz|sk|net|pl)\/\\w",
            'fileDownload">|fileSize">|passwordProtectedFile">',
            'grayButton deletedFile">|Stránka nenalezena|upload-button"|jako soukromý.',
            'frmaskAgeForm-disagree',
            true
            );
        }

        if (hostSet("Check_leteckaposta_dot_cz_links", false))
        {
            addFileHost(
            "leteckaposta.cz|sharegadget.com",
            "(?:leteckaposta\\.cz|sharegadget\\.com)\/\\d+",
            '<body onload="">',
            'neexistuje|not exist',
            'optional--'
            );
        }

        if (hostSet("Check_zippyshare_dot_com_links", false))
        {
            addFileHost(
            "zippyshare.com",
            "(?:www\\d+\.|)zippyshare\.com\/(?:v\/\\w+\/file\.html|view\\.jsp\\?)",
            'download.png|Download Now|dlbutton"',
            'not exist',
            'optional--'
            );
        }

        if (hostSet("Check_mediafire_dot_com_links", false))
        {
            addFileHost(
            "mediafire.com",
            "mediafire\\.com\/(?:\\?|download(?:\\.php\\?|\/)|(?:file|view)\/)\\w+",
            'download_file_title"|<a class="btn alt download|<div class="filepreview|<div class="fileName">|<div class="dl-btn-cont">',
            'class="error_msg_title">|class="errorFileMissing-title"|>Sign Up! It\'s free|<label for="create-file-name">|<div id="privateTitle">This file is currently set to private.</div>',
            'optional--'
            );
        }

        if (hostSet("Check_ulozisko_dot_sk_links", false))
        {
            addFileHost(
            "ulozisko.sk",
            "ulozisko\.sk\/",
            'Detaily',
            'neexistuje',
            'optional--'
            );
        }

        if (hostSet("Check_upnito_dot_sk_links", false))
        {
            addFileHost(
            "upnito.sk",
            "(?:dl.\\.|)upnito\\.sk\/(download|subor|file)",
            'download.php',
            'notfound|upload-suborov.php"',
            'optional--'
            );
        }

        if (hostSet("Check_myupload_dot_dk_links", false))
        {
            addFileHost(
            "myupload.dk",
            "myupload\\.dk\/showfile\/\\w+",
            '<td class="downloadTblRight"><a class="downloadLink"',
            '<div id="flash_upload_progress"|<td class="downloadTblRight">File has been removed',
            'optional--'
            );
        }

        if (hostSet("Check_filebeam_dot_com_links", false))
        {
            addFileHost(
            "filebeam.com|fbe.am",
            "(?:filebeam\\.com|fbe\\.am)\/\\w+",
            '<center>File Download Area</center>',
            '<center>Error:</center>',
            'optional--'
            );
        }

        if (hostSet("Check_upstore_dot_net_links", false))
        {
            addFileHost(
            "upstore.net|upsto.re",
            "(?:upsto\\.re|upstore.net)\/\\w+",
            '<ul class="features minus">|Download files from folder',
            '<span class="error">',
            'optional--'
            );
        }

        if (hostSet("Check_adrive_dot_com_links", false))
        {
            addFileHost(
            "adrive.com",
            "adrive\\.com\/public\/\\w+",
            'download should start',
            'no longer available publicly',
            'optional--'
            );
        }

        if (hostSet("Check_box_dot_com_links", false))
        {
            addFileHost(
            "box.com|box.net",
            "https?:\/\/(?:www\\.|)box\\.(?:com|net)\/(?:s|shared|public)\/\\w+",
            'id=\"download_button',
            '>Box \| 404|error_message_not_found',
            'optional--'
            );
        }

        if (hostSet("Check_zalil_dot_ru_links", false))
        {
            addFileHost(
            "zalil.ru",
            "zalil\\.ru\/\\d+",
            'optional--',
            'Файл не найден',
            'optional--'
            );
        }

        if (hostSet("Check_uploads_dot_bizhat_dot_com_links", false))
        {
            addFileHost(
            "bizhat.com",
            "uploads\\.bizhat\\.com\/file\/\\d+",
            'div id="dl">',
            'File not found',
            'optional--'
            );
        }

        if (hostSet("Check_mega_dash_myfile_dot_com_links", false))
        {
            addFileHost(
            "mega-myfile.com",
            "mega\\-myfile\\.com\/file\/\\d+\/\\w+",
            '<b>File name:</b>',
            'Your requested file is not found',
            'optional--'
            );
        }

        if (hostSet("Check_yourupload_dot_com_links", false))
        {
            addFileHost(
            "yourupload.com",
            "yourupload\\.com\/\\w+",
            'class="btn btn-success"',
            '404',
            'optional--'
            );
        }

        if (hostSet("Check_file_dash_upload_dot_net_links", false))
        {
            addFileHost(
            "file-upload.net",
            "(?:en\\.|)file\\-upload\\.net\/download\\-\\d+\/\\w+",
            'downbutton2.gif',
            'Datei existiert nicht!|File does not exist!',
            'optional--'
            );
        }

        if (hostSet("Check_upload_dot_ee_links", false))
        {
            addFileHost(
            'upload.ee',
            "upload\\.ee\/files\/\\d+\/\\w+",
            'id="d_l"',
            'There is no such file',
            'optional--'
            );
        }

        if (hostSet("Check_share4web_dot_com_links", false))
        {
            addFileHost(
            'share4web.com',
            "share4web\\.com\/get\/\\w+",
            'btn_red">',
            'Page Not Found|File not found',
            'optional--'
            );
        }

        if (hostSet("Check_limelinx_dot_com_links", false))
        {
            addFileHost(
            'limelinx.com',
            "limelinx\\.com\/\\w+",
            'icon-download-alt',
            '>Error - File Not Found<',
            'optional--'
            );
        }

        if (hostSet("Check_skydrive_dot_live_dot_com_links", false))
        {
            addFileHost(
            'live.com|sdrv.ms',
            "(?:skydrive\\.live\\.com|sdrv\\.ms)\/\\w+",
            'Download file',
            'no longer available</h1>',
            'optional--'
            );
        }

        if (hostSet("Check_yourfiles_dot_to_links", false))
        {
            addFileHost(
            'yourfiles.to',
            "yourfiles\\.to\/\\?d=\\w+",
            'Download-Link: </strong>',
            'Die angefragte Datei wurde nicht gefunden',
            'optional--'
            );
        }

        if (hostSet("Check_filedropper_dot_com_links", false))
        {
            addFileHost(
            'filedropper.com|filesavr.com',
            "(?:filedropper|filesavr)\\.com\/\\w+",
            'download"',
            'steps.png',
            'optional--',
            true);
        }

        if (hostSet("Check_filehost_dot_ro_links", false))
        {
            addFileHost(
            'filehost.ro',
            "filehost\\.ro\/\\d+",
            'Apasati aici pentru a porni download-ul"',
            'Acest fisier nu exista in baza de date',
            'optional--'
            );
        }

        if (hostSet("Check_dosya_dot_tc_links", false))
        {
            addFileHost(
            'dosya.tc',
            "dosya\\.tc\/server\\d*\/\\w+",
            'id="dl"',
            'Dosya bulunamad',
            'optional--'
            );
        }

        if (hostSet("Check_exfile_dot_ru_links", false))
        {
            addFileHost(
            'exfile.ru',
            "exfile\\.ru\/\\d+",
            'id="link"><a href="/download/',
            'class="align_left"><p class="red"',
            'optional--'
            );
        }

        if (hostSet("Check_fileshare_dot_ro_links", false))
        {
            addFileHost(
            'fileshare.ro',
            "fileshare\\.ro\/\\w+",
            'DOWNLOAD NOW',
            'Acest fisier nu exista.',
            'optional--'
            );
        }

        if (hostSet("Check_fshare_dot_vn_links", false))
        {
            addFileHost(
            'fshare.vn',
            "fshare\\.vn\/file\/\\w+",
            'optional--',
            'Liên kết bạn chọn không tồn tại trên hệ thống Fshare',
            'optional--'
            );
        }

        if (hostSet("Check_wikifortio_dot_com_links", false))
        {
            addFileHost(
            'wikifortio.com',
            "wikifortio\\.com\/\\w+",
            'screenbutton">',
            "not found on node|doesn't exist or has expired and is no longer available",
            'optional--'
            );
        }

        if (hostSet("Check_wyslijto_dot_pl_links", false))
        {
            addFileHost(
            'wyslijto.pl',
            "wyslijto\\.pl\/(?:files\/download|plik)\/\\w+",
            'optional--',
            /zosta. usuni.ty/,
            'optional--'
            );
        }

        if (hostSet("Check_kiwi6_dot_com_links", false))
        {
            addFileHost(
            'kiwi6.com',
            "kiwi6\\.com\/file\/\\w+",
            'download-link"',
            'Upload not found',
            'optional--'
            );
        }

        if (hostSet("Check_localhostr_dot_com_links", false))
        {
            addFileHost(
            'localhostr.com|lh.rs|hostr.co',
            "(?:localhostr\\.com\/file|lh\\.rs|hostr\\.co\/download)\/\\w+",
            'download-button',
            'fourohfour">',
            'optional--'
            );
        }

        if (hostSet("Check_remixshare_dot_com_links", false))
        {
            addFileHost(
            'remixshare.com',
            "remixshare\\.com\/(?:dl|download)\/\\w+",
            'linkContainerDiv"',
            'Sorry, die Datei konnte nicht gefunden werden.|Die angeforderte Datei steht nicht mehr zur Verfügung.',
            'optional--'
            );
        }

        if (hostSet("Check_hidemyass_dot_com_links", false))
        {
            addFileHost(
            'hidemyass.com',
            "hidemyass\\.com\/files\/\\w+",
            'dlbutton"',
            'genericerrorbox">',
            'optional--'
            );
        }

        if (hostSet("Check_tinyupload_dot_com_links", false))
        {
            addFileHost(
            'tinyupload.com',
            "s\\d+\\.tinyupload\\.com\/(?:index\\.php)?\\?file_id=\\d+",
            'Download file</h3>',
            'File was deleted from server.',
            'optional--'
            );
        }

        if (hostSet("Check_gigabase_dot_com_links", false))
        {
            addFileHost(
            'gigabase.com',
            "gigabase\\.com\/getfile\/\\w+",
            '/img/but_dnld_regular.jpg|gigaBtn std">',
            /<div class="all" id="Page404"|(?:File|Page) Not Found/,
            'optional--'
            );
        }

        if (hostSet("Check_trainbit_dot_com_links", false))
        {
            addFileHost(
            'trainbit.com',
            "trainbit\\.com\/files\/\\w+",
            'download"',
            'file not found',
            'optional--'
            );
        }

        if (hostSet("Check_hyperfileshare_dot_com_links", false))
        {
            addFileHost(
            'hyperfileshare.com',
            "hyperfileshare\\.com\/d\/\\w+",
            '/img/download_btm_site.gif',
            'Download URL is incorrect or your file has already been deleted!',
            'optional--'
            );
        }

        if (hostSet("Check_keep2share_dot_cc_links", false))
        {
            addFileHost(
            'keep2share.cc|keep2share.com|k2s.cc|keep2s.cc',
            "(?:(?:keep2share|k2s|keep2s)\\.cc|keep2share\\.com)\/file\/\\w+",
            'low-speed.png"',
            'deleted</h5>|<label for="download_links',
            'optional--',
            true);
        }

        if (hostSet("Check_cloud_dash_up_dot_be_links", false))
        {
            addFileHost(
            'cloud-up.be',
            "(?:download\\.)?cloud\\-up\\.be\/download\\.php\\?file=\\w+",
            'download file',
            'This file does not exist!',
            'optional--'
            );
        }

        if (hostSet("Check_uploadc_dot_com_links", false)) //Do not use bulkcheck, false reports
        {
            addFileHost(
            'uploadc.com|zalaa.com',
            "(?:uploadc|zalaa)\\.com\/\\w+",
            'Slow access"',
            'File Not Found|file has been removed',
            'optional--'
            );
        }

        if (hostSet("Check_fastupload_dot_ro_links", false))
        {
            addFileHost(
            'fastupload.ro|rol.ro',
            "fastupload\\.(?:rol\\.)?ro\/\\w+",
            'isAliveRegex',
            'Fişierele nu mai sunt active!',
            'optional--'
            );
        }

        if (hostSet("Check_howfile_dot_com_links", false))
        {
            addFileHost(
            'howfile.com',
            "howfile\\.com\/file\/\\w+",
            'btn1"',
            'File not found',
            'optional--'
            );
        }

        if (hostSet("Check_free_dot_fr_links", false))
        {
            addFileHost(
            'free.fr',
            "dl\\.free\\.fr\/(?:getfile\\.pl\\?file=\/?|)\\w+",
            'Valider et t&eacute;l&eacute;charger le fichier',
            'Fichier inexistant',
            'optional--'
            );
        }

        if (hostSet("Check_file4go_dot_com_links", false))
        {
            addFileHost(
            'file4go.com',
            "file4go\\.com\/d\/\\w+",
            'gerarlinkdownload"',
            'REMOVIDO POR <b>DMCA|FILE REMOVED DMCA<|>FILE4GO 404 ARQUIVO',
            'optional--'
            );
        }

        if (hostSet("Check_sendfile_dot_su_links", false))
        {
            addFileHost(
            'sendfile.su',
            "sendfile\\.su\/\\w+",
            'download_click"',
            'Файл не найден',
            'optional--'
            );
        }

        if (hostSet("Check_anonfiles_dot_com_links", false))
        {
            addFileHost(
            'anonfiles.com',
            "anonfiles\\.com\/file\/\\w+",
            'download_button"',
            'File not found',
            'optional--'
            );
        }

        if (hostSet("Check_divxstage_dot_eu_links", false))
        {
            addFileHost(
            'divxstage.eu|divxstage.net',
            "divxstage\\.(?:eu|net)\/video\/\\w+",
            '>Download the video<',
            '>This file no longer exists on our servers.<',
            'optional--'
            );
        }

        if (hostSet("Check_herosh_dot_com_links", false))
        {
            addFileHost(
            'herosh.com',
            "herosh\\.com\/download\/\\d+\/\\w+",
            'green">Download',
            'file not found',
            'optional--'
            );
        }

        if (hostSet("Check_m5zn_dot_com_links", false))
        {
            addFileHost(
            'm5zn.com',
            "m5zn\\.com\/d\/\\?\\d+",
            'free_account">',
            'عذرا انتهت صلاحية الملف المطلوب ولايمكنك تحميله حاليا',
            'optional--'
            );
        }

        if (hostSet("Check_bin_dot_ge_links", false))
        {
            addFileHost(
            'bin.ge',
            "bin\\.ge\/dl\/\\w+",
            'captchacode">',
            'No file found',
            'optional--'
            );
        }

        if (hostSet("Check_nowvideo_dot_eu_links", false))
        {
            addFileHost(
            'nowvideo.eu|nowvideo.sx',
            "nowvideo\\.(?:sx|eu)\/video\/\\w+",
            '>Download this video!<',
            '>This file no longer exists on our servers',
            'optional--'
            );
        }

        if (hostSet("Check_shareplace_dot_com_links", false))
        {
            addFileHost(
            'shareplace.com',
            "shareplace\\.com\/(?:index1\\.php\\?a=|\\?)",
            'wait">',
            'Your requested file is not found',
            'optional--'
            );
        }

        if (hostSet("Check_terafiles_dot_net_links", false))
        {
            addFileHost(
            'terafiles.net',
            "terafiles\\.net\/v\\-\\d+",
            'download file',
            'Le fichier que vous souhaitez télécharger n\'est plus disponible sur nos serveurs.',
            'optional--'
            );
        }

        if (hostSet("Check_uploadmb_dot_com_links", false))
        {
            addFileHost(
            'uploadmb.com',
            "uploadmb\\.com\/dw\\.php\\?id=\\w+",
            'wait">',
            'The file you are requesting to download is not available',
            'optional--'
            );
        }

        if (hostSet("Check_yourfilelink_dot_com_links", false))
        {
            addFileHost(
            'yourfilelink.com',
            "yourfilelink\\.com\/get\\.php\\?fid=\\d+",
            'optional--',
            'File not found.</div>',
            'optional--'
            );
        }

        if (hostSet("Check_dropbox_dot_com_links", false)) //shared links
        {
            addFileHost(
            'dropbox.com',
            "dropbox\\.com\/sh?\/\\w+",
            'default_content_download_button" class="freshbutton-blue">',
            '>Nothing Here<|>Error (404)<|>Restricted Content|>Access to this link has been disabled.|The file you\'re looking for has been moved or deleted.',
            />Error \(509\)</
            );
        }

        if (hostSet("Check_wikisend_dot_com_links", false))
        {
            addFileHost(
            'wikisend.com',
            "wikisend\\.com\/download\/\\d+",
            'button_download.gif" alt="Download file',
            'File not found',
            'optional--'
            );
        }

        if (hostSet("Check_demo_dot_ovh_dot_eu_links", false))
        {
            addFileHost(
            'ovh.eu',
            "demo\\.ovh\\.eu\/(?:en|de)\/\\w+",
            'download.gif"',
            'p_point">',
            'optional--'
            );
        }

        if (hostSet("Check_maherfile_dot_com_links", false))
        {
            addFileHost(
            'maherfire.com',
            "maherfire\\.com\/\\?d=\\w+",
            '<input type="button" onclick="startDownload();"',
            '>Your requested file is not found',
            'optional--'
            );
        }

        if (hostSet("Check_droidbin_dot_com_links", false))
        {
            addFileHost(
            'droidbin.com|apkhosting.com',
            "(?:droidbin\\.com|apkhosting.com)\/\\w+",
            'optional--',
            '>That\'s a 404<|<li>File has been removed by the site administrator.</li>',
            'optional--'
            );
        }

        if (hostSet("Check_filefactory_dot_com_links", false) && !genset("Filefactory_API_Check", false))
        {
            addFileHost(
            'filefactory.com',
            "filefactory\\.com\/\\w+",
            'folderFileList">|src="/wp/img/icon-cloud.svg"|icon-cloud|<tr id=|div id="file_holder"|id="download-free"|danger countdown|id="file_name"|id="file-download-free">',
			      'src="/wp/img/icon-error.svg"',
              'optional--'
            );
        }

        if (hostSet("Check_moevideo_dot_net_links", false))
        {
            addFileHost(
            'moevideo.net',
            "moevideo\\.net\/video\/\\d+\\.\\w+",
            />Download\s*video</,
            '>Video not found<',
            'optional--'
            );
        }

        if (hostSet("Check_shared_dot_com_links", false))
        {
            addFileHost(
            'shared.com',
            "shared\\.com\/\\w+",
            /<div class="attachment\-icon">\n\s*<a href="https?:\/\/(?:dl|\d+\.ss)\.shared\.com\/\w+/,
            'optional--',
            'optional--'
            );
        }

        if (hostSet("Check_filepi_dot_com_links", false))
        {
            addFileHost(
            'filepi.com',
            "filepi\\.com\/\\w+",
            '<button class="submit" id="button_start"',
            '<div id="big_title">File not found or deleted :(',
            'optional--'
            );
        }

        if (hostSet("Check_2downloadz_dot_com_links", false))
        {
            addFileHost(
            '2downloadz.com',
            "2downloadz\\.com\/\\w+",
            '<div title="Slow Download"',
            '>File not found<',
            'optional--'
            );
        }

        if (hostSet("Check_tropicshare_dot_com_links", false))
        {
            addFileHost(
            'tropicshare.com',
            "tropicshare\\.com\/files\/\\d+",
            '"free-download">FREE<br/>',
            '>FNF<',
            'optional--'
            );
        }

        if (hostSet("Check_mystore_dot_to_links", false))
        {
            addFileHost(
            'mystore.to',
            "mystore\\.to\/dl\/\\w+",
            /<button wert="\w+">Download File</,
            '>file not found<', //?
            'optional--'
            );
        }

        if (hostSet("Check_putcker_dot_com_links", false))
        {
            addFileHost(
            'putcker.com',
            "putcker\\.com\/.+",
            '<div class="downloadfree">',
            'div_file"',
            'optional--'
            );
        }

        if (hostSet("Check_turtleshare_dot_com_links", false))
        {
            addFileHost(
            'turtleshare.com',
            "turtleshare\\.com\/download\/\\w+",
            /<div style=".+" id="download_link">Preparing Download/,
            'We do not know this file.',
            'optional--'
            );
        }

        if (hostSet("Check_flashx_dot_tv_links", false))
        {
            addFileHost(
            'flashx.tv',
            "flashx\\.tv\/video\/\\w+",
            /<iframe width="\d+" height="\d+" src="http:\/\/play\.flashx\.tv\/player\/embed\.php/,
            '>File not found<', //?
            'optional--'
            );
        }

        if (hostSet("Check_fileim_dot_com_links", false))
        {
            addFileHost(
            'fileim.com',
            "fileim\\.com\/file\/\\w+",
            '<a id="freedown"',
            '>Not Found<',
            'optional--'
            );
        }

        if (hostSet("Check_socifiles_dot_com_links", false))
        {
            addFileHost(
            'socifiles.com',
            "socifiles\\.com\/d\/\\w+",
            '<h1 class="file-link"',
            'something something darkside', //?
            'optional--'
            );
        }

        if (hostSet("Check_file4u_dot_pl_links", false))
        {
            addFileHost(
            'file4u.pl',
            'file4u\\.pl\/download\/\\d+',
            />Zwyk.y U.ytkownik<\/button>/,
            />\s*Plik kt.ry pr.bujesz pobra./,
            'optional--'
            );
        }

        if (hostSet("Check_kie_dot_nu_links", false))
        {
            addFileHost(
            'kie.nu',
            'kie\\.nu\/\\w+',
            '<input type="submit" value="download" id="submit-dl" />',
            '404 NOT FOUND',
            'optional--'
            );
        }

        if (hostSet("Check_file-space_dot_org_links", false))
        {
            addFileHost(
            'file-space.org',
            'file\\-space\\.org\/files\/get\/[a-z0-9-]+',
            '<a href="#" onclick="javascript:gotofree();"',
            'nothingyet',
            'optional--'
            );
        }

        if (hostSet("Check_uploadizer_dot_net_links", false))
        {
            addFileHost(
            'uploadizer.net',
            'uploadizer\\.net\/\\?d=\\d+',
            '<input type="button" onclick="startDownload();"',
            '<div class="error">Your requested file is not found',
            'optional--'
            );
        }

        if (hostSet("Check_video_dot_tt_links", false))
        {
            addFileHost(
            'video.tt',
            'video\\.tt\/video\/\\w+',
            '<div class="video_player" id="videoPlayer">',
            '<font size="5">This video is no longer available</font>',
            'optional--'
            );
        }

        if (hostSet("Check_hightail_dot_com_links", false))
        {
            addFileHost(
            'hightail.com|yousendit.com',
            '(?:hightail|yousendit)\\.com\/download\/\\w+',
            '<a id="saveToDesktop" class="btn-save hightailWhite"',
            'deadregex',
            'optional--'
            );
        }

        if (hostSet("Check_edisk_dot_cz_links", false))
        {
            addFileHost(
            'edisk.cz|edisk.sk|edisk.eu',
            '(?:(?:muj|data)\\d*\\.|)edisk\\.(?:cz|sk|eu)\/(?:|(?:cz|sk|en|pl))',
            '<a class="newdlbutton',
            '<h3>This file does not exist',
            'optional--'
            );
        }

        if (hostSet("Check_seacloud_dot_cc_links", false))
        {
            addFileHost(
            'seacloud.cc',
            'seacloud\\.cc\/d\/\\w+\/files\/\\?p=.+',
            '<a href="/repo/',
            '>>ToBeAdded--',
            'optional--'
            );
        }

        if (hostSet("Check_dropjiffy_dot_com_links", false))
        {
            addFileHost(
            'dropjiffy.com',
            'dropjiffy\\.com\/f\/\\w+',
            '>Start Download</a>',
            '<div class="expiredtext">',
            'optional--'
            );
        }

        if (hostSet("Check_quickshare_dot_cz_links", false))
        {
            addFileHost(
            'quickshare.cz',
            'quickshare\\.cz\/stahnout-soubor\/\\d+',
            ':void(0)" onclick="stahnoutSoubor()">',
            '<small>error 404</small>|<h1>Chyba! Vámi zadaný soubor neexistuje.</h1>',
            'optional--'
            );
        }

        if (hostSet("Check_tempfiles_dot_net_links", false))
        {
            addFileHost(
            'tempfiles.net',
            'tempfiles\\.net\/download\/\\d+',
            '>>ToBeAdded',
            '>File not found!<',
            'optional--'
            );
        }

        if (hostSet("Check_thaicyberupload_dot_com_links", false))
        {
            addFileHost(
            'thaicyberupload.com',
            'thaicyberupload\\.com\/get\/\\w+',
            '>>TOBEADDED!',
            '<form method="post" enctype="multipart/form-data" id="frmupload"',
            'optional--'
            );
        }

        if (hostSet("Check_linkz_dot_ge_links", false))
        {
            addFileHost(
            'linkz.ge',
            'linkz\\.ge\/file\/\\d+',
            '>>ToBeAdded',
            'No file found',
            'optional--'
            );
        }

        if (hostSet("Check_sdilej_dot_cz_links", false))
        {
            addFileHost(
            'sdilej.cz',
            'sdilej\\.cz\/\\w+',
            '>Stáhnout FREE</a>',
            '>>ToBeAdded!',
            'optional--'
            );
        }

        if (hostSet("Check_upf_dot_co_dot_il_links", false))
        {
            addFileHost(
            'upf.co.il',
            'upf\\.co\\.il\/file\/\\d+\\.html',
            '<div id="abc">',
            '>>ToBeAdded',
            'optional--'
            );
        }

        if (hostSet("Check_upload2box_dot_com_links", false))
        {
            addFileHost(
            'upload2box.com',
            'upload2box\\.com\/files\/\\w+',
            '<input type="button" value="Free Download" id="dlbutton"',
            '>>ToBeAdded',
            'optional--'
            );
        }

        if (hostSet("Check_safelinking_dot_net_links", false))
		{
			addFileHost(
			'safelinking.net',	
			"safelinking\\.net\/p\/\\w+",
			'color:green;"',
			'color:red;"|<p>This link does not exist.',
			'optional--',
			true);
		}
		
		if (hostSet("Check_kprotector_dot_com_links", false))
		{
			addFileHost(
			'kprotector.com',	
			"kprotector.\\.com\/\p4/\\w{10}",
			'color:green;"',
			'color:red;"|<p>This link does not exist.',
			'optional--',
			true);
		}

        if (hostSet("Check_fileboom_dot_me_links", false)) {
            addFileHost(
            'fileboom.me|fboom.me',
            'f(?:ile)?boom\\.me\/file\/[a-zA-Z0-9]{13}',
            '<a id="download-free" href="#"|>Premium download</button>', //last part is for premium users only
            '<div class="alert alert-danger">This file is no longer available</div>',
            'optional--');
        }

        if (hostSet("Check_filesupload_dot_org_links", false))
        {
            addFileHost(
            'filesupload.org',
            'filesupload\\.org\/\\w+',
            '<a href="/download-or-watch/',
            '<title>File not found',
            'optional--');
        }

        if (hostSet("Check_uplooad_dot_net_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'uplooad.net',
            'uplooad\\.net\/file\/[A-Z0-9]{8}\/#!.+',
            '<i class="fa fa-download fa-lg">',
            '<div class="alert alert-danger"><strong>Error ! </strong>This file has been deleted',
            'optional--');
        }

        if (hostSet("Check_babauploads_dot_com_links", false))
        {
            addFileHost(
            'babauploads.com',
            'babauploads\\.com\/\\w+',
            'class="downloadbtn"',
            '<title>File not found ;(',
            'optional--');
        }

        if (hostSet("Check_uploader_dot_link_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'uploader.link',
            'uploader\\.link\/\\w+',
            'class="downloadbtn"',
            '<title>File not found ;(',
            'optional--');
        }

        if (hostSet("Check_streamwire_dot_net_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'streamwire.net',
            'streamwire\\.net\/\\w+',
            'id="play_limit_box"',
            'File not found',
            'optional--');
        }

        if (hostSet("Check_uploader_dot_link_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'uploader.link',
            'uploader\\.link\/f\/w+',
            'class="downloadbtn"',
            '<title>File not found ;(',
            'optional--');
        }

        if (hostSet("Check_uploadbuzz_dot_cc_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'uploadbuzz.cc',
            'uploadbuzz\\.cc\/[a-zA-Z0-9]+',
            'name="method_free',
            'File Not Found',
            'optional--');
        }

        if (hostSet("Check_dbupload_dot_co_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'dbupload.co',
            'dbupload\\.co\/[a-zA-Z0-9]+',
            'name="method_free',
            'File Not Found',
            'optional--');
        }

        if (hostSet("Check_desiupload_dot_to_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'desiupload.co|desiupload.to',
            'desiupload\\.co\/[a-zA-Z0-9]+',
            'name="method_free',
            'File Not Found',
            'optional--');
        }

        if (hostSet("Check_snowfiles_dot_com_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'snowfiles.com',
            'snowfiles\\.com\/[a-zA-Z0-9]+',
            'name="method_free',
            'File Not Found',
            'optional--');
        }

        if (hostSet("Check_clicknupload_dot_org_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'clicknupload.org',
            'clicknupload\\.org\/[a-zA-Z0-9]+',
            'name="method_free',
            'File Not Found',
            'optional--');
        }
      
        if (hostSet("Check_uploadbank_dot_com_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'uploadbank.com',
            'uploadbank\\.com\/[a-zA-Z0-9]+',
            'class="downloadbtn"',
            'File Not Found',
            'optional--');
        }
      
       if (hostSet("Check_file-up_dot_org_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'file-up.org|file-upload.com',
            '(?:file-up\\.org|file-upload.com)\/[a-zA-Z0-9]+',
            'name="method_free',
            'File Not Found',
            'optional--');
        }
 
        if (hostSet("Check_dbree_dot_co_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'dbree.co',
            'dbree\\.co\/\\w+',
            'class="download-timer"',
            'File Not Found',
            'optional--');
        }

        if (hostSet("Check_uploadship_dot_com_links", false))
        {
            addFileHost(
            'uploadship.com',
            'uploadship\\.com\/\\w+',
            'class="download"',
            'File has been removed.',
            'optional--');
        }

        if (hostSet("Check_fileup_dot_cc_links", false))
        {
            addFileHost(
            'fileup.cc',
            'fileup\\.cc\/\\w+',
            'id="method_free"',
            'File Not Found',
            'optional--');
        }

        if (hostSet("Check_dropapk_dot_to_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'dropapk.to',
            'dropapk\\.to\/\\w+',
            'class="download_method"',
            'class="title mb-2">File Not Found',
            'optional--');
        }

        if (hostSet("Check_hotlink_dot_cc_links", false))
        {
            addFileHost(
            'hotlink.cc',
            'hotlink\\.cc\/\\w+',
            'id="pricing"',
            'File Not Found',
            'optional--');
        }

        if (hostSet("Check_mixloads_dot_com_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'mixloads.com',
            'mixloads\\.com\/\\w+',
            'class="download_method"',
            'class="title mb-2">File Not Found',
            'optional--');
        }

        if (hostSet("Check_uploadcloud_dot_pro_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'uploadcloud.pro',
            'uploadcloud\\.pro\/\\w+',
            'value="download1"',
            'File Not Found',
            'optional--');
        }

        if (hostSet("Check_letsupload_dot_co_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'letsupload.co',
            'letsupload\\.co\/\\w+',
            'class="mngez_download1"',
            'File Not Found',
            'optional--');
        }

        if (hostSet("Check_anonfile_dot_com_links", false))
        {
            addFileHost(
            'anonfile.com',
            'anonfile\\.com\/\\w+',
            'type="button" id="download-url"',
            'id="error-container"',
            'optional--');
        }

        if (hostSet("Check_ddl_dot_to_links", false))
        {
            addFileHost(
            'ddl.to',
            'ddl\\.to\/\\w+',
            'name="method_free"',
            'File Not Found',
            'optional--');
        }

        if (hostSet("Check_uploadev_dot_org_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'uploadev.org',
            'uploadev\\.org\/\\w+',
            'value="download1"',
            'File Not Found',
            'optional--');
        }

        if (hostSet("Check_uploadgig_dot_com_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'uploadgig.com',
            'uploadgig\\.com\/\\w+',
            'id="dltimes"',
            'File Not Found',
            'optional--');
        }

        if (hostSet("Check_mexa_dot_sh_links", false))
        {
            addFileHost(
            'mexa.sh',
            'mexa\\.sh\/\\w+',
            'method_free',
			'404 Error|15px;border-radius:15px">|<div style="text-align:left;width:550px">|/images/error.png"|>File Not Found<',
            'optional--');
        }
              
        if (hostSet("Check_mexa_dot_sh_links", false))
        {
            addFileHost(
            'filerio.in',
            'filerio\\.in\/\\w+',
            'method_free',
			'File Not Found',
            'optional--');
        }

        if (hostSet("Check_uploadever_dot_com_links", false))
        {
            addFileHost(
            'uploadever.com',
            'uploadever\\.com\/\\w+',
            'id="downloadbtn',
			'File Not Found',
            'optional--');
        }

        if (hostSet("Check_uploadrive_dot_com_links", false))
        {
            addFileHost(
            'uploadrive.com',
            'uploadrive\\.com\/\\w+',
            'id="downloadbtn',
			'File Not Found',
            'optional--');
        }

        if (hostSet("Check_uploadbaz_dot_me_links", false))
        {
            addFileHost(
            'uploadbaz.me|uploadbaz.net',
            'uploadbaz\\.me\/\\w+',
            'id="downloadbtn',
			'File Not Found',
            'optional--');
        }
         
        if (hostSet("Check_sendit_dot_cloud_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            'sendit.cloud',
            'sendit\\.cloud\/[a-zA-Z0-9]+',
			'name="method_free"',
			'File Not Found',
            'optional--');
        }
    
        if (hostSet("Check_1fichier_dot_com_links", false)) //has API but doesn't work properly
        {
            addFileHost(
            '1fichier.com',
            '1fichier\\.com\/\\?\\w+',
            'Download tag"|countdown">|class="form-button"|<input type="submit" value="Download"',
            'errorDiv"|File not found|Fichier introuvable',
            'optional--');
        }
      
        if (hostSet("Check_megaup_dot_net_files", false))
        {
            addFileHost(
            'megaup.net',
            'megaup\\.net\/[a-zA-Z0-9]+',
            '<div class="download-timer" style="display:none;">',
            'class="heading-1">Error',
            'optional--');
        }

      if (hostSet("Check_uptobox_dot_com_links", false))
		{
			addFileHost(
            'uptobox.com',
            'uptobox\\.com\/\\w+',
			'data-remaining-time=|Cliquez-ici pour lancer votre téléchargement|Click here to start your download|Create Download Link">|Lien de téléchargement|1px solid #AEAEAE|class="grey_link|id="btn_download|name="method_free"|value="Free Download"|cell countdown-block light-green-cell',
			'The file expired|<b>404 -|The file was deleted|Fichier introuvable|not available in your country|No files uploaded yet|aucun fichier présent|Belum ada berkas yang diunggah|لا يوجد أي ملف',
			'Maintenance|You need a PREMIUM account to download new files immediatly|not allowed in the US</title>',
			'You must be premium to download this file|Vous devez être premium pour télécharger ce fichier',
			"//a[contains(@href,'uptobox.com')]",
			true);
		}
        if (hostSet("Check_ninjashare_dot_pl_links", false))
        {
            addFileHost(
            'ninjashare.pl',
            'ninjashare\\.pl\/f\/\\w+',
            '<input type="submit" class="button" value="Download"',
            '<div class="main">\nFile does not exists',
            'optional--');
        }
    }

    //hosts with direct download, so they must be requested for headers only
    function initFileHostsHeadersOnly()
    {
        var aFHHCOCount = 1;
        function addFileHostHeadersOnly(hostName, linkRegex, isAliveRegex, isDeadRegex)
        {
            hostName = hostName.split("|");
            var i = hostName.length;


            var hostID = "HC" + aFHHCOCount;

            while(i--) {
                var filehost = hostName[i].replace(/\./g, "_dot_").replace(/\-/g, "_dash_");

                if (!hostsIDs[filehost]) {
                    hostsIDs[filehost] = [];
                }
                hostsIDs[filehost].push({
                    hostID: hostID,
                    linkRegex: linkRegex,
                });
            }

            var HCObj = {
                liveRegex: isAliveRegex,
                deadRegex: isDeadRegex,
                links: []
            }

            hostsCheck[hostID] = HCObj;
            aFHHCOCount++;

        }

        if (hostSet("Check_uloziste_dot_com_links", false))
        {
            addFileHostHeadersOnly(
            'uloziste.com',
            "(?:|files\\.)uloziste\\.com\/\\w+\/\\w+",
            'Connection: Keep-Alive',
            'Content-Length: 3857'
            )
        }

        if (hostSet("Check_filemonster_dot_net_links", false))
        {
            addFileHostHeadersOnly(
            'folemonster.net',
            "filemonster\\.net\/(?:..\/|)file\/\\w+",
            'filename="',
            'Content-Type: text/html'
            )
        }

        if (hostSet("Check_videozer_dot_com_links", false))
        {
            addFileHostHeadersOnly(
            'videozer.com',
            "videozer\\.com\/embed\/\\w+",
            "Connection: keep-alive|Content-Type: application/x-shockwave-flash",
            "optional--"
            )
        }

        if (hostSet("Check_dropbox_dot_com_links", false))
        {
            addFileHostHeadersOnly(
            'dropbox.com|dropboxusercontent.com',
            "dl\\.dropbox(?:usercontent)?\\.com\/u\/\\d+\/.+?",
            /x-dropbox-request-id: \w+/,
            "optional--"
            )
        }

        if (hostSet("Check_demo_dot_ovh_dot_eu_links", false))
        {
            addFileHostHeadersOnly(
            'ovh.eu',
            "demo\\.ovh\\.eu\/download\/\\w+",
            "optional--",
            "optional--"
            )
        }

        if (hostSet("Check_archive_dot_org_links", false))
        {
            addFileHostHeadersOnly(
            'archive.org',
            "\\w+\\.us\\.archive\\.org\/.+",
            /Content-Length: \d{6,}/,
            'Content-Type: text/html'
            );
        }

        if (hostSet("Check_rapidgator_dot_net_links", false) && !chromeBrowser)
        {
            addFileHostHeadersOnly(
            'rapidgator.net|rg.to',
            "(?:rapidgator\\.net|rg.to)\/file\/\\w+",
            'download_url=http%3A%2F%2Frapidgator.net%2Ffile%2F',
              'You can download files up to 1 GB in free mode<br><a style="color: red" href="/article/premium">Upgrade to premium</a> to have opportunity to download files up to 5 GB!',
            'fnf=deleted;'
            );
        }
		if (hostSet("Check_alfafile_dot_net_links", false) && !chromeBrowser)
        {
            addFileHostHeadersOnly(
            'alfafile.net',
            "alfafile\\.net\/file\/\\w+",
            '<div class="download-info">',
            'fnf=deleted;'
            );
        }
    }
}

update.init();


/* ********************UPDATES********************

WarBB3 - Warez-BB Links Checker

version	3.0.6
December 12, 2019

Added anonfile.com,
Added ddl.to,
Added streamwire.net,
Fixed filefactory.com,
Fixed mediafire.com

version	3.0.5
November 24, 2019

Added uploadship.com
Added fileup.cc
Fixed yourupload.com
Fixed upload.ac

version	3.0.4
November 16, 2019

Added uploadbuzz.cc
Added dbupload.co
Added desiupload.to
Added uploadever.com
Added uploadrive.com
Added snowfiles.com
Added uploader.link
Added dbree.co
Added letsupload.co
Added uploadev.org
Added uploadcloud.pro
Added mixloads.com
Added uploadbaz.net

version	3.0.3
November 08, 2019

Added uploadcloud.pro
Added 4downfiles.org
Added dailyuploads.net

Fixed mega.nz
Fixed userscloud.com
Fixed Filefactory.com

*/