Skip to content

Instantly share code, notes, and snippets.

@Micorksen
Last active January 21, 2024 10:40
Show Gist options
  • Save Micorksen/48e847a6f26de55aca013b0909569967 to your computer and use it in GitHub Desktop.
Save Micorksen/48e847a6f26de55aca013b0909569967 to your computer and use it in GitHub Desktop.
Skip ads when accessing adfoc.us URLs.
// ==UserScript==
// @name Do not Adfoc.us
// @namespace https://micorksen.eu
// @version 1.0
// @description Skip ads when accessing shortened URLs.
// @author Micorksen
// @match http://*/*
// @match https://*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=adfoc.us
// @grant none
// ==/UserScript==
(function () {
'use strict'
const u = new URL(window.location.href)
let r = ''
if (u.host == 'adfoc.us')
r = window.click_url
if (u.pathname == '/pushredirect/' && u.searchParams.get('site') == 'adfly')
r = decodeURIComponent(u.searchParams.get('dest'))
if (r)
window.location.replace(r)
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment