Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a script to bypass links provided by the website to get the download link directly.

For example:

Is there any way to do that?

I found this user script, but it can't bypass the second page.

// @namespace      TecHPrO
// @description    Short Script Bypass u can add any site using this script
// @include*
// ==/UserScript==

var n=location.pathname;
var exp= /m1.php/;
var x=;

if (x != -1)
var l=document.getElementsByName('groovybtn1')[0];
var s = l.getAttribute('onclick');
var s1= s.split("(\'");
var s2= s1[1];
var s3= s2.split("\',\'");
var s4= s3[0];
window.location= s4;}

else {
var p=location.href;
var c=p.split("http://");
var c1=c[0];
var c2=c[1].split("/");
var c3=c2[0];
var c4=c2[1]

I've found a second user script, but it appends ','name','800','800','yes');return%20false to the final URL.

Here's the code:

// ==UserScript==
    // @name
    // @namespace*
    // @include*
    // @version     1
    // ==/UserScript==

/*! jQuery v1.8.3 | */

/* Contents of */

    //this is the place to work in lets test
//"NewWindow('mediafire_fix.php?url=','name','800','600','yes');return false"
var link =location.href;
var link2="";
$.get("",{'id':link} ,function(data){
    link2=link2.replace("','name','800','600','yes');return false","");
share|improve this question
If the site wants you to go to the download link through some previous page, it is at least rude to bypass that. – vonbrand Feb 7 '13 at 0:29
@vonbrand: You're still opening the 1short sites, just skipping them automatically rather than manually. It's about as rude as using an ad blocker. The ad popup and the fact that you're forced to open the download in a new browser window (not even a new tab)... now that's rude, I'd say. – Dennis Feb 7 '13 at 0:54
up vote 1 down vote accepted

The user script itself is working fine, but the headers are incomplete.

The first lines should be:

// ==UserScript==
// @namespace      TecHPrO
// @description    Short Script Bypass u can add any site using this script
// @include*
// ==/UserScript==

Note that the first line is missing. This causes the headers to be ignored, so the script gets applied to all websites. To work properly, it should be restricted to sites of the domain.

As it is, the user script redirects from to, and from there to So far, so good. It should stop here.

However, due to the missing header, the else block of the if statement gets executed again, and the script redirects to This results in a 404.

The second user script does not work since 1short – apparently – changed the size of their new browser window. Any change to the website will might render a user script useless.

In this case, the line

link2=link2.replace("','name','800','600','yes');return false","");

is supposed to get rid of the unwanted part of the URL, but the actual URL finishes with:

','name','800','800','yes');return false

Changing that line of the user script to

link2=link2.replace("','name','800','800','yes');return false","");

(i.e., replacing 600 with 800) will fix it.

share|improve this answer
Okay, that wasn't clear to me from your answer. (You might edit that bit in.) – Brock Adams Feb 7 '13 at 2:09
Thank u very much Dennis for ur respond, but, as I told u before I couldn't bypass the second page after all (from "" to "turbobit......" however, I had found another script that get the job done but, with a little bug . after bypassing pages successfully , this is last result : (… ) by your experience, how could i fix it ? – KorkOoO Feb 7 '13 at 16:06
I have tested the script with the modified header in the latest version of Google Chrome, and it works for me. What browser are you using? – Dennis Feb 7 '13 at 16:12
thanks again my friend 4 ur fast and useful responds.. I am using opera 12.14 , I will try it on chrome wishing it'll work well . – KorkOoO Feb 7 '13 at 16:36
Perfect Dennis , u r greaaaaaaat >>> after my successful trial on firfox , i thought that it could work well if i use the "violent.monkey" opera extension to install the script < and guess works Perfect !! thaaaaaaaaaaaaaanks a lot Dennis for your Valuable help – KorkOoO Feb 7 '13 at 16:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .