JUST TESTING CODE

Auto-bypass shorteners, ads, popups, adblock checks, and go directly to destinations (AdFly, downloads, Flickr, YouTube, etc.)

// ==UserScript==
// @name         JUST TESTING CODE
// @namespace    bloggerpemula.pythonanywhere.com
// @version      32
// @description  Auto-bypass shorteners, ads, popups, adblock checks, and go directly to destinations (AdFly, downloads, Flickr, YouTube, etc.)
// @author       Bloggerpemula
// @match        *://t.me/*
// @match        *://vk.com/*
// @match        *://ouo.io/*
// @match        *://4hi.in/*
// @match        *://kut.li/*
// @match        *://oii.si/*
// @match        *://f2h.io/*
// @match        *://ify.ac/*
// @match        *://k2s.cc/*
// @match        *://tii.la/*
// @match        *://oei.la/*
// @match        *://iir.la/*
// @match        *://tvi.la/*
// @match        *://oii.la/*
// @match        *://tpi.li/*
// @match        *://oke.io/*
// @match        *://wii.si/*
// @match        *://sfl.gl/*
// @match        *://8tm.net/*
// @match        *://surl.li/*
// @match        *://surl.gd/*
// @match        *://apkw.ru/*
// @match        *://1ink.cc/*
// @match        *://mexa.sh/*
// @match        *://qiwi.gg/*
// @match        *://tlin.me/*
// @match        *://jksb.in/*
// @match        *://clk.kim/*
// @match        *://adfoc.us/*
// @match        *://lanza.me/*
// @match        *://ss7.info/*
// @match        *://mitly.us/*
// @match        *://a4a.site/*
// @match        *://rcccn.in/*
// @match        *://fbol.top/*
// @match        *://send.now/*
// @match        *://dbree.me/*
// @match        *://files.fm/*
// @match        *://adoc.pub/*
// @match        *://pwrpa.cc/*
// @match        *://snipn.cc/*
// @match        *://quins.us/*
// @match        *://tmail.io/*
// @match        *://ecq.info/*
// @match        *://work.ink/*
// @match        *://zaku.pro/*
// @match        *://exeo.app/*
// @match        *://cety.app/*
// @match        *://vosan.co/*
// @match        *://adbtc.top/*
// @match        *://aylink.co/*
// @match        *://4fnet.org/*
// @match        *://bico8.com/*
// @match        *://boost.ink/*
// @match        *://aduzz.com/*
// @match        *://mboost.me/*
// @match        *://the2.link/*
// @match        *://cuturl.cc/*
// @match        *://1short.io/*
// @match        *://slink.bid/*
// @match        *://dvjobs.in/*
// @match        *://ouo.press/*
// @match        *://rokni.xyz/*
// @match        *://ewall.biz/*
// @match        *://freeth.in/*
// @match        *://lksfy.com/*
// @match        *://tech5s.co/*
// @match        *://tfly.link/*
// @match        *://fx-22.com/*
// @match        *://upload.ee/*
// @match        *://gofile.io/*
// @match        *://gofile.to/*
// @match        *://hxfile.co/*
// @match        *://udrop.com/*
// @match        *://fc-lc.xyz/*
// @match        *://wokaz.com/*
// @match        *://exblog.jp/*
// @match        *://pahe.plus/*
// @match        *://tinygo.co/*
// @match        *://cdrab.com/*
// @match        *://petly.lat/*
// @match        *://biit.site/*
// @match        *://curto.win/*
// @match        *://oydir.com/*
// @match        *://gkfun.xyz/*
// @match        *://vebma.com/*
// @match        *://shrs.link/*
// @match        *://tuasy.com/*
// @match        *://djstar.in/*
// @match        *://exego.app/*
// @match        *://flickr.com/*
// @match        *://bewbin.com/*
// @match        *://linksly.co/*
// @match        *://2the.space/*
// @match        *://filedm.com/*
// @match        *://paycut.pro/*
// @match        *://yitarx.com/*
// @match        *://cshort.org/*
// @match        *://howifx.com/*
// @match        *://dsmusic.in/*
// @match        *://bnbfree.in/*
// @match        *://adsssy.com/*
// @match        *://shortex.in/*
// @match        *://tutwuri.id/*
// @match        *://indids.com/*
// @match        *://redfea.com/*
// @match        *://ddieta.net/*
// @match        *://lmktec.net/*
// @match        *://game5s.com/*
// @match        *://dddrive.me/*
// @match        *://megadb.net/*
// @match        *://uploady.io/*
// @match        *://up-load.io/*
// @match        *://linkbox.to/*
// @match        *://megaup.net/*
// @match        *://gdflix.dad/*
// @match        *://linkspy.cc/*
// @match        *://zygina.com/*
// @match        *://cekip.site/*
// @match        *://fingau.com/*
// @match        *://smoner.com/*
// @match        *://yeifly.com/*
// @match        *://shrink.icu/*
// @match        *://gally.shop/*
// @match        *://google.com/*
// @match        *://shortit.pw/*
// @match        *://labgame.io/*
// @match        *://jobydt.com/*
// @match        *://indobo.com/*
// @match        *://bubblix.eu/*
// @match        *://grtjobs.in/*
// @match        *://devnote.in/*
// @match        *://tinybc.com/*
// @match        *://phimne.com/*
// @match        *://mgame.info/*
// @match        *://upfion.com/*
// @match        *://miuiku.com/*
// @match        *://adshnk.com/*
// @match        *://teqwit.com/*
// @match        *://odiafm.com/*
// @match        *://shareus.io/*
// @match        *://multiup.io/*
// @match        *://suaurl.com/*
// @match        *://lixapk.com/*
// @match        *://jobqwe.com/*
// @match        *://bjp.org.in/*
// @match        *://nashib.xyz/*
// @match        *://veganab.co/*
// @match        *://falpus.com/*
// @match        *://exnion.com/*
// @match        *://g34new.com/*
// @match        *://bebkub.com/*
// @match        *://gocmod.com/*
// @match        *://tiktok.com/*
// @match        *://cutnet.net/*
// @match        *://alorra.com/*
// @match        *://bigbtc.win/*
// @match        *://cpmlink.pro/*
// @match        *://lolinez.com/*
// @match        *://cointox.net/*
// @match        *://cpmlink.net/*
// @match        *://mirrored.to/*
// @match        *://bonloan.xyz/*
// @match        *://studyis.xyz/*
// @match        *://m.flyad.vip/*
// @match        *://bit4me.info/*
// @match        *://earnbee.xyz/*
// @match        *://disheye.com/*
// @match        *://revlink.pro/*
// @match        *://yoshare.net/*
// @match        *://revly.click/*
// @match        *://clikern.com/*
// @match        *://link.whf.bz/*
// @match        *://hnablog.com/*
// @match        *://orbitlo.com/*
// @match        *://rotizer.net/*
// @match        *://ez4mods.com/*
// @match        *://sharedp.com/*
// @match        *://10short.com/*
// @match        *://encurt4.com/*
// @match        *://shortie.sbs/*
// @match        *://gold-24.net/*
// @match        *://karanpc.com/*
// @match        *://filemoon.sx/*
// @match        *://ex-load.com/*
// @match        *://hitfile.net/*
// @match        *://sub2get.com/*
// @match        *://bowfile.com/*
// @match        *://earnme.club/*
// @match        *://topshare.in/*
// @match        *://uptomega.me/*
// @match        *://linclik.com/*
// @match        *://up4cash.com/*
// @match        *://coinclix.co/*
// @match        *://youtube.com/*
// @match        *://foodxor.com/*
// @match        *://pdfvale.com/*
// @match        *://wpcheap.net/*
// @match        *://newsamp.net/*
// @match        *://gadifeed.in/*
// @match        *://dekhe.click/*
// @match        *://techforu.in/*
// @match        *://uprwssp.org/*
// @match        *://adshrink.it/*
// @match        *://bulkpit.com/*
// @match        *://diudemy.com/*
// @match        *://blog4nx.com/*
// @match        *://ziggame.com/*
// @match        *://azmath.info/*
// @match        *://bchlink.xyz/*
// @match        *://usdlink.xyz/*
// @match        *://shrinkme.w+/*
// @match        *://worldzc.com/*
// @match        *://4ace.online/*
// @match        *://katfile.com/*
// @match        *://v34down.com/*
// @match        *://rfaucet.com/*
// @match        *://cutyion.com/*
// @match        *://cutynow.com/*
// @match        *://jixo.online/*
// @match        *://comohoy.com/*
// @match        *://xonnews.net/*
// @match        *://share4u.men/*
// @match        *://mohtawaa.com/*
// @match        *://anonym.ninja/*
// @match        *://enlacito.com/*
// @match        *://bioinflu.com/*
// @match        *://rekonise.com/*
// @match        *://merekrut.com/*
// @match        *://deltabtc.xyz/*
// @match        *://getunic.info/*
// @match        *://forex-22.com/*
// @match        *://vocalley.com/*
// @match        *://winezones.in/*
// @match        *://kabilnews.in/*
// @match        *://techawaaz.in/*
// @match        *://biharhelp.co/*
// @match        *://themezon.net/*
// @match        *://vi-music.app/*
// @match        *://sarkarins.in/*
// @match        *://viralxns.com/*
// @match        *://coinjest.com/*
// @match        *://dogefury.com/*
// @match        *://almontsf.com/*
// @match        *://offerwall.me/*
// @match        *://freebitco.in/*
// @match        *://finquizy.com/*
// @match        *://vbnmx.online/*
// @match        *://ezeviral.com/*
// @match        *://forexrw7.com/*
// @match        *://whatgame.xyz/*
// @match        *://apkadmin.com/*
// @match        *://megaupto.com/*
// @match        *://1fichier.com/*
// @match        *://sharefile.co/*
// @match        *://turbobit.net/*
// @match        *://up-4ever.net/*
// @match        *://o-pro.online/*
// @match        *://uploadev.org/*
// @match        *://emubliss.com/*
// @match        *://btcon.online/*
// @match        *://blogmado.com/*
// @match        *://doodrive.com/*
// @match        *://modsbase.com/*
// @match        *://modcombo.com/*
// @match        *://atglinks.com/*
// @match        *://linkpayu.com/*
// @match        *://wordcount.im/*
// @match        *://freeat30.org/*
// @match        *://ivnlnews.xyz/*
// @match        *://coinhub.wiki/*
// @match        *://facebook.com/*
// @match        *://autodime.com/*
// @match        *://gamezizo.com/*
// @match        *://mealcold.com/*
// @match        *://gkvstudy.com/*
// @match        *://geotides.net/*
// @match        *://chownest.com/*
// @match        *://mythnest.com/*
// @match        *://gizmoera.com/*
// @match        *://speakzyo.com/*
// @match        *://formshelp.in/*
// @match        *://newspute.com/*
// @match        *://gadialert.in/*
// @match        *://coinsrev.com/*
// @match        *://wp2hostt.com/*
// @match        *://helpdeep.com/*
// @match        *://maqal360.com/*
// @match        *://docadvice.eu/*
// @match        *://gamezigg.com/*
// @match        *://modsfire.com/*
// @match        *://lapviral.com/*
// @match        *://skyrimer.com/*
// @match        *://aiimsopd.com/*
// @match        *://cegen.eu.org/*
// @match        *://infonerd.org/*
// @match        *://expertvn.com/*
// @match        *://spatsify.com/*
// @match        *://exe-urls.com/*
// @match        *://owoanime.com/*
// @match        *://gamco.online/*
// @match        *://hipsonyc.com/*
// @match        *://sharetext.me/*
// @match        *://ecryptly.com/*
// @match        *://equickle.com/*
// @match        *://coincroco.com/*
// @match        *://surflink.tech/*
// @match        *://bestfonts.pro/*
// @match        *://techleets.xyz/*
// @match        *://sharphindi.in/*
// @match        *://nyushuemu.com/*
// @match        *://jioupload.com/*
// @match        *://jobzhub.store/*
// @match        *://crypto-fi.net/*
// @match        *://neverdims.com/*
// @match        *://keeplinks.org/*
// @match        *://aysodamag.com/*
// @match        *://1bitspace.com/*
// @match        *://zegtrends.com/*
// @match        *://junkyponk.com/*
// @match        *://mythvista.com/*
// @match        *://blog-myst.com/*
// @match        *://odiadance.com/*
// @match        *://wastenews.xyz/*
// @match        *://fourlinez.com/*
// @match        *://stockmarg.com/*
// @match        *://jobmatric.com/*
// @match        *://techsl.online/*
// @match        *://blogsward.com/*
// @match        *://playpaste.com/*
// @match        *://jioupload.icu/*
// @match        *://easyshort.xyz/*
// @match        *://besargaji.com/*
// @match        *://thardekho.com/*
// @match        *://fastcars1.com/*
// @match        *://go.linkify.ru/*
// @match        *://easyupload.io/*
// @match        *://mp4upload.com/*
// @match        *://drop.download/*
// @match        *://douploads.net/*
// @match        *://takefile.link/*
// @match        *://sharemods.com/*
// @match        *://desiupload.co/*
// @match        *://thotpacks.xyz/*
// @match        *://7misr4day.com/*
// @match        *://ddownload.com/*
// @match        *://pdfcoffee.com/*
// @match        *://loanifyt.site/*
// @match        *://litecoin.host/*
// @match        *://downfile.site/*
// @match        *://uploadrar.com/*
// @match        *://getpczone.com/*
// @match        *://mediafire.com/*
// @match        *://paid4link.com/*
// @match        *://linkbulks.com/*
// @match        *://themesilk.com/*
// @match        *://link4rev.site/*
// @match        *://geekgrove.net/*
// @match        *://instagram.com/*
// @match        *://cryptorex.net/*
// @match        *://cooklike.info/*
// @match        *://coinilium.net/*
// @match        *://mbantul.my.id/*
// @match        *://carsmania.net/*
// @match        *://petsguide.net/*
// @match        *://gputrends.net/*
// @match        *://carstopia.net/*
// @match        *://coinsrise.net/*
// @match        *://giftmagic.net/*
// @match        *://retrocove.net/*
// @match        *://vaultfind.net/*
// @match        *://lifeprovy.com/*
// @match        *://tastywhiz.com/*
// @match        *://carfocus.site/*
// @match        *://coinscap.info/*
// @match        *://sportweb.info/*
// @match        *://tejtime24.com/*
// @match        *://mazen-ve3.com/*
// @match        *://hosttbuzz.com/*
// @match        *://blogmystt.com/*
// @match        *://thepopxp.shop/*
// @match        *://on-scroll.com/*
// @match        *://horoscop.info/*
// @match        *://minhamoto.com/*
// @match        *://camdigest.com/*
// @match        *://sevayojana.in/*
// @match        *://manga4nx.site/*
// @match        *://trangchu.news/*
// @match        *://techacode.com/*
// @match        *://aztravels.net/*
// @match        *://posterify.net/*
// @match        *://ukrupdate.com/*
// @match        *://writedroid.in/*
// @match        *://proappapk.com/*
// @match        *://greasyfork.org/*
// @match        *://claimcrypto.cc/*
// @match        *://xtrabits.click/*
// @match        *://1shortlink.com/*
// @match        *://panyhealth.com/*
// @match        *://karyawan.co.id/*
// @match        *://marketrook.com/*
// @match        *://kaomojihub.com/*
// @match        *://biharkhabar.co/*
// @match        *://teknoasian.com/*
// @match        *://uploadsoon.com/*
// @match        *://itijobalert.in/*
// @match        *://kiddyshort.com/*
// @match        *://pokoarcade.com/*
// @match        *://financenuz.com/*
// @match        *://bankshiksha.in/*
// @match        *://odiadjremix.in/*
// @match        *://solidcoins.net/*
// @match        *://animerigel.com/*
// @match        *://3rabsports.com/*
// @match        *://dayuploads.com/*
// @match        *://workupload.com/*
// @match        *://rapidgator.net/*
// @match        *://freepreset.net/*
// @match        *://dropgalaxy.com/*
// @match        *://anonymfile.com/*
// @match        *://downloadani.me/*
// @match        *://amanguides.com/*
// @match        *://askpaccosi.com/*
// @match        *://earningtime.in/*
// @match        *://usersdrive.com/*
// @match        *://getknldgg.site/*
// @match        *://kredilerim.com/*
// @match        *://pixeldrain.com/*
// @match        *://dutchycorp.ovh/*
// @match        *://paylinks.cloud/*
// @match        *://get.megafly.in/*
// @match        *://insurelean.com/*
// @match        *://finance240.com/*
// @match        *://fitdynamos.com/*
// @match        *://dataupload.net/*
// @match        *://bitwidgets.net/*
// @match        *://melodyspot.net/*
// @match        *://hobbymania.net/*
// @match        *://gamestopia.net/*
// @match        *://gadgetbuzz.net/*
// @match        *://coinsvalue.net/*
// @match        *://coinstrend.net/*
// @match        *://wiki-topia.com/*
// @match        *://bitcrypto.info/*
// @match        *://raftarwords.in/*
// @match        *://thinksrace.com/*
// @match        *://loopmyhub.shop/*
// @match        *://videoclip.info/*
// @match        *://firefaucet.win/*
// @match        *://videolyrics.in/*
// @match        *://mobcupring.com/*
// @match        *://advupdates.com/*
// @match        *://heygirlish.com/*
// @match        *://mastkhabre.com/*
// @match        *://setroom.biz.id/*
// @match        *://dlgamingvn.com/*
// @match        *://phimsubmoi.com/*
// @match        *://hamroguide.com/*
// @match        *://forex-trnd.com/*
// @match        *://kisalt.digital/*
// @match        *://kongutoday.com/*
// @match        *://camnangvay.com/*
// @match        *://shortfaster.net/*
// @match        *://web9academy.com/*
// @match        *://ourcoincash.xyz/*
// @match        *://financenube.com/*
// @match        *://mixrootmods.com/*
// @match        *://pastescript.com/*
// @match        *://exactpay.online/*
// @match        *://olhonagrana.com/*
// @match        *://blog.yurasu.xyz/*
// @match        *://creditsgoal.com/*
// @match        *://yogablogfit.com/*
// @match        *://newkhabar24.com/*
// @match        *://aiperceiver.com/*
// @match        *://myscheme.org.in/*
// @match        *://biharkhabar.net/*
// @match        *://newsonnline.com/*
// @match        *://alljntuworld.in/*
// @match        *://updatewallah.in/*
// @match        *://vyaapaarguru.in/*
// @match        *://viralmp3.com.in/*
// @match        *://carjankaari.com/*
// @match        *://adz7short.space/*
// @match        *://vahanmitra24.in/*
// @match        *://link2unlock.com/*
// @match        *://fitnesswifi.com/*
// @match        *://earnmoneyyt.com/*
// @match        *://dinoogaming.com/*
// @match        *://financemonk.net/*
// @match        *://encurtacash.com/*
// @match        *://finish.wlink.us/*
// @match        *://watchtheeye.com/*
// @match        *://todogame.online/*
// @match        *://docs.google.com/*
// @match        *://krakenfiles.com/*
// @match        *://file-upload.net/*
// @match        *://uploadhaven.com/*
// @match        *://mega4upload.net/*
// @match        *://ilespayouts.com/*
// @match        *://file-upload.org/*
// @match        *://playnano.online/*
// @match        *://buzzheavier.com/*
// @match        *://michaelemad.com/*
// @match        *://largestpanel.in/*
// @match        *://financebolo.com/*
// @match        *://jansamparks.com/*
// @match        *://financewada.com/*
// @match        *://linkforearn.com/*
// @match        *://wordcounter.icu/*
// @match        *://skyfreeshrt.top/*
// @match        *://playonpc.online/*
// @match        *://2wheelslife.com/*
// @match        *://admediaflex.com/*
// @match        *://financekita.com/*
// @match        *://templeshelp.com/*
// @match        *://atomicatlas.xyz/*
// @match        *://cookinguide.net/*
// @match        *://cinemascene.net/*
// @match        *://plantsguide.net/*
// @match        *://makeupguide.net/*
// @match        *://renovatehub.net/*
// @match        *://techiephone.com/*
// @match        *://render-state.to/*
// @match        *://djbassking.live/*
// @match        *://sportswordz.com/*
// @match        *://remixsounds.com/*
// @match        *://sabkiyojana.com/*
// @match        *://newscrypto.info/*
// @match        *://writeprofit.org/*
// @match        *://trendzilla.club/*
// @match        *://inshortnote.com/*
// @match        *://reidoplacar.com/*
// @match        *://yodharealty.com/*
// @match        *://downloader.tips/*
// @match        *://modmania.eu.org/*
// @match        *://travelinian.com/*
// @match        *://timbertales.xyz/*
// @match        *://hyperkhabar.com/*
// @match        *://freevpshere.com/*
// @match        *://api.gplinks.com/*
// @match        *://financedoze.com/*
// @match        *://adtival.network/*
// @match        *://drive.google.com/*
// @match        *://socialwolvez.com/*
// @match        *://inicerita.online/*
// @match        *://flamebook.eu.org/*
// @match        *://trimorspacks.com/*
// @match        *://tutorialsaya.com/*
// @match        *://zippynest.online/*
// @match        *://sproutworkers.co/*
// @match        *://ac.totsugeki.com/*
// @match        *://financerites.com/*
// @match        *://mpsarkarihelp.in/*
// @match        *://aceforce2apk.com/*
// @match        *://phonesparrow.com/*
// @match        *://creditcarred.com/*
// @match        *://thanks.tinygo.co/*
// @match        *://short.croclix.me/*
// @match        *://techkhulasha.com/*
// @match        *://shorturlearn.xyz/*
// @match        *://blog.adscryp.com/*
// @match        *://dailyuploads.net/*
// @match        *://imagereviser.com/*
// @match        *://tempatwisata.pro/*
// @match        *://cryptomonitor.in/*
// @match        *://djremixganna.com/*
// @match        *://minimonetize.com/*
// @match        *://dutchycorp.space/*
// @match        *://learncrypto.blog/*
// @match        *://yolasblog.online/*
// @match        *://skyfreecoins.top/*
// @match        *://webfreetools.net/*
// @match        *://playallgames.net/*
// @match        *://ecofriendlyz.com/*
// @match        *://brewmasterly.com/*
// @match        *://insurancegold.in/*
// @match        *://healthylifez.com/*
// @match        *://sekilastekno.com/*
// @match        *://majalahhewan.com/*
// @match        *://article24.online/*
// @match        *://servicemassar.ma/*
// @match        *://paidinsurance.in/*
// @match        *://nishankhatri.xyz/*
// @match        *://masrawytrend.com/*
// @match        *://blog.klublog.com/*
// @match        *://toilaquantri.com/*
// @match        *://lajangspot.web.id/*
// @match        *://wellness4live.com/*
// @match        *://triggeredplay.com/*
// @match        *://minhapostagem.top/*
// @match        *://bloggingwow.store/*
// @match        *://lakhisarainews.in/*
// @match        *://fishingbreeze.com/*
// @match        *://lyricsbaazaar.com/*
// @match        *://carbikenation.com/*
// @match        *://fileresources.net/*
// @match        *://jobinmeghalaya.in/*
// @match        *://dramaticqueen.com/*
// @match        *://usanewstoday.club/*
// @match        *://galaxy-link.space/*
// @match        *://playarcade.online/*
// @match        *://vitalityvista.net/*
// @match        *://newsobjective.com/*
// @match        *://cryptowidgets.net/*
// @match        *://ountriesguide.net/*
// @match        *://wanderjourney.net/*
// @match        *://virtuous-tech.net/*
// @match        *://freeoseocheck.com/*
// @match        *://funplayarcade.com/*
// @match        *://origamiarthub.com/*
// @match        *://fitbodygenius.com/*
// @match        *://dailytech-news.eu/*
// @match        *://drinkspartner.com/*
// @match        *://raftarsamachar.in/*
// @match        *://fansonlinehub.com/*
// @match        *://insurancemyst.com/*
// @match        *://down.mdiaload.com/*
// @match        *://go.paylinks.cloud/*
// @match        *://social-unlock.com/*
// @match        *://howtoconcepts.com/*
// @match        *://handydecor.com.vn/*
// @match        *://headlinerpost.com/*
// @match        *://dinheiromoney.com/*
// @match        *://writedroid.eu.org/*
// @match        *://healthfirstweb.com/*
// @match        *://goodmorningimg.com/*
// @match        *://pagalworldsong.com/*
// @match        *://passivecryptos.xyz/*
// @match        *://faucetsatoshi.site/*
// @match        *://forex-articles.com/*
// @match        *://offeergames.online/*
// @match        *://financenova.online/*
// @match        *://link.freebtc.my.id/*
// @match        *://ecosolardigest.com/*
// @match        *://countriesguide.net/*
// @match        *://homesteadfeast.com/*
// @match        *://pubghighdamage.com/*
// @match        *://anmolbetiyojana.in/*
// @match        *://policiesreview.com/*
// @match        *://techxploitz.eu.org/*
// @match        *://down.fast-down.com/*
// @match        *://cryptoblast.online/*
// @match        *://worldwallpaper.top/*
// @match        *://placementsmela.com/*
// @match        *://sastainsurance.xyz/*
// @match        *://carbikesupdate.com/*
// @match        *://importantclass.com/*
// @match        *://topgeninsurance.com/*
// @match        *://healthvainsure.site/*
// @match        *://retrotechreborn.com/*
// @match        *://thecryptoworld.site/*
// @match        *://techreviewhub.store/*
// @match        *://tvseriescentral.net/*
// @match        *://languagefluency.net/*
// @match        *://insurancexguide.com/*
// @match        *://constructorspro.com/*
// @match        *://studywithsanjeet.in/*
// @match        *://todayheadliners.com/*
// @match        *://cialisstrong.online/*
// @match        *://thunder-appz.eu.org/*
// @match        *://superheromaniac.com/*
// @match        *://bestloansoffers.com/*
// @match        *://travelironguide.com/*
// @match        *://baristakesehatan.com/*
// @match        *://cryptonewssite.rf.gd/*
// @match        *://keedabankingnews.com/*
// @match        *://knowiz0.blogspot.com/*
// @match        *://furtnitureplanet.net/*
// @match        *://selfcareinsights.com/*
// @match        *://advertisingcamps.com/*
// @match        *://mangareleasedate.com/*
// @match        *://cryptosparatodos.com/*
// @match        *://mobileflashtools.com/*
// @match        *://akash.classicoder.com/*
// @match        *://cryptorotator.website/*
// @match        *://utkarshonlinetest.com/*
// @match        *://sololevelingmanga.pics/*
// @match        *://swachataparnibandh.com/*
// @match        *://wp.thunder-appz.eu.org/*
// @match        *://insuranceleadsinfo.com/*
// @match        *://historyofyesterday.com/*
// @match        *://illustrationmaster.com/*
// @match        *://onlinetechsolution.link/*
// @match        *://arkarinaukrinetwork.com/*
// @match        *://encurtadorcashlinks.com/*
// @match        *://virtualrealitieshub.com/*
// @match        *://shortlinks2btc.somee.com/*
// @match        *://programasvirtualespc.net/*
// @match        *://cryptonews.faucetbin.com/*
// @match        *://loanforuniversity.online/*
// @match        *://businesssoftwarehere.com/*
// @match        *://maloma3arbi.blogspot.com/*
// @match        *://easylink.gamingwithtr.com/*
// @match        *://thepragatishilclasses.com/*
// @match        *://softwaresolutionshere.com/*
// @match        *://governmentjobvacancies.com/*
// @match        *://mukhyamantriyojanadoot.com/*
// @match        *://autofaucet.dutchycorp.space/*
// @icon         https://i.ibb.co/qgr0H1n/BASS-Blogger-Pemula.png
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_download
// @grant        GM_addStyle
// @grant        GM_openInTab
// @grant        GM_addElement
// @grant        GM_deleteValue
// @grant        GM_registerMenuCommand
// @grant        GM_addValueChangeListener
// @run-at       document-start
// @noframes
// ==/UserScript==
/*
TODO: Make the match rules more specific for popular websites.
TOP 10 (google, youtube, facebook, instagram.com, tiktok.com, vk.com, t.me, drive.google.com, docs.google.com, mediafire.com) 

// @match        *://shrinke.w+/*
// @match        *://noodlemagazine.com/*
*/
const scriptId = '431691-bypass-all-shortlinks';
const window = unsafeWindow;
const {
    href: currentUrl,
    pathname,
    host,
    search,
    hash
} = location;
const queryParams = new URLSearchParams(search);
class ConfigUI {
    constructor(options) {
        this.id = options.id || "myConfigIframe";
        this.title = options.title || "Settings";
        this.fields = options.fields || [];
        this.contributors = options.contributors || [];
    }

    open() {
        document.getElementById(this.id)?.remove();

        const overlay = document.createElement("div");
        overlay.style = `
            position:fixed; z-index:9999;
            top:0; left:0; width:100%; height:100%;
            background:rgba(0,0,0,0.5);
        `;
        document.body.appendChild(overlay);

        const iframe = document.createElement('iframe');
        iframe.id = this.id;
        iframe.style = `
            position: fixed;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            width: 60%; height: 80%;
            border: 1px solid #ccc;
            border-radius: 8px;
            box-shadow: 0 0 15px rgba(0,0,0,0.5);
            z-index: 10000; background:#fff;
        `;
        document.body.appendChild(iframe);

        const doc = iframe.contentDocument || iframe.contentWindow.document;
        doc.body.innerHTML = `
        <style>
            body { font-family: Arial,sans-serif; margin:20px; color:#333; overflow-y:auto; }
            .highlight { font-weight:bold; color:#d9534f; margin-top:20px; }
            button { margin-top:10px; padding:5px 10px; cursor:pointer; }
            footer ul { padding-left:0; list-style:none; }
            a { color:#007BFF; text-decoration:none; }
            footer { margin-top:20px; font-size:0.9em; }
            label { display:block; margin:10px 0; }
            a:hover { text-decoration:underline; }
        </style>
        <h2>${this.title}</h2>
        <form id="cfg_form"></form>
        <p class="highlight">Please respect if my scripts are useful for you:</p>
        <ul>
            <li>Support Me Via <a href="https://saweria.co/Bloggerpemula" target="_blank">https://saweria.co/Bloggerpemula</a> or Crypto</li>
            <li>Don't try to copy-paste my scripts and share as your own.</li>
            <li>Please don't remove or change my blog.</li>
            <li>Disable your AdBlock on my blog. Thanks for your support!</li>
        </ul>
        <footer>
            <h3>Credits & Contributors</h3>
            <ul id="contributors"></ul>
            Also, thank you to everyone who has contributed with good feedback and to all donors who supported the project.
        </footer>`;

        const form = doc.getElementById("cfg_form");

        this.fields.forEach(f => {
            const val = GM_getValue(f.key, f.default || "");
            const label = document.createElement("label");
            label.textContent = f.label || f.key;
            form.appendChild(label);

            let input = document.createElement("input");
            if (f.type === "checkbox") input.checked = val;
            else input.value = val;

            input.type = f.type;
            input.id = "cfg_" + f.key;
            label.appendChild(input);
        });

        const saveBtn = document.createElement("button");
        saveBtn.textContent = "Save";
        form.appendChild(saveBtn);

        const cancelBtn = document.createElement("button");
        cancelBtn.textContent = "Cancel";
        cancelBtn.style.marginLeft = "10px";
        form.appendChild(cancelBtn);

        const ul = doc.getElementById("contributors");
        this.contributors.forEach(c => {
            let name, desc;
            if (typeof c === "string") {
                name = c;
            } else {
                name = c.name;
                desc = c.desc;
            }
            const li = document.createElement("li");
            li.innerHTML = `<a href="https://greasyfork.org/users?q=${name}" target="_blank">@${name}</a>${desc ? ' - ' + desc : ''}`;
            ul.appendChild(li);
        });

        const close = () => [overlay, iframe].forEach(e => e.remove());

        saveBtn.addEventListener("click", () => {
            let el, val;
            this.fields.forEach(f => {
                el = doc.getElementById("cfg_" + f.key);
                val = f.type === "checkbox" ? el.checked : el.value;
                GM_setValue(f.key, val);
            });
            close();
        });

        cancelBtn.addEventListener("click", close);
        overlay.addEventListener("click", close);
    }

    get(key) {
        const f = this.fields.find(f => f.key === key);
        return GM_getValue(key, f ? f.default : null);
    }
}
const checkbox = (key, label) => ({
    key,
    label,
    default: false,
    type: 'checkbox'
});
const config = new ConfigUI({
    fields: [
        checkbox('AutoDL', 'Auto-Download on Supported Sites'),
        checkbox('Cmenu', 'Allow Context Menu'),
        checkbox('Prompt', 'Disable Prompts & Notifications'),
        checkbox('BlockFC', 'BlockFC'),
        checkbox('Flickr', 'Flickr'),
        checkbox('noAdb', 'Disable Adblock Detections')
    ],
    contributors: ['Konf', 'hacker09', 'juansi', 'NotYou', 'cunaqr', 'Rust1667', {
        name: 'varram',
        desc: 'provided great bypass sites'
    }]
});
GM_registerMenuCommand("⚙️ Script Settings", () => config.open());
GM_registerMenuCommand('📊 Script Metrics', async function() {
    const url = `https://api.greasyfork.org/scripts/${scriptId}/stats.json`;
    const data = await fetch(url).then(response => response.json());
    let totalInstalls = 0,
        totalUpdateChecks = 0,
        daysCount = 0;

    for (const date in data) {
        const stats = data[date];
        totalInstalls += stats.installs;
        totalUpdateChecks += stats.update_checks;
        daysCount++;
    }
    const averageInstalls = (totalInstalls / daysCount).toFixed(2);
    const averageUpdateChecks = (totalUpdateChecks / daysCount).toFixed(2);

    alert(
        'Total Days: ' + daysCount + '\n' +
        'Total Installs: ' + totalInstalls + '\n' +
        'Total Update Checks: ' + totalUpdateChecks + '\n' +
        'Average Installs per Day: ' + averageInstalls + '\n' +
        'Average Update Checks per Day: ' + averageUpdateChecks
    );
});
GM_registerMenuCommand('🐞 Bug Report', function() {
    const url = `https://greasyfork.org/en/scripts/${scriptId}/feedback?attachLogs=1#new-script-discussion`;
    GM_openInTab(url, {
        active: true,
        insert: true
    });
});

let hostRunCounter = 0;

function GM_onMessage(label, callback = () => {}) {
    logger.log('GM_onMessage is on');
    GM_addValueChangeListener('postMessage-' + label, function(_, _, newValue, remote) {
        logger.log('inside postMessage')
        if (remote) {
            logger.log('inside postMessage value', {
                newValue
            })
            callback(newValue);
            GM_deleteValue('postMessage-' + label);
        }
    });
}

function GM_sendMessage(label, value) {
    GM_setValue('postMessage-' + label, value);
}

String.prototype.getBetween = function(start, end) {
    const regex = new RegExp(`(?<=${start}).*?(?=${end})`, 'g');
    const matches = this.match(regex);
    return matches ? matches[0] : '';
};

function setActiveElement(selector) {
    waitForElement(selector)
        .then(element => {
            const temp = element.tabIndex;
            element.tabIndex = 0;
            element.focus();
            element.tabIndex = temp;
        });
    Object.defineProperty(document, 'hidden', {
        get: () => true,
        configurable: true
    });
}
// Element.prototype.setActive = function() {
//     const tempTabIndex = this.tabIndex;
//     this.tabIndex = 0;
//     this.focus();
//     this.tabIndex = tempTabIndex;
//     Object.defineProperty(document, 'hidden', {
//         get: () => true,
//         configurable: true
//     });
// };
function RSCookie(name, value = undefined, days = null) {
    if (!name) return null;

    // --- SET MODE ---
    if (value !== undefined) {
        let expires = '';
        if (typeof days === 'number') {
            const date = new Date();
            date.setTime(date.getTime() + (days * 86400000));
            expires = `; expires=${date.toUTCString()}`;
        }

        document.cookie = `${encodeURIComponent(name)}=${encodeURIComponent(value)}${expires}; path=/`;
        return true;
    }

    // --- READ MODE ---
    const cookies = document.cookie.split(';').map(c => c.trim());
    const cookie = cookies.find(c => c.startsWith(encodeURIComponent(name) + '='));
    return cookie ? decodeURIComponent(cookie.split('=')[1]) : null;
}

function captchaSolved(callback, onWait = () => {}) {
    let intervalId;
    const stopChecking = () => clearInterval(intervalId);

    waitForElement('//div[contains(@class, \'iconcaptcha-modal__body-title\') and normalize-space(text())=\'Verification complete.\'] | //*[@id=\'captcha-result\' and normalize-space()=\'Verified!\']')
        .then(function() {
            stopChecking();
            callback();
        })
    const checkCaptcha = () => {
        try {
            const captcha = window.turnstile || window.hcaptcha || window.grecaptcha;
            const response = captcha.getResponse();

            if (response) {
                stopChecking();
                callback();
            }
        } catch (error) {
            onWait(stopChecking);
        }
    };

    checkCaptcha();
    intervalId = setInterval(checkCaptcha, 1000);
}

function httpListener(callback) {
    const originalOpen = XMLHttpRequest.prototype.open;
    XMLHttpRequest.prototype.open = function(method, url) {
        this.addEventListener('load', () => {
            this.method = method;
            this.url = url;
            callback(this);
        });
        originalOpen.apply(this, arguments);
    };
}

function waitForElement(selector, timeout = 0) {
    const findElement = () => {
        if (selector.startsWith('//')) {
            return document.evaluate(selector, document, null, 9).singleNodeValue;
        }
        return document.querySelector(selector);
    };

    return new Promise(async (resolve, reject) => {
        let element = findElement();
        if (document.contains(element)) {
            return resolve(element);
        }
        const observer = new MutationObserver(() => {
            element = findElement();
            if (document.contains(element)) {
                observer.disconnect();
                resolve(element);
            }
        });
        observer.observe(document.documentElement, {
            // attributes: true,
            childList: true,
            subtree: true,
        });
        if (timeout > 0) {
            await waitSec(timeout)
            observer.disconnect();
            reject(new Error(`Element '${selector}' not found in time.`));
        }
    })
}

function openWithReferrerPolicy(href) {
    GM_addElement(document.head, 'meta', {
        name: 'referrer',
        content: 'origin'
    })
    const element = GM_addElement('a', {
        href
    })
    element.click();
}

function waitSec(s) {
    return new Promise(r => setTimeout(r, s * 1000));
}

function imporveRegex(pattern) {
    //TODO: Convert everything into an array and detect patterns in order to minimize the regex as much as possible.
}

function expandRegex(str) {
    if (!str.includes('(')) return [str];

    const m = str.match(/\(([^)]+)\)/);
    if (!m) return [str];

    const [full, options] = m;
    const parts = options.split('|');

    return parts.flatMap(opt => expandRegex(str.replace(full, opt)));
}

function runIfHost(pattern, fn, ...args) {
    const includes = GM_info?.script?.includes;
    const debugging = false;

    if (includes && debugging) { //TODO: Improve
        const all = includes.flatMap(expandRegex);
        const curr = expandRegex(pattern);
        const missing = curr.filter(h => !all.includes(h));

        if (missing.length) {
            logger.warn('⚠️ Host matched pattern but not in @include list!', {
                host: host,
                missing,
                includes,
            });
            alert('Found new host(s) not in @include: ' + missing.join(', '));
        }
    }

    // const res = imporveRegex()
    // if (res.length < pattern.length) alert('found new regex '+res);
    const isMatch = new RegExp(pattern).test(host);
    if (!isMatch) return; //RegExp.escape

    hostRunCounter += 1;

    logger.info('Function triggered', {
        count: hostRunCounter,
        pattern,
        fn: fn.name || fn.toString(),
        args
    });

    fn(...args);
}

function goTo(url, useBlog = false) {
    const target = useBlog ? `${GM_info.script.namespace}?BypassResults=${url}` : url;
    logger.info('goTo', {
        target
    })
    location = target
}

function createGMLogger(options = {}) {
    const logs = [];
    const maxLogs = options.maxLogs || 200;
    const gmKey = options.gmKey || 'tm_logs';

    function _saveLog(entry) {
        logs.push(entry);
        if (logs.length > maxLogs) logs.shift();
        GM_setValue(gmKey, logs);
    }

    function formatAndStoreLog(level, ...args) {
        const time = new Date().toLocaleTimeString();
        const message = args.map(arg =>
            (typeof arg === 'object' && arg !== null) ? JSON.stringify(arg) : String(arg)
        ).join(' ');
        const entry = `${host}: [${time}] [${level.toUpperCase()}] ${message}`;
        console[level](entry);
        _saveLog(entry);
    }

    return {
        log: (...args) => formatAndStoreLog('log', ...args),
        info: (...args) => formatAndStoreLog('info', ...args),
        warn: (...args) => formatAndStoreLog('warn', ...args),
        error: (...args) => formatAndStoreLog('error', ...args),
        getLogs: () => [...(GM_getValue(gmKey, []))],
        clearLogs: () => {
            logs.length = 0;
            GM_deleteValue(gmKey);
            console.log('Logs cleared');
        }
    };
}

const logger = new createGMLogger();

async function elementRedirect(selector, attribute = 'href') {
    logger.info('elementRedirect triggered', {
        selector
    });
    const selectors = selector.split(', ');

    if (selectors.length > 1) {
        for (const sel of selectors) elementRedirect(sel, attribute);
        return;
    }

    const element = await waitForElement(selector);
    const target = element.getAttribute(attribute);
    logger.info('Redirecting to element attribute', {
        selector,
        target,
        attribute
    });
    goTo(target);
}

function parameterRedirect(url, parameters) {
    // parameters = parameters.split(','); 
    // if (parameters.every(parameter => searchParams.has(parameter)))
    if (parameters !== undefined && !queryParams.has(parameters)) return;

    const link = url.replace(/\$(.*)/, (_, p) => {
        const [paramName, queryString] = p.split(/\?/);
        const paramValue = queryParams.get(paramName);

        if (!paramValue) return _;

        return /([A-Za-z0-9]+=)$/.test(paramValue) ?
            atob(paramValue) :
            paramValue + (queryString ? '?' + queryString : '');
    });

    if (link !== url) goTo(link);
}

const referrerPolicy = (key) => queryParams.has(key) && openWithReferrerPolicy(atob(queryParams.get(key)));

async function clickSel(selector, delay = 0) {
    const selectors = selector.split(', ');

    if (selectors.length > 1) {
        for (const sel of selectors) clickSel(sel, delay);
        return;
    }

    const element = await waitForElement(selector);
    if (delay > 0) {
        logger.info('wait before clicking on element', {
            delay
        });
        await waitSec(delay);
    }
    element.removeAttribute('disabled');
    element.removeAttribute('target');
    //TODO REMOVE ONCLICK
    if (element.tagName === 'FORM') {
        element.submit();
        logger.info('Form submitted', {
            selector
        });
    } else {
        logger.info('Clicked on element ', {
            selector
        });
        // element.click();
        ['mouseover', 'mousedown', 'mouseup', 'click'].forEach(name => {
            element.dispatchEvent(new MouseEvent(name, {
                bubbles: true,
                cancelable: true
            }));
        });
    }
}
// Any code repeated over 50 times should be moved into a separate function, or replaced with a more general function that handles most cases with minimal changes.
// Documentation should also be added, making it easier for other developers to contribute code and enabling AI to utilize both the code and the documentation to ensure proper integration with the system.
const redirectIfHost = (pattern, selector, attribute) => runIfHost(pattern, elementRedirect, selector, attribute);
const clickIfHost = (pattern, selector) => runIfHost(pattern, clickSel, selector);
const autoDownloadIfHost = (pattern, fn, ...args) => config.get('AutoDL') && runIfHost(pattern, fn, ...args);
const clickAfterCaptcha = (selector) => captchaSolved(() => clickSel(selector));

// All of these functions need to be more specific.
runIfHost('.*', async function() {
    if (!config.get('Prompt')) return;
    logger.info('Prompt handling enabled');

    window.alert = () => {};
    window.confirm = () => true;
    window.prompt = () => null;
    if (window.Notification) {
        Notification.requestPermission = () => Promise.resolve('denied');
        Object.defineProperty(window, 'Notification', {
            value: null,
            writable: false
        });
    }
    const selectors = [];

    function helper(type, list) {
        const items = list.split(', ').map(item => `[${type}*='${item}']`);
        selectors.push(...items)
    }
    helper('class', 'cookie, gdpr, notice, privacy, banner, consent');
    helper('id', 'cookie, gdpr, notice, privacy, banner, consent');
    helper('role', 'dialog');
    helper('aria-label', 'cookie, consent, privacy')

    // Currently waiting for a single element; might need to change this later
    const element = await waitForElement(selectors.join(', '));
    const isBanner = element.textContent.match(/cookie|consent|tracking|gdpr|privacy|accept|agree|decline|manage|preferences/i)
    isBanner && element.remove();
})
runIfHost('.*', function() {
    if (!config.get('BlockFC')) return;
    logger.info('focus handling enabled');

    // window.mouseleave = true;
    // window.onmouseover = true;
    // document.hasFocus = () => true;

    Object.defineProperty(document, 'webkitVisibilityState', {
        get: () => 'visible',
        configurable: true
    });
    Object.defineProperty(document, 'visibilityState', {
        get: () => 'visible',
        configurable: true
    });
    Object.defineProperty(document, 'hidden', {
        get: () => false,
        configurable: true
    });

    const eventOptions = {
        capture: true,
        passive: true
    };
    window.addEventListener('focus', e => e.stopImmediatePropagation(), eventOptions);
    window.addEventListener('blur', e => e.stopImmediatePropagation(), eventOptions);
})
runIfHost('.*', function() {
    if (!config.get('noAdb')) return;
    logger.info('noAdb');
    const blockPattern = /(adblock(reg)?|adb(model)?|checkadblock|detect(anyadb|adblock)|justdetectadb|fuckadblock|testadblock|disable(devtools)?|devtools)/i;
    const re = new RegExp(blockPattern);
    const observer = new MutationObserver(mutations => {
        mutations.forEach(mutation => {
            mutation.addedNodes.forEach(node => {
                if (node.nodeType === 1 && /SCRIPT|IFRAME/.test(node.tagName)) {
                    const source = node.src || node.textContent || '';
                    re.test(source) && node.remove();
                }
            });
        });
    });
    observer.observe(document, {
        childList: true,
        subtree: true
    });
    document.querySelectorAll('script, iframe').forEach(element => {
        const source = element.src || element.textContent || '';
        re.test(source) && element.remove();
    })
})
//

//All the code below have been tested and should work.
{
    runIfHost('flickr.com', async () => {
        if (!config.get('Flickr')) return;

        const photoId = currentUrl.match(/\d+/)
        if (!photoId) return;

        const flickrSizes = {
            sq: 'Square 75',
            q: 'Square 150',
            t: 'Thumbnail',
            s: 'Small 240',
            n: 'Small 320',
            w: 'Small 400',
            m: 'Medium 500',
            z: 'Medium 640',
            c: 'Medium 800',
            l: 'Large 1024',
            h: 'Large 1600',
            k: 'Large 2048',
            '3k': 'X-Large 3K',
            '4k': 'X-Large 4K'
        };
        const sizesContainer = await waitForElement('.sizes');

        Object.entries(flickrSizes).forEach(([key, label]) => {
            const element = GM_addElement(sizesContainer, 'li', {
                class: 'download-size-item',
                // textContent: label
            });
            const a = GM_addElement(element, 'a', {
                href: 'javascript:void(0)',
                class: 'download-image-size'
            })
            GM_addElement(a, 'span', {
                class: 'label',
                textContent: label
            })
            element.addEventListener('click', async function() {
                const url = `https://www.flickr.com/photos/zedzap/${photoId}/sizes/${key}/`;
                const html = await fetch(url).then(response => response.text());
                const res = html.match(/<img src="https:\/\/live.staticflickr.com\/(.*)">/);
                GM_download('https://live.staticflickr.com/' + res[1], `BloggerP_${photoId}_${label}.jpeg`);
            });
        });
    });
    runIfHost('drive.google.com', () => {
        const id = currentUrl.split('/').slice(-2)[0];
        if (currentUrl.includes('/file/d/')) {
            goTo(`https://drive.usercontent.google.com/download?id=${id}&export=download`);
        } else if (currentUrl.includes('/u/0/uc?id')) {
            clickSel('#download-form');
        }
    });
    runIfHost('adbtc.top', async () => {
        window.onbeforeunload = () => {
            window?.myWindow.close();
            window?.coinwin?.close();
            window.coinwin = {};
        };
        clickAfterCaptcha('input[class^=btn]');
        clickSel('div.col.s4 > a:not(.hide)', 1);
    });
    runIfHost('.*', function() {
        if (!config.get('Cmenu')) return;
        logger.info('RightFCL is Enabled');
        const events = [
            'contextmenu', 'copy', 'cut', 'paste',
            'select', 'selectstart', 'dragstart', 'drop'
        ];
        for (const eventName of events) {
            document.addEventListener(eventName, e => e.stopImmediatePropagation(), true);
        }
    });
    runIfHost('greasyfork.org', async function() {
        const currentId = currentUrl.match(/\d+/);
        if (currentId != scriptId.match(/\d+/)[0] || !queryParams.has('attachLogs')) {
            return;
        }

        const comment = await waitForElement('.comment-entry');
        comment.value += '<b>Explain the issue:</b>\n\n\n<b>Logs:</b>\n' + logger.getLogs().join('\n')
    });
}
//end of "All the code below have been tested and should work."
// Not tested, but should work since the logic hasn’t changed much
{
    runIfHost('aylink.co|cpmlink.pro', async () => {
        clickSel('.btn.btn-go, .btn-go');
        const element = await waitForElement('#main');
        goTo(element.getAttribute('onclick').getBetween('window.open\(', '\)'));
    });
    runIfHost('bewbin.com', async () => {
        const element = await waitForElement('.wpsafe-top > script:nth-child(4)');
        goTo('https://bewbin.com?safelink_redirect=' + element.textContent.getBetween('window.open(\'https://bewbin.com?safelink_redirect=', '\')'));
    });
    runIfHost('lajangspot.web.id', async () => {
        const element = await waitForElement('#wpsafe-link > script:nth-child(2)');
        goTo('https://lajangspot.web.id?safelink_redirect=' + element.textContent.getBetween('window.open(\'https://lajangspot.web.id?safelink_redirect=', '\')'));
    });
    redirectIfHost('adfoc.us', '.skip');
    redirectIfHost('lanza.me', 'a#botonGo');
    redirectIfHost('lolinez.com', 'p#url a');
    redirectIfHost('coincroco.com|surflink.tech|cointox.net', '.mb-sm-0.mt-3.btnBgRed');
    redirectIfHost('8tm.net', 'a.btn.btn-secondary.btn-block.redirect');
    redirectIfHost('bestfonts.pro', '.download-font-button > a:nth-child(1)');
    redirectIfHost('cpmlink.net', 'a#btn-main.btn.btn-warning.btn-lg');
    redirectIfHost('noodlemagazine.com', 'a#downloadLink.downloadBtn');
    redirectIfHost('mirrored.to', 'div.col-sm.centered.extra-top a, div.centerd > a');
    redirectIfHost('mohtawaa.com', 'a.btn.btn-success.btn-lg.get-link.enabled');
    redirectIfHost('(techleets|bonloan).xyz|sharphindi.in|nyushuemu.com', 'a#tp-snp2');
    redirectIfHost('linksly.co', 'div.col-md-12 a');
    redirectIfHost('surl.li|surl.gd', '#redirect-button');
    runIfHost('socialwolvez.com', async () => {
        const url = `https://us-central1-social-infra-prod.cloudfunctions.net/linksService/link/guid/${pathname.substr(7)}`;
        const data = await fetch(url).then(response => response.json());
        goTo(data.link.url);
    });
    runIfHost('(wellness4live|akash.classicoder).com|2the.space|inicerita.online', async () => {
        const element = await waitForElement('#landing');
        const data = JSON.parse(atob(element.newwpsafelink.value));
        goTo(data.linkr);
    });
    runIfHost('jioupload.com', async () => {
        function calculateAnswer(text) {
            const parts = text.replace('Solve:', '').replace(/[=?]/g, '').trim().split(/\s+/);
            const [num1, op, num2] = [parseInt(parts[0]), parts[1], parseInt(parts[2])];
            return op === '+' ? num1 + num2 : num1 - num2;
        }
        clickSel('form button.btn-secondary');
        elementRedirect('a.btn.btn-secondary[href*=\'/file/\']');
        const element = await waitForElement('#challenge');
        const input = await waitForElement('#captcha');
        input.value = calculateAnswer(element.textContent);
        clickSel('button[type=\'submit\']');
    });
    runIfHost('apkw.ru', () => currentUrl.includes('/away') && goTo(atob(currentUrl.split('/').slice(-1))));
    runIfHost('4fnet.org', () => currentUrl.includes('/goto') && goTo(atob(currentUrl.split('/').slice(-1))));
    runIfHost('anonym.ninja', () => currentUrl.includes('download/') && goTo(`https://anonym.ninja/download/file/request/${currentUrl.split('/').slice(-1)[0]}`));
    runIfHost('vk.com', () => queryParams.has('to') && currentUrl.includes('/away.php') && goTo(decodeURIComponent(queryParams.get('to'))));
    runIfHost('filedm.com', async () => {
        const element = await waitForElement('#dlbutton');
        goTo(`http://cdn.directfiledl.com/getfile?id=${element.href.split('_')[1]}`);
    });
    runIfHost('flamebook.eu.org', async () => {
        // Probably not needed, but without the link I can’t be sure
        for (const selector of ['#button1', '#button2', '#button3'])
            await clickSel(selector, 3);
    });
    runIfHost('jobzhub.store', async () => {
        clickSel('#surl');
        await waitForElement('#next');
        window.startCountdown();
        clickSel('form.text-center', 'submit', 15);
    });
    runIfHost('enlacito.com', async () => {
        await waitSec(2);
        window?.DYykkzwP && goTo(window.DYykkzwP);
    });
    runIfHost('paycut.pro', () => {
        if (currentUrl.includes('/ad/')) {
            goTo(currentUrl.replace('ad/', ''));
        }
    });
    runIfHost('triggeredplay.com', () => {
        if (currentUrl.includes('#')) {
            const usp = new URLSearchParams(hash.substring(1));
            usp.has('url') && goTo(atob(usp.get('url')));
        }
    });
    runIfHost('shortfaster.net', () => {
        const twoMinutesAgo = Date.now() - 2 * 60 * 1000;
        localStorage.setItem('lastRedirectTime_site1', twoMinutesAgo.toString());
    });
    runIfHost('onlinetechsolution.link', async () => {
        const element = await waitForElement('input[name=newwpsafelink]');
        const data = JSON.parse(atob(element.value));
        goTo(data.linkr);
    });
    runIfHost('crypto-fi.net|claimcrypto.cc|xtrabits.click|(web9academy|bioinflu|bico8).com|(ourcoincash|studyis).xyz', async () => {
        const element = await waitForElement('#landing [name=\'go\']');
        const target = atob(`aH${element.value.split('aH').slice(1).join('aH')}`);
        goTo(target);
    });
    runIfHost('rekonise.com', async () => {
        const url = `https://api.rekonise.com/social-unlocks${pathname}`;
        const data = await fetch(url).then(response => response.json());
        goTo(data.url);
    });
    runIfHost('boost.ink', async () => {
        const html = await fetch(currentUrl).then(response => response.text());
        goTo(atob(html.split('bufpsvdhmjybvgfncqfa=\'\')[1].split(\'\'')[0]));
    });
    runIfHost('yitarx.com', () => currentUrl.includes('enlace/') && goTo(atob(atob(atob(currentUrl.split('#!')[1])))));
    runIfHost('m.flyad.vip', async () => {
        const display = await waitForElement('#captchaDisplay');
        const input = await waitForElement('#captchaInput');
        input.value = display.innerText;
        clickSel('button[onclick=\'validateCaptcha()\']');
    });
    runIfHost('(financenube|mixrootmods|pastescript|trimorspacks).com', async () => {
        const element = await waitForElement('#wpsafe-link a');
        goTo(element.getAttribute('onclick').getBetween('window.open(\'', '\', \'_self\')'));
    });
    runIfHost('(aduzz|tutorialsaya|baristakesehatan|merekrut).com|deltabtc.xyz|bit4me.info', async () => {
        const element = await waitForElement('div[id^=wpsafe] > a[rel=nofollow]');
        goTo(element.getAttribute('onclick').getBetween('window.open(\'', '\', \'_self\')'));
    });
    runIfHost('mboost.me', async () => {
        await waitForElement('#firstsection'); // If there is a link, check whether this line is needed.
        const element = await waitForElement('#__NEXT_DATA__');
        const target = JSON.parse(element.textContent).props.pageProps.data.targeturl;
        goTo(target)
    });
    runIfHost('earnbee.xyz|zippynest.online|getunic.info', () => {
        localStorage.setItem('earnbee_visit_data', JSON.stringify({
            firstUrl: currentUrl,
            timestamp: Date.now() - 180000
        }));
    });
    runIfHost('exactpay.online|neverdims.com|sproutworkers.co', async () => {
        window.onscroll = () => {};
        window.check2();
        const element = await waitForElement('[name=\'answer\']');
        element.addEventListener('change', window.check3);
    });
}
// end of "Not tested, but should work since the logic hasn’t changed much"
// Some of the click scripts may not work because they rely on outdated selectors referencing other elements. Each such script will need to be reviewed and updated.
clickIfHost('the2.link', '#get-link-btn');
clickIfHost('keeplinks.org', '#btnchange');
clickIfHost('forex-22.com', '#continuebutton');
clickIfHost('1shortlink.com', '#redirect-link');
clickIfHost('1ink.cc|cuturl.cc', '#countingbtn');
clickIfHost('1short.io', '#countDownForm');
clickIfHost('disheye.com', '#redirectForm');
clickIfHost('aysodamag.com', '#link1s-form');
clickIfHost('cryptonewssite.rf.gd', '#dynamic-button a');
clickIfHost('1bitspace.com', '.button-element-verification');
clickIfHost('cshort.org', '.timer.redirect');
clickIfHost('ac.totsugeki.com', '.btn-lg.btn-success.btn');
clickIfHost('revlink.pro', '#main-content-wrapper > button');
clickIfHost('panyhealth.com', 'form[method=\'get\']');
clickIfHost('minhapostagem.top', '#alf_continue.alf_button');
clickIfHost('karyawan.co.id', 'button#btn.bg-blue-100.text-blue-600');
clickIfHost('yoshare.net|olhonagrana.com', '#yuidea, #btn6');
clickIfHost('slink.bid', '.btn-success.btn, #btn-generate');
clickIfHost('blog.yurasu.xyz', '#wcGetLink, #gotolink');
clickIfHost('zegtrends.com', '#cln, #bt1, #go');
clickIfHost('creditsgoal.com', '#tp-snp2, //button[normalize-space(text())=\'Continue\']');
clickIfHost('(howifx|vocalley|financerites|yogablogfit|healthfirstweb|junkyponk|mythvista|blog-myst).com|ss7.info|sololevelingmanga.pics', '#getlink')
clickIfHost(
    '(marketrook|governmentjobvacancies|swachataparnibandh|goodmorningimg|odiadance|newkhabar24|aiperceiver|kaomojihub|arkarinaukrinetwork|topgeninsurance).com|(winezones|kabilnews|myscheme.org|mpsarkarihelp|dvjobs|techawaaz).in|(biharhelp|biharkhabar).co|wastenews.xyz|biharkhabar.net',
    'a#btn7, #open-link > .pro_btn, form[name=\'dsb\'], //button[normalize-space(text())=\'Continue\']'
);
clickIfHost('ouo.(io|press)', 'button#btn-main.btn.btn-main');
clickIfHost('(keedabankingnews|aceforce2apk).com|themezon.net|healthvainsure.site|rokni.xyz|bloggingwow.store|dsmusic.in|vi-music.app', 'form[name=\'tp\'], #tp-snp2');
//It’s probably not working because the element loads later, but this can be fixed by creating a function that uses shorter text.
clickIfHost('teknoasian.com', '//button[contains(normalize-space(text()), \'Link\') or normalize-space(text())=\'Continue\' or normalize-space(text())=\'Click To Verify\']')
clickIfHost('(fourlinez|newsonnline|phonesparrow|creditcarred|stockmarg).com|(alljntuworld|updatewallah|vyaapaarguru|viralmp3.com|sarkarins).in', '#continue-show');
clickIfHost('knowiz0.blogspot.com', 'button#nextBtn');
clickIfHost('(jobmatric|carjankaari).com|techsl.online', 'form[name=\'rtg\'], #btn6');
clickIfHost('(viralxns|uploadsoon).com', '#tp-snp2.tp-blue.tp-btn, .tp-white.tp-btn');
clickIfHost('(blogsward|coinjest).com', '#continueBtn');
clickIfHost('dogefury.com|thanks.tinygo.co', '#form-continue');
clickIfHost('almontsf.com', '#nextBtn, a.btn-moobiedat');
clickIfHost('short.croclix.me|adz7short.space', '#link, input#continue, continue.button, #btn-main');
clickIfHost('techkhulasha.com|itijobalert.in', '#waiting > div > .bt-success, //button[normalize-space(text())=\'Open-Continue\']')
runIfHost('offerwall.me|ewall.biz', clickAfterCaptcha, '#submitBtn')
runIfHost('shortlinks2btc.somee.com', clickAfterCaptcha, '#btLogin');
runIfHost('playpaste.com', clickAfterCaptcha, 'button.btn');
runIfHost('jioupload.icu', clickAfterCaptcha, '#continueBtn');
runIfHost('(bnbfree|freeth|freebitco).in', clickAfterCaptcha, '#free_play_form_button');
runIfHost('revly.click|(clikern|kiddyshort|adsssy).com|mitly.us|link.whf.bz|shortex.in|(easyshort|shorturlearn).xyz', () => {
    //The initial implementation wasn’t good, so I changed it to work in mitly, but it might not work in other.
    clickAfterCaptcha('#link-view:has(#captchaShortlink)');
    clickSel('.col-md-12 form:not(:has(#captchaShortlink))'); //:has(.get-link:not(.disabled)) #go-link
    httpListener(function(xhr) {
        if (!xhr.url.includes('links/go')) return;
        const data = JSON.parse(xhr.responseText);
        goTo(data.url);
    });
});
runIfHost('(lakhisarainews|vahanmitra24).in', () => {
    clickSel('form[name=\'dsb\']');
    elementRedirect('a#btn7');
});
runIfHost('tutwuri.id|(besargaji|link2unlock).com', () => {
    clickSel('#submit-button, #btn-2, #verify > a, #verify > button');
    clickAfterCaptcha('#btn-3');
});
runIfHost('wp.thunder-appz.eu.org|blog.adscryp.com', () => {
    clickSel('form[name=\'dsb\']');
    elementRedirect('#button3 > a');
});
runIfHost('(fitnesswifi|earnmoneyyt|thardekho|dinoogaming|pokoarcade|hnablog|orbitlo|finquizy|indids|redfea|financenuz|pagalworldsong).com|(ddieta|lmktec).net|(bankshiksha|odiadjremix).in|vbnmx.online', () => {
    elementRedirect('div[id^=\'rtg-\'] > a:nth-child(1)');
    clickSel('#rtg, #rtg-snp21 .rtg_btn, #rtg-snp2, #rtg-snp21 > button');
});
runIfHost('solidcoins.net|fishingbreeze.com', () => {
    clickAfterCaptcha('form[action]');
    clickSel('mdn');
});
runIfHost('(lyricsbaazaar|ezeviral).com', () => {
    clickAfterCaptcha('#btn6');
    elementRedirect('div.modal-content a');
});
runIfHost('financemonk.net', () => {
    clickAfterCaptcha('#downloadBtnClick');
    clickSel('#dllink');
});
runIfHost('rotizer.net', clickAfterCaptcha, '//button[normalize-space(text())=\'Confirm\']');
runIfHost('lksfy.com', clickAfterCaptcha, '.get-link.btn-primary.btn');
runIfHost('(ez4mods|game5s|sharedp|fastcars1|carbikenation).com|tech5s.co|a4a.site|rcccn.in', () => {
    clickSel('div.text-center form, #go_d');
    elementRedirect('a#go_d.submitBtn.btn.btn-primary, a#go_d2.submitBtn.btn.btn-primary');
});
runIfHost('cryptorotator.website', () => {
    clickSel('#alf_continue:not([disabled]), //div[contains(@class,\'btn\') and contains(normalize-space(.),\'Click here to unlock\']');
    clickAfterCaptcha('#invisibleCaptchaShortlink');
});
runIfHost('4hi.in|(10short|animerigel|encurt4|encurtacash).com|finish.wlink.us|passivecryptos.xyz|fbol.top|kut.li|shortie.sbs|zippynest.online|faucetsatoshi.site|tfly.link|oii.si', () => {
    clickSel('#form-continue');
    clickAfterCaptcha('#link-view');
});
runIfHost('(forexrw7|forex-articles|3rabsports|fx-22|watchtheeye).com|(offeergames|todogame).online|whatgame.xyz|gold-24.net', () => {
    clickSel('.oto > a:nth-child(1)');
    elementRedirect('.oto > a');
});

autoDownloadIfHost('upload.ee', clickSel, '#d_l');
autoDownloadIfHost('f2h.io', clickSel, '.btn-success');
autoDownloadIfHost('send.now', clickSel, '#downloadbtn');
autoDownloadIfHost('dayuploads.com', clickSel, '#ad-link2');
autoDownloadIfHost('workupload.com', clickSel, '.btn-prio.btn');
autoDownloadIfHost('docs.google.com', clickSel, '#downloadForm');
autoDownloadIfHost('gofile.io', clickSel, 'button.item_download');
autoDownloadIfHost('dddrive.me', clickSel, '.btn-outline-primary');
autoDownloadIfHost('ify.ac|go.linkify.ru', window?.open_href);
autoDownloadIfHost('easyupload.io', clickSel, '.start-download.div');
autoDownloadIfHost('karanpc.com', clickSel, '#downloadButton > form');
autoDownloadIfHost('krakenfiles.com', clickSel, '.download-now-text');
autoDownloadIfHost('file-upload.net', clickSel, '#downbild.g-recaptcha');
autoDownloadIfHost('dbree.me', clickSel, '.center-block.btn-default.btn');
autoDownloadIfHost('rapidgator.net', clickSel, '.btn-free.act-link.link');
autoDownloadIfHost('mp4upload.com', clickSel, '#todl, form[name=\'F1\']');
autoDownloadIfHost('freepreset.net', elementRedirect, 'a#button_download');
autoDownloadIfHost('filemoon.sx', elementRedirect, 'div.download2 a.button');
autoDownloadIfHost('dropgalaxy.com', clickSel, 'button[id^=\'method_fre\']');
autoDownloadIfHost('apkadmin.com', elementRedirect, 'div.text.text-center a');
autoDownloadIfHost('drop.download', clickSel, '#method_free, .btn-download');
autoDownloadIfHost('fileresources.net', elementRedirect, 'a.btn.btn-default');
autoDownloadIfHost('megaupto.com', clickSel, '#direct_link > a:nth-child(1)');
autoDownloadIfHost('1fichier.com', clickSel, '.btn-orange.btn-general.ok, .alc');
autoDownloadIfHost('douploads.net', clickSel, '.btn-primary.btn-lg.btn-block.btn');
autoDownloadIfHost('anonymfile.com|sharefile.co|gofile.to', elementRedirect, 'a.btn-info');
autoDownloadIfHost('uploadhaven.com', clickSel, '.alert > a:nth-child(1), #form-download');
autoDownloadIfHost('takefile.link', clickSel, 'div.no-gutter:nth-child(2) > form:nth-child(1)');
autoDownloadIfHost('files.fm', clickSel, '#head_download__all-files > div > div > a:nth-child(1)');
autoDownloadIfHost('hxfile.co|ex-load.com|megadb.net', clickSel, '.btn-dow.btn, form[name=\'F1\']');
autoDownloadIfHost('turbobit.net', () => {
    elementRedirect('#nopay-btn, #free-download-file-link')
    clickAfterCaptcha('#submit');
});
autoDownloadIfHost('uploady.io', () => {
    clickAfterCaptcha('#downloadbtn');
    clickSel('#free_dwn, .rounded.btn-primary.btn', 2);
});
autoDownloadIfHost('mega4upload.net', () => {
    clickSel('input[name=mega_free]');
    clickAfterCaptcha('#downloadbtn');
});
autoDownloadIfHost('ilespayouts.com', () => {
    clickSel('input[name=\'method_free\']');
    clickAfterCaptcha('#downloadbtn');
});
autoDownloadIfHost('hitfile.net', () => {
    clickAfterCaptcha('#submit');
    clickSel('.nopay-btn.btn-grey');
    elementRedirect('#popunder2');
});
autoDownloadIfHost('up-4ever.net', () => {
    clickSel('input[name=\'method_free\'], #downLoadLinkButton');
    clickAfterCaptcha('#downloadbtn');
});
autoDownloadIfHost('up-load.io|downloadani.me', () => {
    clickSel('input[name=\'method_free\'], .btn-dow.btn', 2);
    clickAfterCaptcha('#downloadbtn');
});
autoDownloadIfHost('file-upload.org', () => {
    clickSel('button[name=\'method_free\'], .download-btn', 2);
    clickAfterCaptcha('#downloadbtn');
});
autoDownloadIfHost('mexa.sh', () => {
    clickSel('#Downloadfre, #direct_link');
    clickAfterCaptcha('#downloadbtn');
});
autoDownloadIfHost('qiwi.gg', () => {
    clickSel('button[class^=\'DownloadButton_ButtonSoScraperCanTakeThisName\']');
    elementRedirect('a[class^=\'DownloadButton_DownloadButton\']');
});
autoDownloadIfHost('sharemods.com', () => {
    clickSel('#dForm');
    elementRedirect('a#downloadbtn.btn.btn-primary');
});
autoDownloadIfHost('dailyuploads.net', () => {
    clickAfterCaptcha('#downloadbtn');
    clickSel('#fbtn1', 2);
});
autoDownloadIfHost('udrop.com', async () => {
    const element = await waitForElement('.responsiveMobileMargin > button:nth-child(1)');
    goTo(element.getAttribute('onclick').getBetween('openUrl(\'', '\')'));
});
autoDownloadIfHost('k2s.cc', () => {
    clickSel('.button-download-slow');
    elementRedirect('a.link-to-file');
});
autoDownloadIfHost('desiupload.co', () => {
    clickSel('.downloadbtn.btn-block.btn-primary.btn');
    elementRedirect('a.btn.btn-primary.btn-block.mb-4');
});

/*
It should work without any issues.
*/
runIfHost('(fc-lc|thotpacks).xyz', async function() {
    clickSel('#invisibleCaptchaShortlink:not([disabled])', 1);
    const element = await waitForElement('script');
    const target = element.textContent.match(/https?:\/\/[^\s'"]+/g);
    target && goTo(target)
})
runIfHost('linkbox.to', () => {
    httpListener(function(xhr) {
        if (!xhr.url.includes('api/file/detail?itemId')) {
            return;
        }
        const {
            data: {
                itemInfo
            }
        } = JSON.parse(xhr.responseText);
        goTo(itemInfo.url);
    });
});
//

clickIfHost('imagereviser.com', '.bottom_btn');
redirectIfHost('amanguides.com', '#wpsafe-link > .bt-success');
clickIfHost('stockmarg.com', '#codexa, #open-continue-btn');
redirectIfHost('(michaelemad|7misr4day).com', 'a.s-btn-f');
clickIfHost('(dramaticqueen|emubliss).com', '#notarobot.button, #btn7');
runIfHost('tempatwisata.pro', () => {
    const buttons = ['Generate Link', 'Continue', 'Get Link', 'Next'].map(text => `//button[normalize-space(text())='${text}']`);
    clickSel(buttons.join(', '));
});

runIfHost('tii.la|oei.la|iir.la|tvi.la|oii.la|tpi.li', clickAfterCaptcha, '#continue');
runIfHost('askpaccosi.com|cryptomonitor.in', clickAfterCaptcha, 'form[name=\'dsb\']')
clickIfHost('largestpanel.in|(djremixganna|financebolo|emubliss).com|(earnme|usanewstoday).club|earningtime.in', '#tp-snp2');
runIfHost('adoc.pub', () => {
    clickSel('.btn-block.btn-success.btn', 2);
    clickAfterCaptcha('.mt-15.btn-block.btn-success.btn-lg.btn');
});
runIfHost('usersdrive.com|ddownload.com', () => {
    clickAfterCaptcha('#downloadbtn');
    clickSel('.btn-download.btn', 1);
});
runIfHost('pdfcoffee.com', () => {
    clickSel('.btn-block.btn-success.btn');
    clickAfterCaptcha('.my-2.btn-block.btn-primary.btn-lg.btn');
});
clickIfHost('(zygina|jansamparks).com|(loanifyt|getknldgg).site|topshare.in|btcon.online', 'form[name=\'tp\'], #btn6');
clickIfHost('(financewada|utkarshonlinetest).com|financenova.online', '.get_btn.step_box > .btn, .get_btn a[href]');
runIfHost('(blogmado|kredilerim|insuranceleadsinfo).com', () => {
    clickAfterCaptcha('button.btn');
    elementRedirect('a.get-link.disabled a');
});
runIfHost('litecoin.host|cekip.site', () => {
    clickAfterCaptcha('#ibtn');
    clickSel('.btn-primary.btn');
});

redirectIfHost('linkforearn.com', '#shortLinkSection a');
clickIfHost('downfile.site', 'button.h-captcha, #megaurl-submit', 2);
autoDownloadIfHost('doodrive.com', () => {
    clickSel('.tm-button-download.uk-button-primary.uk-button', 3);
    elementRedirect('.uk-container > div > .uk-button-primary.uk-button');
});
clickIfHost('(uploadrar|fingau|getpczone|wokaz).com|uptomega.me', '.mngez-free-download, #direct_link > a:nth-child(1), #downloadbtn');
clickIfHost('jobinmeghalaya.in', '#bottomButton, a#btn7, #wpsafelink-landing, #open-link > .pro_btn, #wpsafe-link > .bt-success');
clickIfHost('playnano.online', '#watch-link, .watch-next-btn.btn-primary.button, button.button.btn-primary.watch-next-btn');
redirectIfHost('sub2get.com', '#butunlock > a:nth-child(1)')
redirectIfHost('o-pro.online', '#newbutton, a.btn.btn-default.btn-sm');
// redirectIfHost('oxy\.', '.ocdsf233', 'data-source_url'); // need a more specific pattern

autoDownloadIfHost('buzzheavier.com', clickSel, '#download-link');
autoDownloadIfHost('bowfile.com', clickSel, '.download-timer > .btn--primary.btn > .btn__text');
autoDownloadIfHost('uploadev.org', () => {
    clickAfterCaptcha('#downloadbtn');
    clickSel('#direct_link > a', 2);
});
autoDownloadIfHost('megaup.net', clickSel, 'a.btn.btn-default, #btndownload');
autoDownloadIfHost('gdflix.dad', clickSel, 'a.btn.btn-outline-success');
redirectIfHost('linkspy.cc', '.skipButton');
clickIfHost('(superheromaniac|spatsify|mastkhabre|ukrupdate).com', '#tp98, #btn6, form[name=\'tp\']');
clickIfHost('(bestloansoffers|worldzc).com|earningtime.in', '#rtg, #rtg-form, .rtg-blue.rtg-btn, #rtg-snp21 > button');
clickIfHost('(exeo|exego).app|(falpus|exe-urls|exnion).com|4ace.online', '#invisibleCaptchaShortlink, #before-captcha');
runIfHost('dinheiromoney.com', () => {
    clickSel('div[id^=\'button\'] form');
    elementRedirect('div[id^=\'button\'] center a');
});
runIfHost('writedroid.eu.org|modmania.eu.org|writedroid.in', () => {
    clickSel('#shortPostLink');
    elementRedirect('#shortGoToLink');
});
autoDownloadIfHost('katfile.com', () => {
    clickAfterCaptcha('#downloadbtn');
    clickSel('#fbtn1');
    elementRedirect('#dlink');
});
clickIfHost('setroom.biz.id|travelinian.com', 'form[name=\'dsb\'], a:nth-child(1) > button');
redirectIfHost('(g34new|dlgamingvn|v34down|phimsubmoi|almontsf).com|(nashib|timbertales).xyz', '#wpsafegenerate > #wpsafe-link > a[href]');
runIfHost('2linkes.com', () => {
    clickAfterCaptcha('#link-view');
    clickSel('.box-body > form:nth-child(2)');
});
runIfHost('(importantclass|hamroguide).com', () => {
    clickSel('#pro-continue, #pro-link a');
    elementRedirect('#my-btn.pro_btn');
});
runIfHost('nishankhatri.xyz|(bebkub|owoanime|hyperkhabar).com', () => {
    clickSel('#pro-continue, #my-btn');
    elementRedirect('a#pro-btn');
});
clickIfHost('gocmod.com', '.download-line-title');
runIfHost('(travelironguide|businesssoftwarehere|softwaresolutionshere|freevpshere|masrawytrend).com', () => {
    clickAfterCaptcha('#lview > form', 'submit');
    elementRedirect('.get-link > a');
});
runIfHost('gocmod.com', parameterRedirect, '$urls');
runIfHost('api.gplinks.com', parameterRedirect, '$url');
runIfHost('rfaucet.com', parameterRedirect, '$linkAlias');
runIfHost('maloma3arbi.blogspot.com', parameterRedirect, '$link');
runIfHost('financenuz.com', parameterRedirect, 'https://financenuz.com/?web=$url');
runIfHost('thepragatishilclasses.com', parameterRedirect, 'https://thepragatishilclasses.com/?adlinkfly=$url');
runIfHost('coinilium.net', parameterRedirect, '$id');
/* not sure what the +2 is
BypassedByBloggerPemula('(inshort|youlinks|adrinolinks).in|(linkcents|nitro-link).com|clk.sh', null, 'url+2', '');
*/
runIfHost('blog.klublog.com', parameterRedirect, '$safe');
runIfHost('t.me', parameterRedirect, '$url');
runIfHost('dutchycorp.space', parameterRedirect, '$code?verif=0');
runIfHost('tiktok.com', parameterRedirect, '$target');
runIfHost('(facebook|instagram).com', parameterRedirect, '$u');
runIfHost('financedoze.com', parameterRedirect, 'https://www.google.com/url?q=https://financedoze.com', 'id');
// runIfHost('financedoze.com', () => parameterRedirect('https://www.google.com/url?q=https://financedoze.com', 'id'));
clickIfHost('forex-trnd.com', '#exfoary-form');
clickIfHost('cutnet.net|(cutyion|cutynow).com|(exego|cety).app|(jixo|gamco).online', '#submit-button:not([disabled])');
clickIfHost('alorra.com', '.single-layout-1.ast-post-format- > button');

runIfHost('adtival.network', referrerPolicy, 'shortid');
runIfHost('sfl.gl|kisalt.digital', referrerPolicy, 'u');
runIfHost('(kongutoday|proappapk|hipsonyc).com', referrerPolicy, 'safe');
runIfHost('sharetext.me', () => currentUrl.includes('/redirect') && referrerPolicy('url'));
runIfHost('comohoy.com', () => currentUrl.includes('/view/out.html') && referrerPolicy('url'));
runIfHost('(ecryptly|equickle).com', async () => {
    referrerPolicy('id');
    waitForElement('#open-continue-form > input:nth-child(3)').then(e => goTo(atob(e.value)));
    clickSel('#rtg-snp2');
    const element = await waitForElement('#open-continue-btn');
    goTo(element.getAttribute('onclick').getBetween('window.location.href=\'', '\';'));
});

runIfHost('bigbtc.win', () => {
    clickAfterCaptcha('#claimbutn');
    currentUrl.includes('/bonus') && clickSel('#clickhere');
});
clickIfHost('vosan.co', '.elementor-size-lg, .wpdm-download-link');

redirectIfHost('xonnews.net|toilaquantri.com|share4u.men|camnangvay.com', 'div#traffic_result a');
runIfHost('easylink.gamingwithtr.com', () => {
    clickSel('#countdown');
    elementRedirect('a#pagelinkhref.btn.btn-lg.btn-success.my-4.px-3.text-center');
})
autoDownloadIfHost('modsbase.com', () => {
    clickSel('.download-file-btn');
    elementRedirect('#downloadbtn > a');
});
autoDownloadIfHost('mediafire.com', () => currentUrl.includes('file/') && elementRedirect('.download_link .input'));
runIfHost('ouo.io', parameterRedirect, '$s');
runIfHost('pixeldrain.com', () => currentUrl.includes('/u/') && goTo(`${currentUrl.replace('u/', '/api/file/')}?download`));
clickIfHost('exblog.jp', '//a[normalize-space(text())=\'Continue To\'], //a[normalize-space(text())=\'NEST ARTICLE\']')
runIfHost('modcombo.com', () => {
    if (currentUrl.includes('download/')) {
        elementRedirect('div.item.item-apk a');
        clickSel('a.btn.btn-submit');
    } else {
        clickSel('a.btn.btn-red.btn-icon.btn-download.br-50');
    }
});
// working but still can be improved
runIfHost('coinclix.co|coinhub.wiki|(vitalityvista|geekgrove).net|(instagram|youtube|google|facebook).com', async () => {
    document?.referrer == '' && clickSel('.-cx-PRIVATE-Linkshim__followLink__, #invalid-token-redirect-goto-site-button, .selected');
    /vitalityvista|geekgrove|coinhub/.test(document?.referrer) && queryParams.has('url') && goTo(queryParams.get('url'));

    if (currentUrl.includes('go/')) {
        let tab;
        const code = await waitForElement('.mb-2 code');
        try {
            const link = await waitForElement('strong > a', 1);
            GM_setValue('geek_code', code.innerText);
            tab = GM_openInTab(link.href, {
                active: true
            });
        } catch (e) {
            const q = document.querySelector('.user-select-none').textContent;
            tab = GM_openInTab(`https://www.google.com/url?q=${q}`, {
                active: true
            });
        }

        GM_onMessage('finalcode', function(newValue) {
            tab?.close();
            document.querySelector('#verification_code').value = newValue;
        })
    }
    //TODO REMOVE #btn_link_start:not([disabled])
    clickSel('a.btn:has(.mdi-check), #btnLinkStart:not([disabled]), #linkResFooter > #btnLinkContinue:not([disabled]), #linkResHeader > #btnLpcont');
    clickAfterCaptcha('#btnLinkContinue');
    clickSel('#btnLinkContinue:not(:has(.iconcaptcha-modal)), .iconcaptcha-modal__body');
    clickSel('#btnLpcont');
    waitForElement('#linkInput').then((input) => {
        input.value = GM_getValue('geek_code', '');
        clickSel('#btnLink', 1);
    })
    const codeEl = await waitForElement('code.link_code');
    GM_sendMessage('finalcode', codeEl.innerText)
});
runIfHost('shortit.pw', () => {
    clickSel('.pulse.btn-primary.btn');
    clickAfterCaptcha('#btn2');
});
runIfHost('autodime.com|cryptorex.net', () => {
    clickAfterCaptcha('#button1');
    clickSel('.mb-sm-0.mt-3.btnBgRed');
});
clickIfHost('(tmail|labgame).io|(gamezizo|fitdynamos).com', '#surl, form.text-center, #next, #glink');
autoDownloadIfHost('dataupload.net', clickSel, '.downloadbtn');

function clickWithTrusted() {
    return;
    const sandbox = new Proxy(window, {
        get(target, key) {
            if (key === 'Object') {
                return new Proxy(Object, {
                    get(objTarget, objKey) {
                        if (objKey === 'freeze') {
                            return function(obj) {
                                console.warn('Object.freeze disabled in sandbox.');
                                return obj;
                            };
                        }
                        return Reflect.get(objTarget, objKey);
                    }
                });
            }
            return Reflect.get(target, key);
        }
    });

    const originalAddEventListener = EventTarget.prototype.addEventListener;
    EventTarget.prototype.addEventListener = function(type, listener, options) {
        const wrappedListener = function(event) {
            const clonedEvent = Object.create(event);
            Object.defineProperty(clonedEvent, 'isTrusted', {
                value: true,
                writable: false
            });
            return listener.call(this, clonedEvent);
        };
        return originalAddEventListener.call(this, type, wrappedListener, options);
    };

    return sandbox;
}
runIfHost('(admediaflex|cdrab|financekita|jobydt|foodxor|mealcold|newsobjective|gkvstudy|mukhyamantriyojanadoot|thepragatishilclasses|indobo|pdfvale|templeshelp).com|(ecq|cooklike).info|(wpcheap|bitwidgets|newsamp|coinilium).net|atomicatlas.xyz|gadifeed.in|thecryptoworld.site|skyfreecoins.top|petly.lat|techreviewhub.store|mbantul.my.id', async () => {
    const element = await waitForElement('#wpsafe-link a[onclick*=\'window.open\']');
    const onclick = element.getAttribute('onclick');
    goTo(onclick.getBetween('window.open\(\'', '\'\)'));
});
runIfHost('(cryptowidgets|melodyspot|carsmania|cookinguide|tvseriescentral|cinemascene|hobbymania|plantsguide|furtnitureplanet|petsguide|gputrends|gamestopia|ountriesguide|carstopia|makeupguide|gadgetbuzz|coinsvalue|coinstrend|coinsrise|webfreetools|wanderjourney|languagefluency|giftmagic|bitwidgets|virtuous-tech|retrocove|vaultfind|geotides|renovatehub|playallgames|countriesguide).net|(freeoseocheck|insurancexguide|funplayarcade|origamiarthub|fitbodygenius|illustrationmaster|selfcareinsights|constructorspro|ecofriendlyz|virtualrealitieshub|wiki-topia|techiephone|brewmasterly|teknoasian|lifeprovy|chownest|mythnest|homesteadfeast|gizmoera|tastywhiz|speakzyo).com|(bubblix|dailytech-news).eu|(biit|carfocus).site|coinscap.info|insurancegold.in|wii.si', clickWithTrusted);
runIfHost('(cryptowidgets|melodyspot|carsmania|cookinguide|tvseriescentral|cinemascene|hobbymania|plantsguide|furtnitureplanet|petsguide|gputrends|gamestopia|ountriesguide|carstopia|makeupguide|gadgetbuzz|coinsvalue|coinstrend|coinsrise|webfreetools|wanderjourney|languagefluency|giftmagic|bitwidgets|virtuous-tech).net|(freeoseocheck|insurancexguide|funplayarcade|origamiarthub|fitbodygenius|illustrationmaster|selfcareinsights|constructorspro|ecofriendlyz|virtualrealitieshub|wiki-topia|techiephone|brewmasterly).com|(bubblix|dailytech-news).eu|(biit|carfocus|blogfly).site|coinscap.info|insurancegold.in|wii.si', () => {
    clickSel('//button[normalize-space(text())=\'Verify\'], #loadingDiv[style*=\'display: block\'] button, #loadingDiv[style*=\'display: block\'] button');
    // if (['dailytech-news.eu', 'wii.si', 'bubblix.eu', 'bitwidgets.net', 'virtuous-tech.net', 'carfocus.site', 'biit.site'].some(tino => currentUrl.includes(tino))) {
    // } else 
    waitForElement('#clickMessage[style*=\'display: block\'], clickMessage[style*=\'display: block\']').then(() => {
        setActiveElement('[data-placement-id=\'revbid - leaderboard\']');
    });
    // Checkvisibility('#loadingDiv[style^=\'display\'] > span', () => {
    //         const buttonText = strBetween(document.querySelector('#loadingDiv[style^=\'display\'] > span').textContent, 'Click', 'To Start');
    //         waitForElement(`#loadingDiv[style^='display'] .btn.btn-primary:contains('${buttonText}')`).then(buttonElement => {
    //             const buttons = Array.from(bp('#loadingDiv[style^=\'display\'] .btn.btn-primary', true));
    //             const index = buttons.indexOf(buttonElement);
    //             if (index === -1) return;
    //             const selectorOptions = ['button.btn:nth-child(2)', 'button.btn:nth-child(3)', 'button.btn:nth-child(4)', 'button.btn:nth-child(5)', 'button.btn:nth-child(6)'];
    //             const chosenSelector = selectorOptions[index];
    //             if (chosenSelector) sleep(2000).then(() => ReadytoClick(`#loadingDiv[style^='display'] ${chosenSelector}`));
    //         });
    //     });
});
runIfHost('render-state.to', () => queryParams.has('link') && window.goToLink());
runIfHost('programasvirtualespc.net', () => currentUrl.includes('out/') && goTo(atob(currentUrl.split('?')[1])));
runIfHost('(grtjobs|jksb).in', () => {
    // Checkvisibility('.step', window.handleContinueClick);
});
//TODO: with the link, I can improve this further
runIfHost('autofaucet.dutchycorp.space', function() {
    let autoRoll = false;
    if (/(coin_roll|roll_game).php|/.test(currentUrl)) {
        window.scrollTo(0, 9999);
        if (!document.querySelector('#timer')) {
            captchaSolved(async () => {
                autoRoll === false && (await clickSel('.boost-btn.unlockbutton'), autoRoll = true)
                clickSel('#claim_boosted');
            });
        } else {
            const isRoll = currentUrl.includes('/coin_roll.php');
            goTo(`https://autofaucet.dutchycorp.space/${isRoll ? 'coin_roll.php' : 'ptc/wall.php'}`);
        }
    }
    if (currentUrl.includes('/ptc/wall.php')) {
        const ptcwall = document.querySelectorAll('.col.s10.m6.l4 a[name=\'claim\']');
        if (ptcwall.length >= 1) {
            ptcwall[0].style.backgroundColor = 'red';
            let match = ptcwall[0].onmousedown.toString().match(/'href', '(.+)'/);
            let hrefValue = match[1];
            goTo('https://autofaucet.dutchycorp.space' + hrefValue);
        } else {
            // Checkvisibility('div.col.s12.m12.l8 center div p', () => {
            //     goTo('https://autofaucet.dutchycorp.space/ptc/');
            // })
        }
        if (currentUrl.includes('.space/ptc/')) {
            if (document.querySelector('.fa-check-double')) {
                goTo('https://autofaucet.dutchycorp.space/dashboard.php');
            }
            clickAfterCaptcha('button[type=\'submit\']')
        }
    }
});
clickIfHost('(devnote|formshelp|rcccn).in|djbassking.live', '#getlinks.btn');
runIfHost('(tinybc|phimne).com|(mgame|sportweb|bitcrypto).info', async () => {
    const element = await waitForElement('#wpsafe-link a[onclick*=\'handleClick\']')
    const onclick = element.getAttribute('onclick');
    const target = onclick.getBetween('handleClick\(\'', '\')');
    target && goTo(target);
});
runIfHost('curto.win', () => {
    clickSel('#get-link');
    elementRedirect('#get-link');
});
runIfHost('(tejtime24|drinkspartner|sportswordz|newspute).com|(raftarsamachar|gadialert|jobinmeghalaya|raftarwords).in', () => {
    window.scrollTo(0, 9999);
    clickSel('#topButton.pro_btn, #bottomButton, #open-link > .pro_btn');
});
runIfHost('mazen-ve3.com', async () => {
    await waitForElement('//*[contains(concat(\' \', normalize-space(@class), \' \'), \' filler \') and normalize-space(text())=\'Wait 0 s\']');
    clickSel('#btn6, .btn-success.btn');
});
autoDownloadIfHost('oydir.com', async () => {
    await waitForElement('.download-now');
    window.triggerFreeDownload();
    elementRedirect('.text-center.download-now > .w-100.btn-blue.btn');
});
clickIfHost('pubghighdamage.com|anmolbetiyojana.in', '#robot, #notarobot.button, #gotolink.bt-success.btn');
runIfHost('fansonlinehub.com', function() {
    window.scrollBy(0, 1);
    window.scrollTo(0, -1);
    clickSel('.active.btn > span');
});
runIfHost('coinsrev.com', () => {
    clickAfterCaptcha('#wpsafelinkhuman > input');
    clickSel('#wpsafe-generate > a > img, input#image3');
});
runIfHost('(hosttbuzz|policiesreview|blogmystt|wp2hostt|advertisingcamps|healthylifez|insurancemyst).com|clk.kim|dekhe.click', () => {
    clickSel('button.btn.btn-primary, #nextpage, #getmylink');
    waitForElement('.btn-captcha.btn-primary.btn').then(e => e.removeAttribute('onclick'));
    clickAfterCaptcha('.btn-captcha.btn-primary.btn');
});
runIfHost('(remixsounds|helpdeep|thinksrace).com|(techforu|studywithsanjeet).in|uprwssp.org|gkfun.xyz', async () => {
    clickSel('.m-2.btn-captcha.btn-outline-primary.btn, .tpdev-btn, #tp98 button[class^=\'bt\'], form[name=\'tp\'], #btn6');
    //Todo: when I have a link, I will improve the query.
    const element = await waitForElement('body > center:nth-child(6) > center:nth-child(4) > center:nth-child(2) > center:nth-child(4) > center:nth-child(3) > center:nth-child(4) > center:nth-child(2) > center:nth-child(4) > script:nth-child(5)');
    const scriptContent = element.textContent;
    const Linkc = scriptContent.match(/var\s+currentLink\s*=\s*[''](.*?)['']/);
    Linkc && Linkc[1] && goTo(Linkc[1]);
});
autoDownloadIfHost('upfion.com', async () => {
    await waitForElement('.file-main.form-main');
    clickSel('.my-2.text-center > .btn-primary.btn');
    clickAfterCaptcha('#link-button');
});
runIfHost('techxploitz.eu.org', () => {
    // Checkvisibility('#hmVrfy', () => clickSel('.pstL.button'));
    // Checkvisibility('#aSlCnt', () => clickSel('.pstL.button, .safeGoL.button'));
});
runIfHost('(down.fast-down|down.mdiaload).com', () => {
    clickSel('input[name=\'method_free\'], //a[normalize-space(text())=\'Continue\']');

    // const captchaCode = BpAnswer(null, 'captcha');
    // if (captchaCode) {
    //     const captchaInput = bp('input.captcha_code');
    //     if (captchaInput) {
    //         captchaInput.value = captchaCode;
    //         ReadytoClick('button:innerText('Create Download ')', 30);
    //     }
    // }
});
runIfHost('(sekilastekno|miuiku|vebma|majalahhewan).com|tempatwisata.pro', async function() {
    const executor = async () => {
        let El = window?.livewire?.components?.components()[0];
        while (!El) {
            await sleep(100);
            El = window?.livewire?.components?.components()[0];
        }
        const payload = {
            fingerprint: El.fingerprint,
            serverMemo: El.serverMemo,
            updates: [{
                payload: {
                    event: 'getData',
                    id: 'whathappen',
                    params: [],
                },
                type: 'fireEvent',
            }],
        };
        const response = await fetch(host + '/livewire/message/pages.show', {
            headers: {
                'Content-Type': 'application/json',
                'X-Livewire': 'true',
                'X-CSRF-TOKEN': window.livewire_token,
            },
            method: 'POST',
            body: JSON.stringify(payload),
        });
        const json = await response.json();
        const url = new URL(json.effects.emits[0].params[0]);
        goTo(url.href);
    };

    if (host === 'wp.sekilastekno.com') {
        const element = await waitForElement('form[method=\'post\']');
        GM_addElement(element, 'input', {
            value: window.livewire_token,
            name: '_token',
            hidden: true
        })
        element.submit();
        waitForElement('button[x-text]').then(executor);
        return;
    }

    waitForElement('div[class=\'max - w - 5 xl mx - auto\']').then(executor);
});
runIfHost('adshnk.com|adshrink.it', () => {
    const timer = setInterval(() => {
        if (typeof window?._sharedData?.[0]?.destination == 'string') {
            clearInterval(timer);
            goTo(window._sharedData[0].destination);
        } else if (typeof window?.[window?.___reactjsD?.o]?.dest == 'string') {
            clearInterval(timer);
            goTo(window[window.___reactjsD.o].dest);
        }
    });
});
runIfHost('(playonpc|yolasblog|playarcade).online|quins.us|(retrotechreborn|insurelean|ecosolardigest|finance240|2wheelslife|historyofyesterday).com|gally.shop|freeat30.org|ivnlnews.xyz', async () => {
    clickAfterCaptcha('button#cbt.pfbutton-primary');
    await waitForElement(':has(not(.h-captcha))');
    await waitForElement(':has(not(.core-msg.spacer.spacer-top))');
    await waitForElement('#cbt:not([disabled])');
    await waitForElement('//button[@id=\'formButtomMessage\' and contains(text(), "Well done! You\'re ready")]');
    clickSel('button#cbt.pfbutton-primary');
});
runIfHost('(mangareleasedate|sabkiyojana|teqwit|bulkpit|odiafm).com|(loopmyhub|thepopxp).shop|cryptoblast.online', () => {
    RSCookie('adexp', '1', GPlinks, 0.001388);
    clickSel('#VerifyBtn, #NextBtn', 3);
    waitForElement('#SmileyBanner').then(function() {
        setActiveElement('[id=\'div - gpt - ad\']');
    })
});
runIfHost('(on-scroll|diudemy|maqal360).com', () => {
    clickSel('#_append a, #append a');
    waitForElement('.alertAd').then(function() {
        setActiveElement('[data-placement-id=\'revbid - leaderboard\']');
    });
});
runIfHost('(horoscop|videoclip|newscrypto).info|article24.online|writeprofit.org|docadvice.eu|trendzilla.club|worldwallpaper.top', () => {
    captchaSolved(window?.wpsafehuman);
    clickSel('center > .wpsafelink-button');
    waitForElement('#wpsafe-generate > a').then(function() {
        window.wpsafegenerate();
        const start = currentUrl.includes('article24.online') ? '' : '2';
        clickSel(`#wpsafelink-landing${start} > .wpsafelink-button`);
    })
});
runIfHost('gamezigg.com|shrs.link|shareus.io|go.paylinks.cloud|multiup.io|modsfire.com|social-unlock.com|work.ink', function() {
    //Temporary until I have the links.
    const t = /^\/([^\/]+)/.test(pathname);
    switch (host) {
        case 'gamezigg.com':
            const b = pathname === '/verify/' && /^\?([^&]+)/.test(search);
            b && openWithReferrerPolicy('https://get.megafly.in/' + RegExp.$1);
            break;
        case 'shrs.link':
        case 'shareus.io':
            if (/^\/old\/([^\/]+)/.test(pathname)) {
                goTo('https://jobform.in/?link=' + RegExp.$1);
            }
            break;
        case 'go.paylinks.cloud':
            if (/^\/([a-zA-Z0-9]{10,12})$/.test(pathname)) {
                goTo('https://paylinks.cloud/' + RegExp.$1);
            }
            break;
        case 'multiup.io':
            if (currentUrl.includes('/download/')) goTo(currentUrl.replace('download/', 'en/mirror/'));
            break;
        case 'modsfire.com':
            t && goTo('https://modsfire.com/d/' + RegExp.$1);
            break;
        case 'social-unlock.com':
            t && goTo('https://social-unlock.com/redirect/' + RegExp.$1);
            break;
        case 'work.ink':
            t && goTo('https://adbypass.org/bypass?bypass=' + currentUrl.split('?')[0]);
            break;
        default:
            break;
    }
})
runIfHost('firefaucet.win', () => {
    clickSel('//button[normalize-space(text())=\'Continue\'], //button[normalize-space(text())=\'Go Home\']')
    clickAfterCaptcha('button[type=submit]:not([disabled])');
});
runIfHost('inshortnote.com', () => {
    //For now, I won’t touch it until there’s a link.
    let clickCount = 0;
    const maxClicks = 7;
    const bp = document.querySelectorAll;

    function clickElement() {
        if (clickCount >= maxClicks) return;
        let element = bp('#htag > [style=\'left: 0 px;\']')?.[0] || bp('#ftag > [style=\'left: 0 px;\']')?.[0];
        if (element) {
            element.click();
            clickCount++;
            return;
        }
        for (let el of bp('.gaama [style*=\'left: \']')) {
            if (/^[a-zA-Z0-9]{5,6}$/.test(el.textContent.trim())) {
                el.click();
                clickCount++;
                return;
            }
        }
    }
    const intervalId = setInterval(() => {
        clickElement();
        if (clickCount >= maxClicks) clearInterval(intervalId);
    }, 3000);
});
clickIfHost('videolyrics.in', '//a[contains(normalize-space(),\'Continue\')], div[x-html=\'isTCompleted\'] button');
runIfHost('servicemassar.ma', () => {
    captchaSolved(window.linromatic());
    clickSel('//button[normalize-space(text())=\'Next\'], //button[normalize-space(text())=\'Redirect\']');
});
runIfHost('(suaurl|lixapk|reidoplacar|lapviral|minhamoto).com', () => {
    const selectors = ['FETCH LINK', 'START', 'PULAR CAPTCHA', 'FINAL LINK', 'CONTINUAR', 'DESBLOQUEAR'].map(t => `//button[contains(normalize-space(),'${t}')]`)
    clickSel(selectors);
});
runIfHost('(cryptosparatodos|placementsmela|howtoconcepts|tuasy|skyrimer|yodharealty|mobcupring|aiimsopd|advupdates|camdigest|heygirlish|blog4nx|todayheadliners|jobqwe|cryptonews.faucetbin|mobileflashtools).com|(paidinsurance|djstar|sevayojana|bjp.org).in|(sastainsurance|nashib).xyz|(cialisstrong|loanforuniversity).online|(cegen|thunder-appz.eu).org|zaku.pro|veganab.co|skyfreecoins.top|manga4nx.site', async () => {
    const element = await waitForElement('#wpsafe-link a');
    goTo(element.getAttribute('onclick').getBetween('window.open(\'', '\', \'_self\')'));
});
runIfHost('indobo.com', async () => {
    const element = await waitForElement('#wpsafegenerate > script:nth-child(4)');
    const url = element.textContent.getBetween('window.location.href = \'', '\';');
    url.startsWith('https://indobo.com?safelink_redirect=') && goTo(url);
});
runIfHost('downloader.tips', () => {
    clickAfterCaptcha('button.btn.btn-primary');
    clickSel('//*[@id=\'count\' and normalize-space(text())=\'0\']')
});
runIfHost('infonerd.org', async () => {
    await waitForElement('//*[@id=\'redirectButton\' and normalize-space(text())=\'0\']');
    window.redirectToUrl();
});
runIfHost('trangchu.news|downfile.site|(techacode|expertvn|ziggame|gamezigg).com|azmath.info|aztravels.net|handydecor.com.vn', () => {
    clickSel('#monetiza.btn-primary.btn');
    waitForElement('#monetiza-generate').then(window?.monetizago);
});
runIfHost('(bchlink|usdlink).xyz', () => {
    clickSel('#antiBotBtnBeta > strong', 2);
    clickAfterCaptcha('#invisibleCaptchaShortlink');
});
runIfHost('(shrinke|shrinkme)\.\w+', clickAfterCaptcha, '#invisibleCaptchaShortlink');
runIfHost('(paid4link|linkbulks|linclik|up4cash|smoner|atglinks|minimonetize|encurtadorcashlinks|yeifly|themesilk|linkpayu).com|(wordcounter|shrink).icu|(dutchycorp|galaxy-link).space|dutchycorp.ovh|pahe.plus|(pwrpa|snipn).cc|paylinks.cloud|oke.io|tinygo.co|tlin.me|wordcount.im|link.freebtc.my.id|get.megafly.in|skyfreeshrt.top|learncrypto.blog|link4rev.site', clickAfterCaptcha, '#link-view');

runIfHost('headlinerpost.com|posterify.net', async () => {
    const scripts = document.querySelectorAll('script');
    const script = [...scripts].find(e => e.textContent.includes('data:'));
    let dataValue = script?.textContent?.getBetween('data: \'', '\'');

    const plan = JSON.parse(RSCookie('plan') || '{}');
    let stepValue = plan.lid || '';
    let planValue = plan.page || '';
    if (!dataValue || !stepValue) return;

    const postData = {
        data: dataValue
    };
    const sid = RSCookie('sid');
    postData[sid ? 'step_2' : 'step_1'] = stepValue;
    if (sid) postData.id = sid;

    const isHeadliner = host === 'headlinerpost.com';
    const params = new URLSearchParams(postData);
    const response = await fetch('https://shrinkforearn.in/link/new.php', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
            'Referer': `https://${isHeadliner ? 'headlinerpost.com' : 'posterify.net'}`,
            'Origin': `https://${isHeadliner ? 'headlinerpost.com' : 'posterify.net'}`
        },
        body: params,
        credentials: 'include'
    });
    const result = await response.json();
    const id = result.inserted_data?.id;
    id && RSCookie('sid', id, 0.02);
    if (id || result.updated_data || sid) {
        const ShrinkUrl = `https://${isHeadliner
        ? `posterify.net/?id=${encodeURIComponent(stepValue)}&sid=${encodeURIComponent(id || sid)}&plan=${encodeURIComponent(planValue)}`
        : `shrinkforearn.in/${encodeURIComponent(stepValue)}?sid=${encodeURIComponent(id || sid)}`}`;
        goTo(ShrinkUrl);
    }
});

runIfHost('(carbikesupdate|carbikenation).com', () => {
    parent.open = () => {}
    clickSel('#getLinkBtn, #getlinks.btn');
});
{
    /*
    BypassedByBloggerPemula(/(financedoze|topjanakri|stockbhoomi).com|techhype.in|getpdf.net|cryptly.site/, () => {
        CheckVisibility('p:contains(\'Step\')', () => {
            DoIfExists('#rtg', 'submit', 3);
            DoIfExists('button:innerText(\'Open - Continue\')', 4);
        });
    });
    BypassedByBloggerPemula(/bitcotasks.com/, () => {
        if (currentUrl.includes('/firewall')) {
            CheckVisibility('#captcha-container', '&&', 'bp(\'.mb - 2\').innerText == \'Verified\'', () => {
                DoIfExists('button:contains(\'Validate\')');
            });
        }
        if (currentUrl.includes('/lead')) {
            CheckVisibility('#status .btn', () => {
                DoIfExists('button:contains(\'Start View\')');
            });
        }
        CheckVisibility('#captcha-container', '&&', 'bp(\'.mb - 2\').innerText == \'Verified\'', () => {
            window.continueClicked();
        });
        CheckVisibility('.alert-success.alert', '||', 'bp(\'.alert - success\').innerText == \'This offer was successfully\'', () => {
            window.close();
        });
    });
    BypassedByBloggerPemula(/newsminer.uno/, () => {
        CheckVisibility('#clickMessage', '&&', 'bp(\'#clickMessage\').innerText == \'Click any ad\'', () => {
            setActiveElement('[data-placement-id=\'revbid - leaderboard\']');
        });
        if (elementExists('input.form-control')) {
            notify('Please Answer the Maths Questions First ,Wait until Progress bar end, then Click the Red X Manually', false, true);
            window.onscroll = BpBlock();
            window.check2();
            elementReady('[name=\'answer\']').then(function(element) {
                element.addEventListener('change', window.check3);
            });
        }
    });
    BypassedByBloggerPemula(/stly.link|(snaplessons|atravan|airevue|carribo|amalot).net|(stfly|shrtlk).biz|veroan.com/, () => {
        CaptchaDone(() => {
            ReadytoClick('button[class^=mt-4]');
            DoIfExists('button.mt-4:nth-child(2)', 3);
        });
        CheckVisibility('button[class^=rounded]', () => {
            if (!bp('.g-recaptcha') || !bp('.cf-turnstile')) {
                DoIfExists('button[class^=rounded]', 2);
            }
        });
        CheckVisibility('button[class^=mt-4]', '&&', 'bp(\'.progress - done\').innerText == \'100\'', () => {
                ReadytoClick('button[class^=mt-4]', 2);
                ReadytoClick('button.mt-4:nth-child(2)', 4);
            });
        CheckVisibility('button[class^=mt-4]', '&&', 'bp(\'#countdown - number\').innerText == \'✓\'', () => {
                DoIfExists('button[class^=mt-4]', 2);
                ReadytoClick('button.mt-4:nth-child(2)', 3);
            });
    });
    */
}