Last active
January 21, 2024 10:40
-
-
Save Micorksen/48e847a6f26de55aca013b0909569967 to your computer and use it in GitHub Desktop.
Skip ads when accessing adfoc.us URLs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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