有谁能将webqq写成客户端,java或gtk的。。。。

7 views
Skip to first unread message

CyrusHMH

unread,
Nov 22, 2009, 8:45:04 AM11/22/09
to fedo...@googlegroups.com
如题,只是希望能有个比较独立的客户端,因为要开着浏览器,用起来比较麻烦,
下面是webqq的html(挂?)登录代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>weblogin</title>
<link href="http://imgcache.qq.com/ptlogin/style/4/login.css"
rel="stylesheet" type="text/css" />
<script language="javascript"
src="http://imgcache.qq.com/ptlogin/js/str_cn.js"></script>


<script language="javascript"
src="http://imgcache.qq.com/ptlogin/js/comm.js"></script>
</head>
<body onload="onPageLoad()">
<div class="signin" id="login">
<form name="loginform" id="loginform"
action="http://ptlogin2.qq.com/login" method="post"
onsubmit="return onFormSubmit(this)" target="_self" style="margin:0px;">
<div class="subcolumn01">
</div>
<div class="subcolumn02">
<div class="banner">
</div>
<div class="signin-area">
<div class="signin-area-bg">
<div class="padder">
<div class="sign-input"><span class="title">帐 号:</span><span
class="input"><input autocomplete="on" name="u" id="u" type="text"
style="ime-mode:disabled" class="input01" tabindex="1" value="QQ号码或
Email帐号" onfocus="if (value =='QQ号码或Email帐号'){value =''}"
onblur="if (value ==''){value='QQ号码或Email帐号';}" /></span></div>
<div class="sign-input"><span class="title">密 码:</span><span
class="input"><input name="p" id="p" maxlength="16" type="password"
class="input01" tabindex="2"/></span></div>

<div class="sign-input"><span class="title">验证码:</span><span
class="input"><input autocomplete="off" id="verifycode"
name="verifycode" type="text" style="ime-mode:disabled" class="input01
validate" onkeyup="javascript:if(event.keyCode==13){OnSubmit();}"
value="" tabindex="3" maxLength="4"/></span></div>

<div class="clearer"></div>
</div>

<div id="verifyimg_layer" class="valcode">
<div class="verify_text">输入下图中的字符,不区分大小写</div>
<div class="pic">
<script type="text/javascript">document.write("<img id=imgVerify
width='130' height='53'
src='http://ptlogin2.qq.com/getimage?aid=1002101&",Math.random(),"'
onload='ptui_setSpeed(3)'>");</script>
<a id="changimg_link" href="javascript:ptui_changeImg('qq.com', 1002101,
true);">换一张</a>
</div>

</div>

<span class="input expand">
<input type="checkbox" name="webqq_type" value="1" id="webqq_type"
tabindex="4" checked="checked" onClick="onClickRemember(this, 0x02,
true)" /><label for="checkbox">隐身登录</label>
<input type="checkbox" name="remember_uin" value="1" id="remember_uin"
tabindex="5" checked="checked" onClick="onClickRemember(this, 0x01,
false)" /><label for="checkbox">记住帐号</label>
</span>
</div>
</div>
<div class="clearer"></div>

<div class="subcolumn03">
<div class="left">
<div class="middle">
<div class="middle-padder">
<div class="logins"><input type="submit" class="signin-btn"
src="http://imgcache.qq.com/ptlogin/style/4/images/btn-signin.gif"
value="" tabindex="5" /></div>
<div class="safe">已使用安全方式登录</div>
</div>
</div>
<div class="right">
</div>
<div class="bottom-padder"><a
href="http://ptlogin2.qq.com/ptui_forgetpwd" target="_blank"
onclick="onClickForgetPwd()" id="label_forget_pwd">忘记密码?</a><a
href="http://freeqqm.qq.com/" target="_blank">注册新用户</a></div>
</div>
<input type="hidden" name="aid" value="1002101" />
<input type="hidden" name="u1"
value="http://web.qq.com/main.shtml?direct" />
<input type="hidden" name="fp" value="loginerroralert" />
<input type="hidden" name="h" value="1" />
<input type="hidden" name="ptredirect" value="1" />
<input type="hidden" name="ptlang" value="0" />

<input type="hidden" name="from_ui" value="1" />
<input type="hidden" name="pttype" value="1" />
<input type="hidden" name="dumy" value="" />
</form>
</div>
</body>
<script language="javascript">
document.domain="qq.com"
function onPrePageLoad()
{
ptui_setDefUin(document.getElementById("loginform"), "");
var rememCookie = getRememCookie();
var checkObj = document.getElementById("remember_uin");
var checkHiddenObj = document.getElementById("webqq_type");
if ((rememCookie&0x01) != 0) checkObj.checked = true;else
checkObj.checked = false;
if ((rememCookie&0x02) == 0) checkHiddenObj.checked = true;else
checkHiddenObj.checked = false;
}
function onFormSubmit(form)
{
if (form.remember_uin.checked){
return ptui_onLoginEx(form, "qq.com")
}else{
var myDate=new Date();
myDate.setFullYear(1971,1,1);
setCookie("ptui_loginuin", "", myDate, '/', 'ui.ptlogin2.qq.com');
return ptui_onLogin(form);
}
}
function onPageLoad(){
ptui_notifySize('login');
try{ptui_initFocus(document.getElementById("loginform"))}catch(e){}
if(document.getElementById("u").value!="QQ号码或Email帐号" &&
document.getElementById("u").value!=""){
if(document.getElementById("p").value==""){
document.getElementById("p").focus();
}else{
if(vcode){
vcode.focus();
}else{
document.getElementById("submitbtn").focus();
}
}
}else{
document.getElementById("u").focus();
}
}
function getRememCookie(){
var iCookieVal = 0;
var cookieVal = getCookie("ptui_check_rem_uin");
if (cookieVal!="" && cookieVal!=null){
iCookieVal = parseInt(cookieVal);
}
return iCookieVal;
}
function setRememCookie(val)
{
var mytime = new Date();
mytime.setHours(mytime.getHours() + 24*30); //配置只保持一个月有效
setCookie('ptui_check_rem_uin', val, mytime, '/',
'ui.ptlogin2.qq.com');
}
function onClickRemember(obj,flag, bReverse){
var iCookieVal = getRememCookie();
var bSet = obj.checked;
if (bReverse) bSet = !bSet;
if (bSet) iCookieVal |= flag;else iCookieVal &= ~(flag);
setRememCookie(iCookieVal);
return true;
}
function onClickForgetPwd()
{
var uinobj = document.getElementById("u");
var forgetpwdobj = document.getElementById("label_forget_pwd");
forgetpwdobj.href = "http://ptlogin2.qq.com/ptui_forgetpwd";
if (uinobj != null && uinobj.value != ptui_str(STR_UINTIP))
{
if (forgetpwdobj.href.indexOf("?")==-1)
{
forgetpwdobj.href += "?";
}
else
{
forgetpwdobj.href += "&";
}
forgetpwdobj.href += "aquin=" + uinobj.value;
}
return true;
}
onPrePageLoad()
</script>
</html>

Liang Suilong

unread,
Nov 22, 2009, 8:54:30 AM11/22/09
to fedo...@googlegroups.com
小提示:下次发代码不要直接发在邮件里,你可以贴到paste里,例如http://paste.fedora-zh.org
或者放在文本文件作为附件发上来..

PS,用prsim或者chrome的app mode不就可以了么?用不着刻意写一个客户端吧

2009/11/22 CyrusHMH <cyrus...@gmail.com>



--
<url>http://www.liangsuilong.info</url>
Fight for freedom!!!!(3F)
Ask not what your Linux distro can do for you!
Ask what you can do for your Linux distro!

pingz

unread,
Nov 22, 2009, 12:21:22 PM11/22/09
to fedo...@googlegroups.com
前几天刚看过,
http://linuxtoy.org/archives/webqq-desktop-integration.html

现在的浏览器应用已经很牛X了……

2009/11/22 Liang Suilong <liangs...@gmail.com>:

熊川

unread,
Nov 23, 2009, 12:48:29 AM11/23/09
to fedo...@googlegroups.com
桌面的还是好些,用FF上QQ,过一会儿,就慢的要死了

2009/11/23 pingz <zps...@gmail.com>



--
我的博客http://www.pigblog.net
网址之家http://www.pig123.com

Liang Suilong

unread,
Nov 23, 2009, 3:57:35 AM11/23/09
to fedo...@googlegroups.com
即使你写了一个桌面程序,那本质上只是一个特殊的浏览器,只不过它登录 WebQQ 而已。

其实你要的这些功能 Prism 和 Chrome App Mode 已经能够实现了。

至于为何 FF 会容易假死,建议使用带有 TraceMonkey 的 Firefox 测试一下,x86_64 的 Firefox 是没有 TraceMonkey 的。

2009/11/23 熊川 <xiongc...@gmail.com>
Reply all
Reply to author
Forward
0 new messages