Skip to content

Instantly share code, notes, and snippets.

@rickdog
Created July 6, 2018 02:13
Show Gist options
  • Save rickdog/06491e50aae786005210e4b3b467443f to your computer and use it in GitHub Desktop.
Save rickdog/06491e50aae786005210e4b3b467443f to your computer and use it in GitHub Desktop.
!function($) {
var go = function($) {
var asave = $("a");
var s = $("a").sort(sort_a);
document.body.innerHTML = '';
s.each(function(i, o) {
if (o.innerText == '+')
return;
$('body').append(o).append('<br>');
});
function isHost(a) {
if (a.host.match(/nitroflare\./))
return true;
if (a.host.match(/depositfiles\./))
return true;
if (a.host.match(/zippyshare\./))
return true;
if (a.host.match(/rapidgator\./))
return true;
if (a.host.match(/mediafire\./))
return true;
if (a.host.match(/mfi\.re/))
return true;
if (a.host.match(/turbobit\./))
return true;
if (a.host.match(/uploaded\./))
return true;
if (a.host.match(/filecloud\.io/))
return true;
if (a.host.match(/ul\.to/))
return true;
if (a.host.match(/4shared\./))
return true;
if (a.host.match(/mega\./))
return true;
if (a.host.match(/mirrorcreator\./))
return true;
if (a.host.match(/mir\.cr/))
return true;
if (a.host.match(/cloud\.mail/))
return true;
if (a.host.match(/yadi\.sk/))
return true;
if (a.host.match(/filefactory\./))
return true;
if (a.host.match(/sendspace\./))
return true;
if (a.host.match(/novafile\./))
return true;
if (a.host.match(/dfiles\.eu/))
return true;
if (a.host.match(/dfiles\.ru/))
return true;
if (a.host.match(/embedupload\./))
return true;
if (a.host.match(/filehosting\.org/))
return true;
if (a.host.match(/uploadgig\./))
return true;
if (a.host.match(/adrive\./))
return true;
if (a.host.match(/spaces\.hightail\.com/))
return true;
if (a.host.match(/florenfile\./))
return true;
if (a.host.match(/wetransfer\./))
return true;
if (a.host.match(/we\tl./))
return true;
if (a.host.match(/oboom\./))
return true;
if (a.host.match(/onedrive\.live\.com/))
return true;
if (a.host.match(/1drv\.ms/))
return true;
if (a.host.match(/pc\.cd/))
return true;
if (a.host.match(/pcloud\./))
return true;
if (a.host.match(/solidfiles\./))
return true;
if (a.host.match(/ulozto\./))
return true;
if (a.host.match(/usersdrive\./))
return true;
if (a.host.match(/uploadboy\./))
return true;
if (a.host.match(/openload\.co/))
return true;
if (a.host.match(/opendrive\.com/))
return true;
if (a.host.match(/od\.lk/))
return true;
if (a.host.match(/file-upload\.net/))
return true;
if (a.host.match(/docs\.google\./))
return true;
if (a.host.match(/drive\.google\./))
return true;
if (a.host.match(/goo\.gl/))
return true;
if (a.host.match(/[\/\.]box\./))
return true;
if (a.host.match(/dropbox\./))
return true;
if (a.host.match(/drop\.me/))
return true;
if (a.host.match(/dvkrop\.com/))
return true;
if (a.host.match(/bdupload\.info/))
return true;
if (a.host.match(/archive\.org/))
return true;
if (a.host.match(/adf\.ly/))
return true;
if (a.host.match(/tinyurl\./))
return true;
if (a.host.match(/oke\.io/))
return true;
if (a.host.match(/sprysphere\./))
return true;
if (a.host.match(/adbilty\.me/))
return true;
if (a.host.match(/icutit\.ca/))
return true;
if (a.host.match(/linkbucks\./))
return true;
if (a.host.match(/bit\.ly/))
return true;
if (a.host.match(/binbox\.io/))
return true;
if (a.host.match(/zipansion\./))
return true;
if (a.host.match(/festyy\./))
return true;
if (a.host.match(/ouo\.io/))
return true;
if (a.host.match(/erq\.io/))
return true;
if (a.host.match(/bc\.vc/))
return true;
if (a.host.match(/catcut\.net/))
return true;
if (a.host.match(/dashsphere\./))
return true;
if (a.host.match(/destyy\./))
return true;
if (a.host.match(/corneey\./))
return true;
if (a.host.match(/short\.pe/))
return true;
if (a.href.match(/t\.umblr\.com/)) {
var b = a.href.match(/redirect\?z=/);
if (b && b[1]) {
a.href = decodeURIComponent(b[1]);
a.innerText = '[' + a.href + ']';
return true;
}
}
if (a.host.match(/soundcloud\./))
return true;
if (a.host.match(/bandcamp\./))
return true;
return false;
}
$('body').append('<hr>');
asave.each(function(i, o) {
if (o.innerText == '+')
o.innerText = o.href;
if (isHost(o))
$('body').append(o).append('<br>');
});
document.body.outerHTML = document.body.outerHTML.replace(/<br>(<br>)+/g, '<br>');
function hrefCompare(a, b, regx) {
var m = a.host.match(regx);
var n = b.host.match(regx);
if (!m && n)
return 1;
if (m && !n)
return -1;
if (m && n)
return a.host.localeCompare(b.host);
return 0;
}
function sort_a(a, b) {
if (a.innerText == '+')
return 1;
if (a.innerText == '+' && b.innerText == '+')
return 0;
var r = hrefCompare(a, b, /blogspot\./);
if (r)
return r;
r = hrefCompare(a, b, /wordpress\./);
if (r)
return r;
r = hrefCompare(a, b, /tumblr\./);
if (r)
return r;
r = hrefCompare(a, b, /livejournal..*/);
if (r)
return r;
r = hrefCompare(a, b, /typepad\./);
if (r)
return r;
r = hrefCompare(a, b, /noblogs\./);
if (r)
return r;
r = hrefCompare(a, b, /myblog\.de/);
if (r)
return r;
r = hrefCompare(a, b, /ucoz\./);
if (r)
return r;
return a.host.localeCompare(b.host);
}
};
if ($ && $.fn && parseFloat($.fn.jquery) >= 1.7)
go($);
else {
var s = document.createElement("script");
s.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js",
s.onload = s.onreadystatechange = function() {
var state = this.readyState;
state && "loaded" !== state && "complete" !== state || go(jQuery.noConflict());
}
;
document.getElementsByTagName("head")[0].appendChild(s);
}
}(window.jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment