Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name k2nblog ad skipper
- // @namespace http://k2nblog.com/ad-skipper
- // @description Skip ads on sh.st, adf.ly, j.gs and q.gs
- // @include http://sh.st/*
- // @include http://adf.ly/*
- // @include http://j.gs/*
- // @include http://q.gs/*
- // @version 0.0.2
- // @grant none
- // ==/UserScript==
- // Written by deobfuscating adf.ly code.
- function decodeLink(cipher) {
- var C = "";
- var Z = "";
- var i, len = cipher.length;
- for (i = 0; i < len; ++i) {
- if (i & 1) {
- Z = cipher[i] + Z;
- } else {
- C += cipher[i];
- }
- }
- return atob(C + Z).slice(2);
- }
- if (location.host === "sh.st") {
- var m = location.pathname.match(/\/(https?:.+)/);
- if (m) {
- location.href = m[1];
- }
- } else if (location.host === "adf.ly" || location.host === "j.gs" || location.host === "q.gs") {
- var m = location.href.match(/\/ad\/locked.*\?url=(\w+)/);
- if (m) {
- // adf.ly doesn't reveal links too often.
- setTimeout(function() {
- location.href = "/" + m[1];
- }, 2000);
- } else if (window.ysmm) {
- location.href = decodeLink(ysmm);
- }
- }
Add Comment
Please, Sign In to add comment