Skip to content

Instantly share code, notes, and snippets.

@tokune
Created May 28, 2012 08:18
Show Gist options
  • Select an option

  • Save tokune/2817974 to your computer and use it in GitHub Desktop.

Select an option

Save tokune/2817974 to your computer and use it in GitHub Desktop.

Revisions

  1. tokune created this gist May 28, 2012.
    17 changes: 17 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    <SCRIPT LANGUAGE="JavaScript">
    window.onload=function(){
    document.getElementById("open").onclick=function(){
    var url="http://pinban.com/oauth/weibo/binding/";
    var win=window.open(url);
    var timer = setInterval((function(win){
    return function(){
    if (win.closed) {
    alert("fuck off!!");
    clearInterval(timer);
    }
    };
    })(win),1000);
    }
    }
    </SCRIPT>
    <input id="open" type="button" value="open"/>