Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

For example: http://1short.us/368527

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        http://1short.us/*
// ==/UserScript==


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

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]
window.location="http://"+c3+"/m1.php?id="+c4;
}

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        1short.us
    // @namespace   1short.us/*
    // @include     http://1short.us/*
    // @version     1
    // ==/UserScript==

/*! jQuery v1.8.3 jquery.com | jquery.org/license */

/* Contents of http://code.jquery.com/jquery-1.8.3.min.js */

    //this is the place to work in lets test
//"NewWindow('mediafire_fix.php?url=http://www.mediafire.com/?a0unhxiksg47ejg','name','800','600','yes');return false"
var link =location.href;
link=link.replace("http://1short.us/","");
//alert(link);
var link2="";
$.get("http://1short.us/m1.php?",{'id':link} ,function(data){
    link2=$(data).find(':button').attr('onclick');
    link2=link2.replace("NewWindow('","");
    link2=link2.replace("','name','800','600','yes');return false","");
    location.href=link2
 });
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
1  
@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. –  sudo Feb 7 '13 at 0:54

1 Answer 1

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        http://1short.us/*
// ==/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 1short.us domain.

As it is, the user script redirects from 1short.us/368527 to 1short.us/m1.php?id=368527, and from there to turbobit.net/aveyd9fs89oc.html. 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 turbobit.net/m1.php?id=aveyd9fs89oc.html. 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
1  
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 "1short.us/m1.php?id=368527" 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 : ( turbobit.net/… ) by your experience, how could i fix it ? –  Karim AlHousiny 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? –  sudo 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 . –  Karim AlHousiny 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 what....it works Perfect !! thaaaaaaaaaaaaaanks a lot Dennis for your Valuable help –  Karim AlHousiny Feb 7 '13 at 16:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.