Skip to content

Instantly share code, notes, and snippets.

@MaurizioCasciano
Forked from janglapuk/adfly-skipper.user.js
Created October 25, 2017 09:21
Show Gist options
  • Save MaurizioCasciano/fd64c56418a0f67e6e696f7530179546 to your computer and use it in GitHub Desktop.
Save MaurizioCasciano/fd64c56418a0f67e6e696f7530179546 to your computer and use it in GitHub Desktop.
GreaseMonkey/TamperMonkey script for automating adf.ly 'Skip' button
// ==UserScript==
// @name adf.ly Auto Skip Ad
// @namespace http://github.com/janglapuk
// @version 0.5
// @description Let you ignore the bunch of ads :] (simple and optimized rev)
// @author janglapuk
// @match http://adf.ly/*
// @require http://code.jquery.com/jquery-3.2.1.slim.min.js
// @require https://gist.githubusercontent.com/raw/2625891/waitForKeyElements.js
// @updateURL https://gist.github.com/janglapuk/790470741a39a0f2301b27d234e6a9cc/raw/adfly-skipper.user.js
// @grant none
// ==/UserScript==
// Credits:
// BrockA for waitForKeyElements.js (https://gist.github.com/BrockA)
(function() {
'use strict';
var skipBtn = 'a#skip_button[href]';
waitForKeyElements(skipBtn, function() {
var aLink = $(skipBtn);
window.location = aLink.attr('href');
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment