Showing preview only (457K chars total). Download the full file or copy to clipboard to get everything.
Repository: Beau-zihan/WebIM
Branch: master
Commit: 751d61cebf00
Files: 66
Total size: 428.7 KB
Directory structure:
gitextract_eevj4kjm/
├── .gitattributes
├── .gitignore
├── README.md
├── ajax/
│ ├── card.html
│ ├── chats.php
│ ├── companyinfo.html
│ ├── friends.html
│ ├── friends.php
│ ├── im_contact.html
│ ├── im_face.html
│ ├── im_window.html
│ ├── login.html
│ ├── msgbox.html
│ ├── product.html
│ ├── report.html
│ ├── set.html
│ ├── share.html
│ └── userinfo.php
├── demo.html
├── docs/
│ ├── css/
│ │ └── docs.css
│ ├── index.html
│ └── prettify/
│ ├── lang-apollo.js
│ ├── lang-clj.js
│ ├── lang-css.js
│ ├── lang-go.js
│ ├── lang-hs.js
│ ├── lang-lisp.js
│ ├── lang-lua.js
│ ├── lang-ml.js
│ ├── lang-n.js
│ ├── lang-proto.js
│ ├── lang-scala.js
│ ├── lang-sql.js
│ ├── lang-tex.js
│ ├── lang-vb.js
│ ├── lang-vhdl.js
│ ├── lang-wiki.js
│ ├── lang-xq.js
│ ├── lang-yaml.js
│ ├── prettify.css
│ └── prettify.js
├── img/
│ └── set.psd
├── index.html
├── js/
│ ├── im.css
│ ├── im.plus.js
│ └── jQuery.im.js
├── set/
│ ├── Jcrop/
│ │ ├── css/
│ │ │ └── jquery.Jcrop.css
│ │ ├── demos/
│ │ │ ├── crop.php
│ │ │ ├── demo_files/
│ │ │ │ └── demos.css
│ │ │ ├── jquery-ui.html
│ │ │ ├── non-image.html
│ │ │ ├── styling.html
│ │ │ ├── tutorial1.html
│ │ │ ├── tutorial2.html
│ │ │ ├── tutorial3.html
│ │ │ ├── tutorial4.html
│ │ │ └── tutorial5.html
│ │ ├── index.html
│ │ └── js/
│ │ ├── jquery.Jcrop.js
│ │ └── jquery.color.js
│ ├── avatar.html
│ ├── css/
│ │ └── avatar.css
│ ├── js/
│ │ └── jquery.Jcrop.js
│ └── uploadify/
│ ├── jquery.uploadify-3.1.js
│ └── uploadify.swf
└── sound/
└── msg.swf
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
================================================
FILE: .gitignore
================================================
#################
## Eclipse
#################
*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# PDT-specific
.buildpath
#################
## Visual Studio
#################
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.Publish.xml
*.pubxml
# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
App_Data/*.mdf
App_Data/*.ldf
#############
## Windows detritus
#############
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Mac crap
.DS_Store
#############
## Python
#############
*.py[co]
# Packages
*.egg
*.egg-info
dist/
build/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
#Translations
*.mo
#Mr Developer
.mr.developer.cfg
================================================
FILE: README.md
================================================
# WebIM说明
WebIM是一款基于jQuery的一款web即时通讯插件,姑且这么称呼吧。插件最大程度实现了IM的常用功能,除即时通讯的常用功能外,还加入了:消息盒子、窗口抖动、添加删除好友、最近联系人、超时登录界面、网站小秘书、聊天记录、发送频率限制、发送产品、发送名片、发送表情、产品分享、黑名单、举报、收藏、公告、智能网址过滤、消息提醒、修改资料、名片二维码、禁止粘贴、收起联系人列表、推荐好友等30余项改进。全浏览器兼容。
插件调用简单方便,只需在现有的web系统中加入几行代码,理论上可嵌入任何web系统。
2012年项目,已不再维护。
## 截图

## 配置
<pre>$(function() {
$(document).FnWebIM({
autoLogin :true, //boolean型,默认是否自动登录,true:自动登录,false:手动登录,默认为true
msgRefreshTime :1000, //number型,消息刷新时间,单位为ms
friendRefreshTime :10000, //number型,好友刷新时间,单位为ms
showSecretary :true, //boolean型,默认是否显示小秘书,true:显示,false:不显示,默认为true
noticeContent :"唐僧师徒历经千辛万苦,终于见到了佛祖……", //string型,公告内容 为空时不显示公告
sendPicture :true, //boolean型,是否允许发送图片,true:允许,false:不允许,默认为true
msgMaxSize :300, //number型,单条消息最大允许字符
msgSound :false, //boolean型,是否开启声音提醒,true:开启,false:关闭,默认为true
defaultWindow :"" //string型,登录后打开新聊天窗口,此处接收的参数为联系人的uid,否则会出错
});
});</pre>
## 详细说明文档
http://www.zi-han.net/case/im/help.html
## 示例
http://www.zi-han.net/developer/721.html
##注意
请在服务器(如localhost)环境下打开
================================================
FILE: ajax/card.html
================================================
<dl class="im_contactcard">
<dt><b>郑子涵</b> 先生 <span>技术部</span> | <i>前端开发</i> <a href="#" target="_blank" title="实名认证"></a><!--已认证:class="approve"--></dt>
<dd class="mobile">手机:<i>18693179452</i></dd>
<dd class="phone">电话:<i>09318976086</i></dd>
<dd class="fax">传真:<i>09318976086</i></dd>
<dd class="address">地址:<i>甘肃兰州市城关区庆阳路世纪广场A座1708</i></dd>
<dd class="zipcode">邮编:<i>730030</i></dd>
<dd class="website">网址:<i>http://www.zi-han.net/</i></dd>
</dl>
<style type="text/css">
.im_contactcard{line-height: 20px;float: left;width:300px;margin-bottom:10px; }
.im_contactcard dt{border-bottom: dashed 1px #ddd;margin-bottom: 10px;padding-bottom:10px;}
.im_contactcard dt a{display: inline-block;width:16px;height:14px; background: url(../img/cinfo_icon.png) no-repeat;position:absolute;margin:10px 0 0 10px; *margin:14px 0 0 5px;}
.im_contactcard dt a.approve{background-position:-18px 0; }
.im_contactcard dt b{font-size:24px;font-weight: bold;color:#000;font-weight:normal;margin-right:10px;font-family: "microsoft yahei"; }
.im_contactcard i{font-style: normal;color:#666 !important;}
.im_contactcard h4{line-height: 40px;border-bottom: dashed 1px #ddd;font-size: 14px;margin-bottom:10px;}
.im_contactcard h4 a{font-size: 12px;}
.im_mycard{padding:15px 20px;border:solid 1px #b7b7b7;border-top:solid 2px #000;width:300px;margin:5px 0;background: #fff;}
.im_mycard a.cc{color:#999;text-decoration: none;padding-left:15px;margin-right:10px;}
.im_mycard a.cc:hover{text-decoration: underline;color:#666;}
.im_mycard a.cc.atocard{background: url("../img/product_ico.png") no-repeat 0 -165px;}
.im_mycard a.cc.atocard:hover{background-position: 0 -188px;}
.im_mycard a.cc.aqrcode{background: url("../img/product_ico.png") no-repeat 0 -118px;}
.im_mycard a.cc.aqrcode:hover{background-position: 0 -142px;}
</style>
================================================
FILE: ajax/chats.php
================================================
[
{"T": "1","D": "6-11 12:12:23","M": "你们带U盘了么?"},
{"T": "0","D": "6-11 12:12:23","M": "<img src='face/qq/26.gif' />"},
{"T": "1","D": "6-11 12:12:23","M": "那你们就原路回去吧,我用QQ传给你们!"},
{"T": "0","D": "6-11 12:12:23","M": "<img src='face/qq/36.gif' />早知道加你QQ就完了,老子还走这么远干嘛啊"},
{"T": "1","D": "6-11 12:12:23","M": "你们以为要加就加啊,我经常隐身滴!最后,如来还来句:你们有没psp啊?"},
{"T": "0","D": "6-11 12:12:23","M": "……"},
{"T": "1","D": "6-11 12:12:23","M": "那这么远的路,你们是怎么娱乐的?"},
{"T": "0","D": "6-11 12:12:23","M": "打怪升级……"},
{"T": "0","D": "6-11 12:12:23","M": "<em>唐僧师徒按原路返回……</em>"},
{"T": "1","D": "6-11 12:12:23","M": "<em>经书传输中……</em>"},
{"T": "1","D": "6-11 12:12:23","M": "怎么这么慢呢,你什么网啊?"},
{"T": "0","D": "6-11 12:12:23","M": "单位的网……"},
{"T": "1","D": "6-11 12:12:23","M": "……你再来一趟吧,带上U盘"},
{"T": "1","D": "6-11 12:12:23","M": "来张图片试试!<img src='http://www.google.com.hk/logos/2012/shot_put-2012-hp.jpg' />"}
]
================================================
FILE: ajax/companyinfo.html
================================================
<div class="im_suppliersinfo">
<dl>
<dt>生财通指数:</dt>
<dd><i>120</i></dd>
</dl>
<dl>
<dt>工商注册:</dt>
<dd>
<a href="#" class="ccompany" title="已认证"></a>
<a href="#" class="vcompany" title="未认证"></a>
</dd>
</dl>
<dl class="bordotted">
<dt>个人身份:</dt>
<dd>
<a href="#" class="cmail" title="实名认证"></a>
<!--<a href="#" class="vmail" title="实名认证"></a>-->
<!--<a href="#" class="cmobile" title="邮箱认证"></a>-->
<a href="#" class="vmobile" title="邮箱认证"></a>
<!--<a href="#" class="cname" title="手机认证"></a>-->
<a href="#" class="vname" title="手机认证"></a>
</dd>
</dl>
<dl>
<dt>联 系 人:</dt>
<dd>
<a href="#">郑子涵</a>
</dd>
</dl>
<dl>
<dt>经营模式:</dt>
<dd>生产厂家</dd></dl>
<dl>
<dt>所在地区:</dt>
<dd>甘肃 兰州市</dd>
</dl>
<dl class="bordotted">
<dt>特殊荣誉:</dt>
<dd><a href="#" class="tuiguang"></a></dd>
</dl>
<dl>
<dt>注册时间:</dt>
<dd>2008年12月12日</dd>
</dl>
<dl class="bordotted">
<dt>最后登录:</dt>
<dd>最近一周内登录过</dd>
</dl>
<p><a href="javascript:;" class="im_companyFav">收藏公司</a><span>共被收藏 4 次</span></p>
</div>
<style type="text/css">
*{padding:0;margin:0;}
body{font-size:12px;}
.im_suppliersinfo{background:#fff;padding:10px;float: left;width:180px;}
.im_suppliersinfo dl{line-height: 22px;width:100%;float: left;}
.im_suppliersinfo dl dt{ color: #444;width:6em;float: left;}
.im_suppliersinfo dl dd{float: left;}
.im_suppliersinfo i{font-style: normal; color: #06c;}
.bordotted{ border-bottom: dotted 1px #ddd;padding-bottom:6px;margin-bottom: 6px;}
.im_suppliersinfo p{float: left;width:100%;padding-top:5px; text-align: center;}
.im_suppliersinfo p a{display: inline-block;width:71px;height:21px;line-height: 21px; background: url(../img/favc_btn.png) no-repeat; text-align: center;color:#666;text-decoration: none;}
.im_suppliersinfo p a:hover{background: url(../img/favc_btn.png) no-repeat 0 bottom;color:#333;}
.im_suppliersinfo p span{color:#666; margin-left:10px;}
a.ccompany,a.cmail,a.cmobile,a.cname,a.vcompany,a.vmail,a.vmobile,a.vname{float:left;width:16px;height:14px;background-image: url("../img/cinfo_icon.png");background-repeat: no-repeat;margin:4px 3px 0 0;}
a.ccompany{background-position: 0 -35px;}
a.cmail{background-position: 0 -52px;}
a.cmobile{background-position: 0 -18px;}
a.cname{background-position:0 0;}
a.vcompany{background-position: -18px -35px;}
a.vmail{background-position: -18px -52px;}
a.vmobile{background-position: -18px -18px;}
a.vname{background-position: -18px 0;}
a.tuiguang{display:inline-block;width:57px; height:16px; background: url(../img/serviceico.png) no-repeat;margin:3px 5px 0 0;}
</style>
================================================
FILE: ajax/friends.html
================================================
<div class="im_friendsbox">
<dl>
<dt uid=""><img src="../temp/1.jpg" width="30" height="30" /></dt>
<dd class="im_msgdetail">
<p>
<a href="#" class="im_companyname" target="_blank">淄博林华商贸有限公司</a>
<a href="#" class="ccompany" title="已认证"></a>
<!--<a href="#" class="vcompany" title="未认证"></a>-->
</p>
<p>
<a href="javascript:;" class="im_friendname" target="_blank" uid="">小米</a>
<a href="#" class="cmail" title="实名认证"></a>
<!--<a href="#" class="vmail" title="实名认证"></a>-->
<!--<a href="#" class="cmobile" title="邮箱认证"></a>-->
<!--<a href="#" class="vmobile" title="邮箱认证"></a>-->
<!--<a href="#" class="cname" title="手机认证"></a>-->
<!--<a href="#" class="vname" title="手机认证"></a>-->
</p>
</dd>
<dd class="im_msginfo">
<a href="javascript:;" class="im_addcontact">加为好友</a>
</dd>
</dl>
<dl>
<dt uid=""><img src="../temp/3.jpg" width="30" height="30" /></dt>
<dd class="im_msgdetail">
<p>
<a href="#" class="im_companyname" target="_blank">东阳市东彩服饰辅料有限公司</a>
<a href="#" class="ccompany" title="已认证"></a>
<!--<a href="#" class="vcompany" title="未认证"></a>-->
</p>
<p>
<a href="javascript:;" class="im_friendname" target="_blank" uid="">小米</a>
<a href="#" class="cmail" title="实名认证"></a>
<!--<a href="#" class="vmail" title="实名认证"></a>-->
<a href="#" class="cmobile" title="邮箱认证"></a>
<!--<a href="#" class="vmobile" title="邮箱认证"></a>-->
<a href="#" class="cname" title="手机认证"></a>
<!--<a href="#" class="vname" title="手机认证"></a>-->
</p>
</dd>
<dd class="im_msginfo">
<a href="javascript:;" class="im_addcontact">加为好友</a>
</dd>
</dl>
<dl>
<dt><img src="../temp/5.jpg" width="30" height="30" /></dt>
<dd class="im_msgdetail">
<p>
<a href="#" class="im_companyname" target="_blank">苍南县君越工艺品有限公司</a>
<a href="#" class="ccompany" title="已认证"></a>
<!--<a href="#" class="vcompany" title="未认证"></a>-->
</p>
<p>
<a href="javascript:;" class="im_friendname" target="_blank">小米</a>
<a href="#" class="cmail" title="实名认证"></a>
<!--<a href="#" class="vmail" title="实名认证"></a>-->
<a href="#" class="cmobile" title="邮箱认证"></a>
<!--<a href="#" class="vmobile" title="邮箱认证"></a>-->
<a href="#" class="cname" title="手机认证"></a>
<!--<a href="#" class="vname" title="手机认证"></a>-->
</p>
</dd>
<dd class="im_msginfo">
<a href="javascript:;" class="im_addcontact">加为好友</a>
</dd>
</dl>
</div>
<style type="text/css">
.im_friendsbox{width:410px;height:240px;overflow: hidden;}
.im_friendsbox dl{padding:10px 15px;line-height: 16px;width: 380px;height:33px;border-bottom: solid 1px #fafafa;}
.im_friendsbox dl:hover{background: #fcfcfc;}
.im_friendsbox dl a{display: block;float:left;color:#666;text-decoration: none;}
.im_friendsbox dl p{width: 268px;clear: both;}
.im_friendsbox dl a:hover{color:#333;text-decoration: none;}
.im_friendsbox dt,.im_friendsbox dd{float: left;}
.im_friendsbox dt{margin:3px 10px 0 0;cursor: pointer;}
.im_friendsbox dl a.im_companyname,.im_friendsbox dl a.im_friendname{margin-right:10px;}
a.ccompany,a.cmail,a.cmobile,a.cname,a.vcompany,a.vmail,a.vmobile,a.vname{float:left;width:16px;height:14px;background-image: url("../img/cinfo_icon.png");background-repeat: no-repeat;margin:3px 3px 0 0;}
a.ccompany{background-position: 0 -35px;}
a.cmail{background-position: 0 -52px;}
a.cmobile{background-position: 0 -18px;}
a.cname{background-position:0 0;}
a.vcompany{background-position: -18px -35px;}
a.vmail{background-position: -18px -52px;}
a.vmobile{background-position: -18px -18px;}
a.vname{background-position: -18px 0;}
.im_friendsbox dl a.im_addcontact{width:71px;height:21px;line-height:21px; text-align:center;margin-top:4px;background: url("../img/favc_btn.png") no-repeat;}
.im_friendsbox dl a.im_addcontact:hover{background-position: 0 bottom;}
</style>
================================================
FILE: ajax/friends.php
================================================
[
{"RencentContacts":
[
{"a": "../img/noavatar_s.png","n": "阳光般闪耀","o": "online","uid": "001","h":"", "m":0},
{"a": "../temp/1.jpg","n": "小米","o": "online","uid": "002","h": "", "m":0},
{"a": "../temp/2.jpg","n": "安卓-关龙飞","o": "online","uid": "003","h": "", "m":1},
{"a": "../temp/3.jpg","n": "诚信办证","o": "online","uid": "004","h": "", "m":0},
{"a": "../temp/4.jpg","n": "业务--小张","o": "offline","uid": "005","h": "", "m":3},
{"a": "../temp/5.jpg","n": "诚信办证","o": "offline","uid": "006","h": "", "m":0},
{"a": "../temp/6.jpg","n": "业务--小张","o": "offline","uid": "007","h": "", "m":0},
{"a": "../temp/7.jpg","n": "诚信办证","o": "offline","uid": "008","h": "", "m":0},
{"a": "../temp/8.jpg","n": "业务--小张","o": "offline","uid": "009","h": "", "m":0}
],
"Friends": [
{"a": "../temp/9.jpg","n": "诚信办证","o": "online","uid": "010","h": "", "m":1},
{"a": "../img/noavatar_s.png","n": "业务--小张","o": "online","uid": "011","h": "", "m":0},
{"a": "../temp/10.jpg","n": "关龙飞","o": "offline","uid": "012","h": "", "m":0},
{"a": "../temp/11.jpg","n": "小米","o": "offline","uid": "013","h": "", "m":0}
],
"RencentContactsOnline":5,
"FriendsOnline":2
}
]
================================================
FILE: ajax/im_contact.html
================================================
<div class="im_top">
<a href="javascript:;" class="cc"></a>
<h4>在线聊天工具 </h4>
<a href ="javascript:;" title="消息盒子" class="modify"> </a>
</div>
<div class="im_contents">
<div class="im_contact_group">
<h4 class="im_group_expansion" >最近联系人<i></i></h4>
<div class="im_group_contacts im_contacts" id="imRencentContacts">
</div>
<h4 class="im_group_away" >我的好友<i></i></h4>
<div class="im_group_contacts im_friends hide" id="imFriends">
</div>
</div>
</div>
<div class="im_bottombar">
<input type="text" value="查找联系人" x-webkit-speech speech />
<span></span>
<ul>
<!--<li class="selected smssub">短信提醒</li>-->
<!--<li class="selected">只显示在线联系人</li>-->
<!--<li class="selected current">开启声音提示</li>-->
<!--<li class="selected current">接收陌生人信息</li>-->
<!--<li class="selected current">自动登录</li>-->
<li class="setting">修改个人资料</li>
<li class="backlist">黑名单</li>
<li class="friends">推荐好友</li>
<li class="help">查看帮助</li>
<li class="loginout">退出登录</li>
</ul>
</div>
================================================
FILE: ajax/im_face.html
================================================
<ul>
<li class="current">默认表情</li>
<li class="im_faceclose">×</li>
</ul>
<div class="im_faceico">
<a href="#" title="微笑" code="/01/"><img src="../face/qq/01.gif" /></a>
<a href="#" title="色" code="/02/"><img src="../face/qq/02.gif" /></a>
<a href="#" title="发呆" code="/03/"><img src="../face/qq/03.gif" /></a>
<a href="#" title="得意" code="/04/"><img src="../face/qq/04.gif" /></a>
<a href="#" title="流泪" code="/05/"><img src="../face/qq/05.gif" /></a>
<a href="#" title="害羞" code="/06/"><img src="../face/qq/06.gif" /></a>
<a href="#" title="闭嘴" code="/07/"><img src="../face/qq/07.gif" /></a>
<a href="#" title="睡" code="/08/"><img src="../face/qq/08.gif" /></a>
<a href="#" title="撇嘴" code="/09/"><img src="../face/qq/09.gif" /></a>
<a href="#" title="大哭" code="/10/"><img src="../face/qq/10.gif" /></a>
<a href="#" title="发怒" code="/11/"><img src="../face/qq/11.gif" /></a>
<a href="#" title="调皮" code="/12/"><img src="../face/qq/12.gif" /></a>
<a href="#" title="呲牙" code="/13/"><img src="../face/qq/13.gif" /></a>
<a href="#" title="惊讶" code="/14/"><img src="../face/qq/14.gif" /></a>
<a href="#" title="难过" code="/15/"><img src="../face/qq/15.gif" /></a>
<a href="#" title="酷" code="/16/"><img src="../face/qq/16.gif" /></a>
<a href="#" title="冷汗" code="/17/"><img src="../face/qq/17.gif" /></a>
<a href="#" title="抓狂" code="/18/"><img src="../face/qq/18.gif" /></a>
<a href="#" title="吐" code="/19/"><img src="../face/qq/19.gif" /></a>
<a href="#" title="偷笑" code="/20/"><img src="../face/qq/20.gif" /></a>
<a href="#" title="可爱" code="/21/"><img src="../face/qq/21.gif" /></a>
<a href="#" title="白眼" code="/22/"><img src="../face/qq/22.gif" /></a>
<a href="#" title="傲慢" code="/23/"><img src="../face/qq/23.gif" /></a>
<a href="#" title="饥饿" code="/24/"><img src="../face/qq/24.gif" /></a>
<a href="#" title="困" code="/25/"><img src="../face/qq/25.gif" /></a>
<a href="#" title="惊恐" code="/26/"><img src="../face/qq/26.gif" /></a>
<a href="#" title="流汗" code="/27/"><img src="../face/qq/27.gif" /></a>
<a href="#" title="憨笑" code="/28/"><img src="../face/qq/28.gif" /></a>
<a href="#" title="大兵" code="/29/"><img src="../face/qq/29.gif" /></a>
<a href="#" title="奋斗" code="/30/"><img src="../face/qq/30.gif" /></a>
<a href="#" title="咒骂" code="/31/"><img src="../face/qq/31.gif" /></a>
<a href="#" title="疑问" code="/32/"><img src="../face/qq/32.gif" /></a>
<a href="#" title="嘘" code="/33/"><img src="../face/qq/33.gif" /></a>
<a href="#" title="晕" code="/34/"><img src="../face/qq/34.gif" /></a>
<a href="#" title="折磨" code="/35/"><img src="../face/qq/35.gif" /></a>
<a href="#" title="衰" code="/36/"><img src="../face/qq/36.gif" /></a>
<a href="#" title="骷髅" code="/37/"><img src="../face/qq/37.gif" /></a>
<a href="#" title="敲打" code="/38/"><img src="../face/qq/38.gif" /></a>
<a href="#" title="再见" code="/39/"><img src="../face/qq/39.gif" /></a>
<a href="#" title="擦汗" code="/40/"><img src="../face/qq/40.gif" /></a>
<a href="#" title="抠鼻" code="/41/"><img src="../face/qq/41.gif" /></a>
<a href="#" title="鼓掌" code="/42/"><img src="../face/qq/42.gif" /></a>
<a href="#" title="糗大了" code="/43/"><img src="../face/qq/43.gif" /></a>
<a href="#" title="坏笑" code="/44/"><img src="../face/qq/44.gif" /></a>
<a href="#" title="左哼哼" code="/45/"><img src="../face/qq/45.gif" /></a>
<a href="#" title="右哼哼" code="/46/"><img src="../face/qq/46.gif" /></a>
<a href="#" title="哈欠" code="/47/"><img src="../face/qq/47.gif" /></a>
<a href="#" title="鄙视" code="/48/"><img src="../face/qq/48.gif" /></a>
<a href="#" title="委屈" code="/49/"><img src="../face/qq/49.gif" /></a>
<a href="#" title="快哭了" code="/50/"><img src="../face/qq/50.gif" /></a>
<a href="#" title="阴险" code="/51/"><img src="../face/qq/51.gif" /></a>
<a href="#" title="亲亲" code="/52/"><img src="../face/qq/52.gif" /></a>
<a href="#" title="吓" code="/53/"><img src="../face/qq/53.gif" /></a>
<a href="#" title="可怜" code="/54/"><img src="../face/qq/54.gif" /></a>
<a href="#" title="啵一个" code="/55/"><img src="../face/qq/55.gif" /></a>
<a href="#" title="猪头" code="/56/"><img src="../face/qq/56.gif" /></a>
<a href="#" title="强" code="/57/"><img src="../face/qq/57.gif" /></a>
<a href="#" title="握手" code="/58/"><img src="../face/qq/58.gif" /></a>
<a href="#" title="胜利" code="/59/"><img src="../face/qq/59.gif" /></a>
<a href="#" title="OK" code="/60/"><img src="../face/qq/60.gif" /></a>
</div>
<style type="text/css">
#im_face ul{height:24px;line-height: 24px;background: #f7f7f7;padding:5px 5px 0 11px;}
#im_face ul li{float: left;padding:0 15px;list-style: none;cursor: pointer; color: #666;}
#im_face ul li.current{background: #fff;color:#c00;}
#im_face ul li.im_faceclose{float:right;line-height: 18px;padding:0 5px;font-size:16px;}
#im_face ul li.im_faceclose:hover{float:right;color:#c00;}
#im_face .im_faceico{margin:11px;background: #fff;}
#im_face .im_faceico a{display:block;width:24px;height:24px;border:solid 1px #dfe6f6;background:#fff;float: left;margin:-1px 0 0 -1px;padding:2px 2px 1px 2px;}
#im_face .im_faceico a:hover{background: #fafafa;}
</style>
================================================
FILE: ajax/im_window.html
================================================
<div id="im_window" >
<div id="im_body">
<div class="im_chats">
<a class="im_morechats" href="javascript:;">查看更多聊天记录</a>
<div class="im_chat_content" style="display: none;"></div>
</div>
<div class="im_send_msg" contentEditable="true" onpaste="msgPaste();return false;"></div>
<div class="im_operatebar">
<div style="float: left;">
<div id="im_face"></div>
<div class="im_moreoperate">
<a class="im_abacklist" href="javascript:;" >加入黑名单</a>
<a class="im_areport" href="javascript:;" >举报</a>
<a class="im_aemptyrecords" href="javascript:;" >清空聊天记录</a>
<a class="im_aclose" href="javascript:;" >×</a>
</div>
</div>
<a class="im_operates im_face" href="javascript:;" title="发送表情"></a>
<a class="im_operates im_upload_pic" href="javascript:;" title="发送图片"></a>
<a class="im_operates im_shake" href="javascript:;" title="发送窗口抖动"></a>
<a class="im_operates im_product" href="javascript:;" title="发送产品"></a>
<a class="im_operates im_card" href="javascript:;" title="发送名片"></a>
<a class="im_operates im_moreoperates" href="javascript:;" title="更多操作"></a>
<a class="im_sendmsg_btn" href="javascript:;"></a>
<i>按Ctrl+回车键快速发送消息</i>
</div>
</div>
<div id="im_contactinfo">
<div class="im_contactinfobar">
<span>用户公司信息</span>
<a class="d-close" href="javascript:;"></a>
</div>
<div class="im_contactinfos">
</div>
<div class="im_operatebars">
<a class="im_contactgohome" href="#" target="_blank">访问公司首页</a>
</div>
</div>
</div>
================================================
FILE: ajax/login.html
================================================
<div class="input-prepend">
<span class="add-on">用户名:</span>
<input class="logintxt" type="text" size="20">
</div>
<div class="input-prepend">
<span class="add-on">密码:</span>
<input class="logintxt" type="password" size="20">
</div>
<div class="input-prepend">
<span class="add-on">验证码:</span>
<input class="logintxt" type="text" size="7">
<img class="safecode" title="换一张" src="http://login.sina.com.cn/cgi/pin.php?r=20005262&s=0&p=0e3d5b9828d7d564dfbb48471161bcfe511c" height="28">
</div>
<div class="input-prepend"><a href="#" target="_blank">注册新账户</a> <a href="#" target="_blank">忘记密码?</a></div>
<style type="text/css">
.input-prepend{clear:both;padding:7px 25px;height:18px;color: #333333;font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;font-size: 12px;line-height: 18px;}
.add-on{width: 4em;text-align: right;display: block;float: left;border-radius: 2px 0 0 2px;margin-right: -1px;background-color: #fafafa;border: 1px solid #CCCCCC;font-weight: normal;height: 18px;line-height: 18px;min-width: 16px;padding: 4px 5px;text-shadow: 0 1px 0 #FFFFFF;vertical-align: middle;}
.logintxt{float: left;border-radius: 0 2px 2px 0;margin-left: 0;margin-bottom: 0;-moz-transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;border: 1px solid #CCCCCC;font-size: 13px;height: 18px;line-height: 18px;padding: 4px;font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;}
.input-prepend a{line-height:28px;float: left;margin-left:10px;text-decoration: none;}
input:focus{border-color: rgba(82, 168, 236, 0.8); box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset, 0px 0px 8px rgba(82, 168, 236, 0.6); outline: 0px none;}
.input-prepend .safecode{margin:0 0 0 8px;cursor: pointer;float: left;}
</style>
================================================
FILE: ajax/msgbox.html
================================================
<div class="im_msgboxs" id="im_msgboxs" style="height:240px;">
<dl class="im_msgbox">
<dt class="uid"><img src="../temp/1.jpg" width="30" height="30" /></dt>
<dd class="im_msgdetail">
<p><a href="#" target="_blank">淄博林华商贸有限公司</a> - <a href="javascript:;" class="msg_contact" uid="90942834902">小麦</a></p>
<p>对方发送了一张名片给您…… </p>
</dd>
<dd class="im_msginfo" uid="0980924"><b title="查看消息">37</b>7-18</dd>
</dl>
<dl class="im_msgbox">
<dt class="uid"><img src="../img/avatar_s-sys.png" width="30" height="30" /></dt>
<dd class="im_msgdetail">
<p><a href="#" target="_blank">系统小秘书</a></p>
<p>您的账户存在异常,请及时修改密码!</p>
</dd>
<dd class="im_msginfo" uid="0980924"><b title="查看消息">37</b>7-18</dd>
</dl>
</div>
<style type="text/css">
dl.im_msgbox{padding:10px;line-height: 14px;width: 420px;font-family:tahoma,arial,\5b8b\4f53;-moz-user-select: none;border-bottom: solid 1px #fafafa;height:33px;clear: both;}
dl.im_msgbox:hover{background: #fcfcfc;}
dl.im_msgbox a{color:blue;text-decoration: none;}
dl.im_msgbox a:hover{text-decoration:underline;}
dl.im_msgbox dt{margin-right:10px;cursor: pointer;float: left;}
dl.im_msgbox dd{color:#999;float: left;}
dl.im_msgbox dd.im_msgdetail{width:300px;}
dl.im_msgbox dd.im_msginfo{width: 80px;text-align: right;padding-top:8px;}
dl.im_msgbox dd b{padding:0 5px;margin-left:10px;background: #c00;color:#fff;margin-right:10px;-moz-border-radius:8px;-khtml-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;font-weight: normal;line-height: 12px;overflow: hidden;cursor: pointer;}
</style>
================================================
FILE: ajax/product.html
================================================
<div class="im_productbox">
<a href="javascript:;" class="im_product_img">
<img src="http://www.zghnyb.com/userfiles/image/20120417144524.jpg" alt="产品"/>
</a>
<p class="im_product_info">
<a href="#" target="_blank" class="im_product_name">固定一体功能型超声波流量计</a>
<span class="im_product_a"><a href="#" target="_blank" class="im_product_go">去看看</a>
<a href="javascript:;" class="im_product_favorites">加入收藏</a>
<a href="javascript:;" class="im_product_share">分享</a>
</span>
<a href="#" target="_blank" class="im_product_more">+ 更多同类产品</a>
</p>
</div>
<style type="text/css">
.im_productbox{width: 380px;background: #fcfcfc; padding: 3px 10px;float: left;margin:3px -10px;_margin:3px -5px;min-height: 68px;}
.im_productbox:hover{background: #fffcec;}
.im_productbox a{text-decoration:none;}
.im_productbox a:hover{text-decoration:underline;}
.im_product_img{float:left;margin-right:10px;background:#fff;border:solid 1px #ddd;display:table-cell;overflow:hidden;text-align:center;line-height:0.94;vertical-align:middle;*display:block;font-size:54px;/**约为line-height*0.875**/width:66px;height:66px;}
.im_product_img:hover{border-color:#aaa;}
.im_product_img img{max-width: 66px;max-height: 66px;vertical-align: middle;_width:expression(this.width >66 && this.height <= this.width ? 66: true); _height:expression(this.height > 66 && this.width <= this.height ? 66 : true);}
.im_product_name{display: block;}
.im_product_info{float: left; }
.im_product_a{ width: 100%; display: block; color: #6e737b; font-size: 12px;padding-top:5px;}
.im_product_a a{margin-right:10px; padding:2px 0 2px 17px;color:#999;}
.im_product_a a.im_product_go{background: url("../img/product_ico.png") 0 2px no-repeat;padding-left:13px;}
.im_product_favorites{background: url("../img/product_ico.png") 0 -38px no-repeat;}
.im_product_share{background: url("../img/product_ico.png") 0 -74px no-repeat;}
.im_product_a a.im_product_go:hover{background: url("../img/product_ico.png") 0 -19px no-repeat;}
.im_product_favorites:hover{background: url("../img/product_ico.png") 0 -55px no-repeat;}
.im_product_share:hover{background: url("../img/product_ico.png") 0 -90px no-repeat;}
.im_product_more{color: #6e737b; font-size: 12px;float:left;margin-top: 12px;}
</style>
================================================
FILE: ajax/report.html
================================================
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style type="text/css">
*{padding:0;margin:0;}
body{font-size:12px;color:#333;line-height: 20px;}
label,input{float: left;}
input{margin:3px 5px 0 0;}
label{margin-right:8px;padding:0 10px 0 2px;}
label:hover{background: #fafafa;}
p{line-height: 36px;width: 100%;clear: both;}
.report{padding:5px 20px;}
</style>
</head>
<body>
<div class="report">
<p>举报类型:</p>
<label><input type="checkbox">色情</label>
<label><input type="checkbox">广告欺诈</label>
<label><input type="checkbox">骗子</label>
<label><input type="checkbox">恶意骚扰</label>
<label><input type="checkbox">反动</label>
<label><input type="checkbox">其他</label>
<p>举报说明:</p>
<textarea name="" style="width:358px;height:80px;border:solid 1px #b7b7b7;outline: none;"></textarea>
</div>
</body>
</html>
================================================
FILE: ajax/set.html
================================================
<img src="img/set.png" width="489" height="288" />
================================================
FILE: ajax/share.html
================================================
<div class="im_sharebox">
<a href="#" class="weibo" target="_blank">新浪微博</a>
<a href="#" class="t" target="_blank">腾讯微博</a>
<a href="#" class="taobao" target="_blank">我的淘宝</a>
<a href="#" class="qzone" target="_blank">QQ空间</a>
<a href="#" class="reren" target="_blank">人人网</a>
<a href="#" class="meili" target="_blank">美丽说</a>
<a href="#" class="mogu" target="_blank">蘑菇街</a>
<a href="#" class="kaixin" target="_blank">开心网</a>
<a href="#" class="sohu" target="_blank">搜狐微博</a>
<a href="#" class="enet" target="_blank">网易微博</a>
<a href="#" class="diandian" target="_blank">点点网</a>
<a href="#" class="btie" target="_blank">百度贴吧</a>
<a href="#" class="twitter" target="_blank">Twitter</a>
<a href="#" class="facebook" target="_blank">Facebook</a>
</div>
<style type="text/css">
*{padding:0;margin:0;}
body{font-size: 12px}
.im_sharebox{width: 332px;height: 162px;}
.im_sharebox a{display: block;float: left;width:76px;padding-left:24px;margin:4px 5px;line-height: 24px;color:#666;text-decoration: none;background: url("../img/share.png") no-repeat 4px 4px;-moz-border-radius:2px;-khtml-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}
.im_sharebox a:hover{border:solid 1px #ddd;background-color: #fcfcfc;margin:3px 4px;text-decoration: none;}
.im_sharebox a.weibo{background-position: 4px -36px;}
.im_sharebox a.t{background-position: 4px -156px;}
.im_sharebox a.taobao{background-position: 4px -476px;}
.im_sharebox a.qzone{background-position: 4px 4px;}
.im_sharebox a.reren{background-position: 4px -116px;}
.im_sharebox a.meili{background-position: 4px -1471px;}
.im_sharebox a.mogu{background-position: 4px -1511px;}
.im_sharebox a.kaixin{background-position: 4px -196px;}
.im_sharebox a.sohu{background-position: 4px -356px;}
.im_sharebox a.enet{background-position: 4px -636px;}
.im_sharebox a.diandian{background-position: 4px -1551px;}
.im_sharebox a.btie{background-position: 4px -76px;}
.im_sharebox a.twitter{background-position: 4px -1078px;}
.im_sharebox a.facebook{background-position: 4px -1036px;}
</style>
================================================
FILE: ajax/userinfo.php
================================================
[
{"UserConfig": [0,0,0,0],"UserAvatar": "../img/avatar_b-sys.png","UserName": "zihan","isOnline": "online","UID": "795238409283faseafaeeDSIKHJ","cid": "0982304","cname": "淄博林华商贸有限公司" }
]
================================================
FILE: demo.html
================================================
<!DOCTYPE html>
<html>
<head>
<title>即时通讯示例</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>
<a class="oWindow" href="#" uid="8759328409230" style="display:block;width:90px;margin:20px"><img src="img/imonline.png" /></a>
<script type="text/javascript" src="js/jQuery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/im.plus.js?skin=im"></script>
<script type="text/javascript" src="js/jQuery.im.js"></script>
<script type="text/javascript">
$(function() {
$("a.oWindow").click(function(){
var uid=$(this).attr("uid");
$(document).FnWebIM({
autoLogin :true, //boolean型,默认是否自动登录,true:自动登录,false:手动登录,默认为true
msgRefreshTime :1000, //number型,消息刷新时间,单位为ms
friendRefreshTime :10000, //number型,好友刷新时间,单位为ms
showSecretary :true, //boolean型,默认是否显示小秘书,true:显示,false:不显示,默认为true
noticeContent :"唐僧师徒历经千辛万苦,终于见到了佛祖……", //string型,公告内容 为空时不显示公告
sendPicture :true, //boolean型,是否允许发送图片,true:允许,false:不允许,默认为true
msgMaxSize :300, //number型,单条消息最大允许字符
msgSound :false, //boolean型,是否开启声音提醒,true:开启,false:关闭,默认为true
defaultWindow :uid //string型,登录后打开新聊天窗口,此处接收的参数为联系人的uid,否则会出错
});
});
});
</script>
</body>
</html>
================================================
FILE: docs/css/docs.css
================================================
* {
margin: 0;
padding: 0;
}
a {
outline: none;
}
body {
line-height: 1;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
html, body {
background: url(../img/faq_foot_bg.png) repeat scroll 0 0 #575C63;
color: #F0F0F0;
font: 14px/1.5 Helvetica, "Microsoft YaHei", Arial, Tahoma;
height: 100%;
width: 100%;
text-align: center;
text-shadow: 0 1px 1px #333;
}
pre, code {
font: 14px/1.5 Helvetica, "Microsoft YaHei", Arial, Tahoma;
margin: 10px 0;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.fnFaq .faq {
width: 100%;
background: url(../img/bg_faq_bottom.png) repeat 0 0 transparent;
text-shadow: none;
text-align: left;
padding: 0 0 50px;
}
.fnFaq .container {
width: 1000px;
margin: 0 auto;
}
.fnFaq .faq .logo {
position: fixed;
top: 40px;
display: block;
width: 195px;
height: 110px;
background: url(../img/faq_ico.png) no-repeat transparent -3px 0;
}
.fnFaq .main {
position: relative;
width: 790px;
margin-left: 212px;
background: url(../img/bg_faq.png) repeat 0 0 #fff;
box-shadow: 0 1px 1px #999;
padding: 45px 0 50px;
}
.fnFaq .main .faqLine {
position: absolute;
top: 0;
left: 30px;
width: 1px;
height: 100%;
background: #f1f3f3;
border-left: 1px solid #edefef;
border-right: 1px solid #edefef;
}
.fnFaq .main .content {
text-align: left;
width: 770px;
}
.fnFaq .main .content dl {
margin: 0 0 20px;
}
.fnFaq .main .content dt {
background: url(../img/faq_line_point.png) no-repeat 20px 0 transparent;
color: #1b1d20;
font-size: 16px;
font-weight: 700;
padding-left: 50px;
margin: 0 0 14px;
}
.fnFaq .main .content dd {
color: #565b62;
font-size: 14px;
line-height: 1.6em;
padding-left: 50px;
}
.fnFaq .main .descripte {
color: #6ba5be;
padding-left: 50px;
}
.fnFaq .footer {
height: 90px;
width: 1000px;
line-height: 90px;
font-size: 36px;
text-align: left;
margin: 0 auto;
}
.fnFaq .footer .img {
width: 60px;
height: 60px;
margin-top: 14px;
float: right;
background: url(../img/faq_foot_img.png) no-repeat transparent;
}
table {
max-width: 100%;
border-collapse: collapse;
border-spacing: 0;
background-color: #fff;
}
.table {
width: 100%;
margin-bottom: 18px;
border: 1px solid #dddddd;
}
.table th,
.table td {
padding: 8px;
line-height: 18px;
text-align: left;
vertical-align: top;
border: 1px solid #dddddd;
}
.table th {
font-weight: bold;
}
.table thead th {
vertical-align: bottom;
}
.table colgroup + thead tr:first-child th,
.table colgroup + thead tr:first-child td,
.table thead:first-child tr:first-child th,
.table thead:first-child tr:first-child td {
border-top: 0;
}
.table tbody + tbody {
border-top: 2px solid #dddddd;
}
.table-striped tbody tr:nth-child(odd) td,
.table-striped tbody tr:nth-child(odd) th {
background-color: #f9f9f9;
}
.table tbody tr:hover td,
.table tbody tr:hover th {
background-color: #f5f5f5;
}
.btn {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
padding: 4px 10px 4px;
margin-bottom: 0;
text-decoration: none;
font-size: 13px;
line-height: 18px;
color: #333333;
text-align: center;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
vertical-align: middle;
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
background-image: linear-gradient(top, #ffffff, #e6e6e6);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#e6e6e6', GradientType = 0);
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:dximagetransform.microsoft.gradient(enabled = false);
border: 1px solid #cccccc;
border-bottom-color: #b3b3b3;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
cursor: pointer;
*margin-left: .3em;
}
.btn:hover,
.btn:active,
.btn.active,
.btn.disabled,
.btn[disabled] {
background-color: #e6e6e6;
}
.btn:active,
.btn.active {
background-color: #cccccc \9;
}
.btn:first-child {
*margin-left: 0;
}
.btn:hover {
color: #333333;
text-decoration: none;
background-color: #e6e6e6;
background-position: 0 -15px;
-webkit-transition: background-position 0.1s linear;
-moz-transition: background-position 0.1s linear;
-ms-transition: background-position 0.1s linear;
-o-transition: background-position 0.1s linear;
transition: background-position 0.1s linear;
}
.btn:focus {
outline: thin dotted #333;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.btn.active,
.btn:active {
background-image: none;
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
background-color: #e6e6e6;
background-color: #d9d9d9 \9;
outline: 0;
}
.btn.disabled,
.btn[disabled] {
cursor: default;
background-image: none;
background-color: #e6e6e6;
opacity: 0.65;
filter: alpha(opacity = 65);
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.btn-large {
padding: 9px 14px;
font-size: 15px;
line-height: normal;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.btn-large [class^="icon-"] {
margin-top: 1px;
}
.btn-small {
padding: 5px 9px;
font-size: 11px;
line-height: 16px;
}
.btn-small [class^="icon-"] {
margin-top: -1px;
}
.btn-mini {
padding: 2px 6px;
font-size: 11px;
line-height: 14px;
}
.btn-primary,
.btn-primary:hover,
.btn-warning,
.btn-warning:hover,
.btn-danger,
.btn-danger:hover,
.btn-success,
.btn-success:hover,
.btn-info,
.btn-info:hover,
.btn-inverse,
.btn-inverse:hover {
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
color: #ffffff;
}
.btn-primary.active,
.btn-warning.active,
.btn-danger.active,
.btn-success.active,
.btn-info.active,
.btn-inverse.active {
color: rgba(255, 255, 255, 0.75);
}
.btn-primary {
background-color: #0074cc;
background-image: -moz-linear-gradient(top, #0088cc, #0055cc);
background-image: -ms-linear-gradient(top, #0088cc, #0055cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0055cc);
background-image: -o-linear-gradient(top, #0088cc, #0055cc);
background-image: linear-gradient(top, #0088cc, #0055cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#0088cc', endColorstr = '#0055cc', GradientType = 0);
border-color: #0055cc #0055cc #003580;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:dximagetransform.microsoft.gradient(enabled = false);
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active,
.btn-primary.disabled,
.btn-primary[disabled] {
background-color: #0055cc;
}
.btn-primary:active,
.btn-primary.active {
background-color: #004099 \9;
}
.btn-warning {
background-color: #faa732;
background-image: -moz-linear-gradient(top, #fbb450, #f89406);
background-image: -ms-linear-gradient(top, #fbb450, #f89406);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
background-image: -o-linear-gradient(top, #fbb450, #f89406);
background-image: linear-gradient(top, #fbb450, #f89406);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#fbb450', endColorstr = '#f89406', GradientType = 0);
border-color: #f89406 #f89406 #ad6704;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:dximagetransform.microsoft.gradient(enabled = false);
}
.btn-warning:hover,
.btn-warning:active,
.btn-warning.active,
.btn-warning.disabled,
.btn-warning[disabled] {
background-color: #f89406;
}
.btn-warning:active,
.btn-warning.active {
background-color: #c67605 \9;
}
.btn-danger {
background-color: #da4f49;
background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
background-image: -ms-linear-gradient(top, #ee5f5b, #bd362f);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
background-image: linear-gradient(top, #ee5f5b, #bd362f);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ee5f5b', endColorstr = '#bd362f', GradientType = 0);
border-color: #bd362f #bd362f #802420;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:dximagetransform.microsoft.gradient(enabled = false);
}
.btn-danger:hover,
.btn-danger:active,
.btn-danger.active,
.btn-danger.disabled,
.btn-danger[disabled] {
background-color: #bd362f;
}
.btn-danger:active,
.btn-danger.active {
background-color: #942a25 \9;
}
.btn-success {
background-color: #5bb75b;
background-image: -moz-linear-gradient(top, #62c462, #51a351);
background-image: -ms-linear-gradient(top, #62c462, #51a351);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
background-image: -webkit-linear-gradient(top, #62c462, #51a351);
background-image: -o-linear-gradient(top, #62c462, #51a351);
background-image: linear-gradient(top, #62c462, #51a351);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#62c462', endColorstr = '#51a351', GradientType = 0);
border-color: #51a351 #51a351 #387038;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:dximagetransform.microsoft.gradient(enabled = false);
}
.btn-success:hover,
.btn-success:active,
.btn-success.active,
.btn-success.disabled,
.btn-success[disabled] {
background-color: #51a351;
}
.btn-success:active,
.btn-success.active {
background-color: #408140 \9;
}
.btn-info {
background-color: #49afcd;
background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
background-image: -ms-linear-gradient(top, #5bc0de, #2f96b4);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
background-image: linear-gradient(top, #5bc0de, #2f96b4);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#5bc0de', endColorstr = '#2f96b4', GradientType = 0);
border-color: #2f96b4 #2f96b4 #1f6377;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:dximagetransform.microsoft.gradient(enabled = false);
}
.btn-info:hover,
.btn-info:active,
.btn-info.active,
.btn-info.disabled,
.btn-info[disabled] {
background-color: #2f96b4;
}
.btn-info:active,
.btn-info.active {
background-color: #24748c \9;
}
.btn-inverse {
background-color: #414141;
background-image: -moz-linear-gradient(top, #555555, #222222);
background-image: -ms-linear-gradient(top, #555555, #222222);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));
background-image: -webkit-linear-gradient(top, #555555, #222222);
background-image: -o-linear-gradient(top, #555555, #222222);
background-image: linear-gradient(top, #555555, #222222);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#555555', endColorstr = '#222222', GradientType = 0);
border-color: #222222 #222222 #000000;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:dximagetransform.microsoft.gradient(enabled = false);
}
.btn-inverse:hover,
.btn-inverse:active,
.btn-inverse.active,
.btn-inverse.disabled,
.btn-inverse[disabled] {
background-color: #222222;
}
.btn-inverse:active,
.btn-inverse.active {
background-color: #080808 \9;
}
button.btn,
input[type="submit"].btn {
*padding-top: 2px;
*padding-bottom: 2px;
}
button.btn::-moz-focus-inner,
input[type="submit"].btn::-moz-focus-inner {
padding: 0;
border: 0;
}
button.btn.btn-large,
input[type="submit"].btn.btn-large {
*padding-top: 7px;
*padding-bottom: 7px;
}
button.btn.btn-small,
input[type="submit"].btn.btn-small {
*padding-top: 3px;
*padding-bottom: 3px;
}
button.btn.btn-mini,
input[type="submit"].btn.btn-mini {
*padding-top: 1px;
*padding-bottom: 1px;
}
.alert {
padding: 8px 35px 8px 14px;
margin-bottom: 18px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
background-color: #fcf8e3;
border: 1px solid #fbeed5;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
color: #c09853;
}
.alert-heading {
color: inherit;
}
.alert .close {
position: relative;
top: -2px;
right: -21px;
line-height: 18px;
}
.alert-success {
background-color: #dff0d8;
border-color: #d6e9c6;
color: #468847;
}
.alert-danger,
.alert-error {
background-color: #f2dede;
border-color: #eed3d7;
color: #b94a48;
}
.alert-info {
background-color: #d9edf7;
border-color: #bce8f1;
color: #3a87ad;
}
.alert-block {
padding-top: 14px;
padding-bottom: 14px;
}
.alert-block > p,
.alert-block > ul {
margin-bottom: 0;
}
.alert-block p + p {
margin-top: 5px;
}
================================================
FILE: docs/index.html
================================================
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>凡纳网 -- 技术说明文档</title>
<link rel="stylesheet" type="text/css" href="css/docs.css"/>
<link rel="stylesheet" type="text/css" href="prettify/prettify.css" media="all">
</head>
<body>
<div class="fnFaq">
<div class="faq">
<div class="container">
<div class="logo"></div>
<div class="main">
<div class="faqLine"></div>
<div class="content">
<dl>
<dt>1.这是个什么插件?</dt>
<dd>
<div class="alert alert-info">此插件是凡纳网开发的基于jQuery的一款web即时通讯插件。
</div>
</dd>
</dl>
<dl>
<dt>2.如何调用</dt>
<dd>
STEP1:在需要调用的页面最后引入以下js
<pre class="prettyprint linenums">
<script type="text/javascript" src="js/jQuery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/fanna_im.plus.js?skin=fanna_im"></script>
<script type="text/javascript" src="js/jQuery.fnIM.js"></script>
</pre>
<div class="alert">注意:<script type="text/javascript" src="js/fanna_im.plus.js?skin=fanna_im"></script>中所带的skin参数为插件所用到的css文件,如无特殊需要,请勿更改,否则会出错!!!。
</div>
STEP2:调用插件
<pre class="prettyprint linenums">
$(function() {
$(document).FnWebIM(); //简单调用
});
</pre>
</dd>
</dl>
<dl>
<dt>3.参数设置</dt>
<dd>
<pre class="prettyprint linenums">
$(function() {
$(document).FnWebIM({
autoLogin :true,
msgRefreshTime :1000,
friendRefreshTime :10000,
showSecretary :true,
noticeContent :"公告内容",
sendPicture :true,
msgMaxSize :300,
msgSound :false,
defaultWindow :""
});
});
</pre>
</dd>
</dl>
<dl>
<dt>4.【Demo】点击联系人后打开新聊天窗口</dt>
<dd>
html:
<pre class="prettyprint linenums lang-html">
<a class="oWindow" href="#" uid="8759328409230">联系我</a>
</pre>
jQuery:
<pre class="prettyprint linenums">
$(function() {
$("a.oWindow").click(function(){
var uid=$(this).attr("uid");
$(document).FnWebIM({
defaultWindow :uid //注意uid的正确性,当获取不到用户信息时,会出错!!
});
});
});
</pre>
</dd>
</dl>
<dt>5.相关参数说明</dt>
<dd>
<table class="table table-striped">
<thead>
<tr>
<td>参数</td>
<td>类型</td>
<td>说明</td>
<td>默认值</td>
</tr>
</thead>
<tbody>
<tr>
<td>autoLogin</td>
<td>boolean型</td>
<td>是否自动登录,true:自动登录,false:手动登录</td>
<td>true</td>
</tr>
<tr>
<td>msgRefreshTime</td>
<td>number型</td>
<td>消息刷新时间,单位为ms</td>
<td>1000</td>
</tr>
<tr>
<td>friendRefreshTime</td>
<td>number型</td>
<td>好友列表刷新时间,单位为ms</td>
<td>10000</td>
</tr>
<tr>
<td>showSecretary</td>
<td>boolean型</td>
<td>默认是否显示小秘书,true:显示,false:不显示</td>
<td>true</td>
</tr>
<tr>
<td>noticeContent</td>
<td>string型</td>
<td>公告内容,为空时不显示公告</td>
<td> </td>
</tr>
<tr>
<td>sendPicture</td>
<td>boolean型</td>
<td>是否允许发送图片,true:允许,false:不允许</td>
<td>true</td>
</tr>
<tr>
<td>msgMaxSize</td>
<td>number型</td>
<td>单条消息最大允许字符数</td>
<td>300</td>
</tr>
<tr>
<td>msgSound</td>
<td>boolean型</td>
<td>boolean型,是否开启声音提醒,true:开启,false:关闭</td>
<td>true</td>
</tr>
<tr>
<td>defaultWindow</td>
<td>string型</td>
<td>登录后打开新聊天窗口,此处接收的参数为联系人的uid,<br />否则会出错。为空时不打开新窗口</td>
<td> </td>
</tr>
</tbody>
</table>
</dd>
</dl>
<dl>
<dt>5.相关页面说明</dt>
<dd>
<table class="table table-striped">
<thead>
<tr>
<td>页面</td>
<td>参数说明</td>
</tr>
</thead>
<tbody>
<tr>
<td>userinfo.jsp</td>
<td>· 从session中获取请求的用户标识(UID);<br/>
· update:更新用户设置
</td>
</tr>
<tr>
<td>chats.jsp</td>
<td>· 从session中获取请求的用户标识(UID);<br />
· del:清空聊天记录;<br />
· add:查看更多记录;<br/>
· time:聊天记录刷新时间
</td>
</tr>
<tr>
<td>friends.jsp</td>
<td>· 从session中获取请求的用户标识(UID);<br />
· time:联系人列表刷新时间
</td>
</tr>
<tr>
<td>company.html</td>
<td>· uid:所请求的用户uid;</td>
</tr>
<tr>
<td>friends.html</td>
<td>· 从session中获取请求的用户标识(UID);<br/>
· type:好友类型:推荐好友|黑名单
</td>
</tr>
<tr>
<td>msgbox.html</td>
<td>· uid:所请求的用户uid;</td>
</tr>
<tr>
<td>product.html</td>
<td>· pid:所请求的产品ID;</td>
</tr>
<tr>
<td>set.html</td>
<td>暂空</td>
</tr>
</tbody>
<thead>
<tr>
<td>其他页面</td>
<td>说明</td>
</tr>
</thead>
<tbody>
<tr>
<td>im_contact.html</td>
<td>联系人列表模板</td>
</tr>
<tr>
<td>im_window.html</td>
<td>聊天窗口模板</td>
</tr>
<tr>
<td>reprot.html</td>
<td>举报好友页面</td>
</tr>
<tr>
<td>share.html</td>
<td>产品分享页面</td>
</tr>
<tr>
<td>login.html</td>
<td>会话超时页面</td>
</tr>
</tbody>
</table>
</dd>
</dl>
<dl>
<dt>6.实例演示</dt>
<dd>
<a href="../index.html" target="_blank" class="btn">普通示例[自动登录]</a>
<a href="../demo.html" target="_blank" class="btn btn-success oWindow" uid="984234032932" >点击联系人登录并弹出联系人窗口</a>
</dd>
</dl>
<dl>
<dt>7.示例图</dt>
<dd>
<img src="img/webim.png" width="100%" alt="" />
<a href="img/webim.png" target="_blank">查看大图</a>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="img"></div>
<div class="txt">凡纳网 fnWebIM插件说明文档</div>
</div>
</div>
<script type="text/javascript" src="js/jQuery-1.7.1.min.js"></script>
<script type="text/javascript" src="prettify/prettify.js"></script>
<script type="text/javascript">
$(function () {
window.prettyPrint && prettyPrint()
});
</script>
</body>
</html>
================================================
FILE: docs/prettify/lang-apollo.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]);
================================================
FILE: docs/prettify/lang-clj.js
================================================
/*
Copyright (C) 2011 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
var a=null;
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a],
["typ",/^:[\dA-Za-z-]+/]]),["clj"]);
================================================
FILE: docs/prettify/lang-css.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
================================================
FILE: docs/prettify/lang-go.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]);
================================================
FILE: docs/prettify/lang-hs.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/,
null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]);
================================================
FILE: docs/prettify/lang-lisp.js
================================================
var a=null;
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]);
================================================
FILE: docs/prettify/lang-lua.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],
["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]);
================================================
FILE: docs/prettify/lang-ml.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]);
================================================
FILE: docs/prettify/lang-n.js
================================================
var a=null;
PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/,
a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/,
a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]);
================================================
FILE: docs/prettify/lang-proto.js
================================================
PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]);
================================================
FILE: docs/prettify/lang-scala.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]);
================================================
FILE: docs/prettify/lang-sql.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|merge|national|nocheck|nonclustered|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|percent|plan|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rule|save|schema|select|session_user|set|setuser|shutdown|some|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|union|unique|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|writetext)(?=[^\w-]|$)/i,
null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]);
================================================
FILE: docs/prettify/lang-tex.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);
================================================
FILE: docs/prettify/lang-vb.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r \xa0
"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"“”'],["com",/^['\u2018\u2019].*/,null,"'‘’"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i,
null],["com",/^rem.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]);
================================================
FILE: docs/prettify/lang-vhdl.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i],
["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]);
================================================
FILE: docs/prettify/lang-wiki.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t \xa0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]);
PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]);
================================================
FILE: docs/prettify/lang-xq.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["var pln",/^\$[\w-]+/,null,"$"]],[["pln",/^[\s=][<>][\s=]/],["lit",/^@[\w-]+/],["tag",/^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["com",/^\(:[\S\s]*?:\)/],["pln",/^[(),/;[\]{}]$/],["str",/^(?:"(?:[^"\\{]|\\[\S\s])*(?:"|$)|'(?:[^'\\{]|\\[\S\s])*(?:'|$))/,null,"\"'"],["kwd",/^(?:xquery|where|version|variable|union|typeswitch|treat|to|then|text|stable|sortby|some|self|schema|satisfies|returns|return|ref|processing-instruction|preceding-sibling|preceding|precedes|parent|only|of|node|namespace|module|let|item|intersect|instance|in|import|if|function|for|follows|following-sibling|following|external|except|every|else|element|descending|descendant-or-self|descendant|define|default|declare|comment|child|cast|case|before|attribute|assert|ascending|as|ancestor-or-self|ancestor|after|eq|order|by|or|and|schema-element|document-node|node|at)\b/],
["typ",/^(?:xs:yearMonthDuration|xs:unsignedLong|xs:time|xs:string|xs:short|xs:QName|xs:Name|xs:long|xs:integer|xs:int|xs:gYearMonth|xs:gYear|xs:gMonthDay|xs:gDay|xs:float|xs:duration|xs:double|xs:decimal|xs:dayTimeDuration|xs:dateTime|xs:date|xs:byte|xs:boolean|xs:anyURI|xf:yearMonthDuration)\b/,null],["fun pln",/^(?:xp:dereference|xinc:node-expand|xinc:link-references|xinc:link-expand|xhtml:restructure|xhtml:clean|xhtml:add-lists|xdmp:zip-manifest|xdmp:zip-get|xdmp:zip-create|xdmp:xquery-version|xdmp:word-convert|xdmp:with-namespaces|xdmp:version|xdmp:value|xdmp:user-roles|xdmp:user-last-login|xdmp:user|xdmp:url-encode|xdmp:url-decode|xdmp:uri-is-file|xdmp:uri-format|xdmp:uri-content-type|xdmp:unquote|xdmp:unpath|xdmp:triggers-database|xdmp:trace|xdmp:to-json|xdmp:tidy|xdmp:subbinary|xdmp:strftime|xdmp:spawn-in|xdmp:spawn|xdmp:sleep|xdmp:shutdown|xdmp:set-session-field|xdmp:set-response-encoding|xdmp:set-response-content-type|xdmp:set-response-code|xdmp:set-request-time-limit|xdmp:set|xdmp:servers|xdmp:server-status|xdmp:server-name|xdmp:server|xdmp:security-database|xdmp:security-assert|xdmp:schema-database|xdmp:save|xdmp:role-roles|xdmp:role|xdmp:rethrow|xdmp:restart|xdmp:request-timestamp|xdmp:request-status|xdmp:request-cancel|xdmp:request|xdmp:redirect-response|xdmp:random|xdmp:quote|xdmp:query-trace|xdmp:query-meters|xdmp:product-edition|xdmp:privilege-roles|xdmp:privilege|xdmp:pretty-print|xdmp:powerpoint-convert|xdmp:platform|xdmp:permission|xdmp:pdf-convert|xdmp:path|xdmp:octal-to-integer|xdmp:node-uri|xdmp:node-replace|xdmp:node-kind|xdmp:node-insert-child|xdmp:node-insert-before|xdmp:node-insert-after|xdmp:node-delete|xdmp:node-database|xdmp:mul64|xdmp:modules-root|xdmp:modules-database|xdmp:merging|xdmp:merge-cancel|xdmp:merge|xdmp:md5|xdmp:logout|xdmp:login|xdmp:log-level|xdmp:log|xdmp:lock-release|xdmp:lock-acquire|xdmp:load|xdmp:invoke-in|xdmp:invoke|xdmp:integer-to-octal|xdmp:integer-to-hex|xdmp:http-put|xdmp:http-post|xdmp:http-options|xdmp:http-head|xdmp:http-get|xdmp:http-delete|xdmp:hosts|xdmp:host-status|xdmp:host-name|xdmp:host|xdmp:hex-to-integer|xdmp:hash64|xdmp:hash32|xdmp:has-privilege|xdmp:groups|xdmp:group-serves|xdmp:group-servers|xdmp:group-name|xdmp:group-hosts|xdmp:group|xdmp:get-session-field-names|xdmp:get-session-field|xdmp:get-response-encoding|xdmp:get-response-code|xdmp:get-request-username|xdmp:get-request-user|xdmp:get-request-url|xdmp:get-request-protocol|xdmp:get-request-path|xdmp:get-request-method|xdmp:get-request-header-names|xdmp:get-request-header|xdmp:get-request-field-names|xdmp:get-request-field-filename|xdmp:get-request-field-content-type|xdmp:get-request-field|xdmp:get-request-client-certificate|xdmp:get-request-client-address|xdmp:get-request-body|xdmp:get-current-user|xdmp:get-current-roles|xdmp:get|xdmp:function-name|xdmp:function-module|xdmp:function|xdmp:from-json|xdmp:forests|xdmp:forest-status|xdmp:forest-restore|xdmp:forest-restart|xdmp:forest-name|xdmp:forest-delete|xdmp:forest-databases|xdmp:forest-counts|xdmp:forest-clear|xdmp:forest-backup|xdmp:forest|xdmp:filesystem-file|xdmp:filesystem-directory|xdmp:exists|xdmp:excel-convert|xdmp:eval-in|xdmp:eval|xdmp:estimate|xdmp:email|xdmp:element-content-type|xdmp:elapsed-time|xdmp:document-set-quality|xdmp:document-set-property|xdmp:document-set-properties|xdmp:document-set-permissions|xdmp:document-set-collections|xdmp:document-remove-properties|xdmp:document-remove-permissions|xdmp:document-remove-collections|xdmp:document-properties|xdmp:document-locks|xdmp:document-load|xdmp:document-insert|xdmp:document-get-quality|xdmp:document-get-properties|xdmp:document-get-permissions|xdmp:document-get-collections|xdmp:document-get|xdmp:document-forest|xdmp:document-delete|xdmp:document-add-properties|xdmp:document-add-permissions|xdmp:document-add-collections|xdmp:directory-properties|xdmp:directory-locks|xdmp:directory-delete|xdmp:directory-create|xdmp:directory|xdmp:diacritic-less|xdmp:describe|xdmp:default-permissions|xdmp:default-collections|xdmp:databases|xdmp:database-restore-validate|xdmp:database-restore-status|xdmp:database-restore-cancel|xdmp:database-restore|xdmp:database-name|xdmp:database-forests|xdmp:database-backup-validate|xdmp:database-backup-status|xdmp:database-backup-purge|xdmp:database-backup-cancel|xdmp:database-backup|xdmp:database|xdmp:collection-properties|xdmp:collection-locks|xdmp:collection-delete|xdmp:collation-canonical-uri|xdmp:castable-as|xdmp:can-grant-roles|xdmp:base64-encode|xdmp:base64-decode|xdmp:architecture|xdmp:apply|xdmp:amp-roles|xdmp:amp|xdmp:add64|xdmp:add-response-header|xdmp:access|trgr:trigger-set-recursive|trgr:trigger-set-permissions|trgr:trigger-set-name|trgr:trigger-set-module|trgr:trigger-set-event|trgr:trigger-set-description|trgr:trigger-remove-permissions|trgr:trigger-module|trgr:trigger-get-permissions|trgr:trigger-enable|trgr:trigger-disable|trgr:trigger-database-online-event|trgr:trigger-data-event|trgr:trigger-add-permissions|trgr:remove-trigger|trgr:property-content|trgr:pre-commit|trgr:post-commit|trgr:get-trigger-by-id|trgr:get-trigger|trgr:document-scope|trgr:document-content|trgr:directory-scope|trgr:create-trigger|trgr:collection-scope|trgr:any-property-content|thsr:set-entry|thsr:remove-term|thsr:remove-synonym|thsr:remove-entry|thsr:query-lookup|thsr:lookup|thsr:load|thsr:insert|thsr:expand|thsr:add-synonym|spell:suggest-detailed|spell:suggest|spell:remove-word|spell:make-dictionary|spell:load|spell:levenshtein-distance|spell:is-correct|spell:insert|spell:double-metaphone|spell:add-word|sec:users-collection|sec:user-set-roles|sec:user-set-password|sec:user-set-name|sec:user-set-description|sec:user-set-default-permissions|sec:user-set-default-collections|sec:user-remove-roles|sec:user-privileges|sec:user-get-roles|sec:user-get-description|sec:user-get-default-permissions|sec:user-get-default-collections|sec:user-doc-permissions|sec:user-doc-collections|sec:user-add-roles|sec:unprotect-collection|sec:uid-for-name|sec:set-realm|sec:security-version|sec:security-namespace|sec:security-installed|sec:security-collection|sec:roles-collection|sec:role-set-roles|sec:role-set-name|sec:role-set-description|sec:role-set-default-permissions|sec:role-set-default-collections|sec:role-remove-roles|sec:role-privileges|sec:role-get-roles|sec:role-get-description|sec:role-get-default-permissions|sec:role-get-default-collections|sec:role-doc-permissions|sec:role-doc-collections|sec:role-add-roles|sec:remove-user|sec:remove-role-from-users|sec:remove-role-from-role|sec:remove-role-from-privileges|sec:remove-role-from-amps|sec:remove-role|sec:remove-privilege|sec:remove-amp|sec:protect-collection|sec:privileges-collection|sec:privilege-set-roles|sec:privilege-set-name|sec:privilege-remove-roles|sec:privilege-get-roles|sec:privilege-add-roles|sec:priv-doc-permissions|sec:priv-doc-collections|sec:get-user-names|sec:get-unique-elem-id|sec:get-role-names|sec:get-role-ids|sec:get-privilege|sec:get-distinct-permissions|sec:get-collection|sec:get-amp|sec:create-user-with-role|sec:create-user|sec:create-role|sec:create-privilege|sec:create-amp|sec:collections-collection|sec:collection-set-permissions|sec:collection-remove-permissions|sec:collection-get-permissions|sec:collection-add-permissions|sec:check-admin|sec:amps-collection|sec:amp-set-roles|sec:amp-remove-roles|sec:amp-get-roles|sec:amp-doc-permissions|sec:amp-doc-collections|sec:amp-add-roles|search:unparse|search:suggest|search:snippet|search:search|search:resolve-nodes|search:resolve|search:remove-constraint|search:parse|search:get-default-options|search:estimate|search:check-options|prof:value|prof:reset|prof:report|prof:invoke|prof:eval|prof:enable|prof:disable|prof:allowed|ppt:clean|pki:template-set-request|pki:template-set-name|pki:template-set-key-type|pki:template-set-key-options|pki:template-set-description|pki:template-in-use|pki:template-get-version|pki:template-get-request|pki:template-get-name|pki:template-get-key-type|pki:template-get-key-options|pki:template-get-id|pki:template-get-description|pki:need-certificate|pki:is-temporary|pki:insert-trusted-certificates|pki:insert-template|pki:insert-signed-certificates|pki:insert-certificate-revocation-list|pki:get-trusted-certificate-ids|pki:get-template-ids|pki:get-template-certificate-authority|pki:get-template-by-name|pki:get-template|pki:get-pending-certificate-requests-xml|pki:get-pending-certificate-requests-pem|pki:get-pending-certificate-request|pki:get-certificates-for-template-xml|pki:get-certificates-for-template|pki:get-certificates|pki:get-certificate-xml|pki:get-certificate-pem|pki:get-certificate|pki:generate-temporary-certificate-if-necessary|pki:generate-temporary-certificate|pki:generate-template-certificate-authority|pki:generate-certificate-request|pki:delete-template|pki:delete-certificate|pki:create-template|pdf:make-toc|pdf:insert-toc-headers|pdf:get-toc|pdf:clean|p:status-transition|p:state-transition|p:remove|p:pipelines|p:insert|p:get-by-id|p:get|p:execute|p:create|p:condition|p:collection|p:action|ooxml:runs-merge|ooxml:package-uris|ooxml:package-parts-insert|ooxml:package-parts|msword:clean|mcgm:polygon|mcgm:point|mcgm:geospatial-query-from-elements|mcgm:geospatial-query|mcgm:circle|math:tanh|math:tan|math:sqrt|math:sinh|math:sin|math:pow|math:modf|math:log10|math:log|math:ldexp|math:frexp|math:fmod|math:floor|math:fabs|math:exp|math:cosh|math:cos|math:ceil|math:atan2|math:atan|math:asin|math:acos|map:put|map:map|map:keys|map:get|map:delete|map:count|map:clear|lnk:to|lnk:remove|lnk:insert|lnk:get|lnk:from|lnk:create|kml:polygon|kml:point|kml:interior-polygon|kml:geospatial-query-from-elements|kml:geospatial-query|kml:circle|kml:box|gml:polygon|gml:point|gml:interior-polygon|gml:geospatial-query-from-elements|gml:geospatial-query|gml:circle|gml:box|georss:point|georss:geospatial-query|georss:circle|geo:polygon|geo:point|geo:interior-polygon|geo:geospatial-query-from-elements|geo:geospatial-query|geo:circle|geo:box|fn:zero-or-one|fn:years-from-duration|fn:year-from-dateTime|fn:year-from-date|fn:upper-case|fn:unordered|fn:true|fn:translate|fn:trace|fn:tokenize|fn:timezone-from-time|fn:timezone-from-dateTime|fn:timezone-from-date|fn:sum|fn:subtract-dateTimes-yielding-yearMonthDuration|fn:subtract-dateTimes-yielding-dayTimeDuration|fn:substring-before|fn:substring-after|fn:substring|fn:subsequence|fn:string-to-codepoints|fn:string-pad|fn:string-length|fn:string-join|fn:string|fn:static-base-uri|fn:starts-with|fn:seconds-from-time|fn:seconds-from-duration|fn:seconds-from-dateTime|fn:round-half-to-even|fn:round|fn:root|fn:reverse|fn:resolve-uri|fn:resolve-QName|fn:replace|fn:remove|fn:QName|fn:prefix-from-QName|fn:position|fn:one-or-more|fn:number|fn:not|fn:normalize-unicode|fn:normalize-space|fn:node-name|fn:node-kind|fn:nilled|fn:namespace-uri-from-QName|fn:namespace-uri-for-prefix|fn:namespace-uri|fn:name|fn:months-from-duration|fn:month-from-dateTime|fn:month-from-date|fn:minutes-from-time|fn:minutes-from-duration|fn:minutes-from-dateTime|fn:min|fn:max|fn:matches|fn:lower-case|fn:local-name-from-QName|fn:local-name|fn:last|fn:lang|fn:iri-to-uri|fn:insert-before|fn:index-of|fn:in-scope-prefixes|fn:implicit-timezone|fn:idref|fn:id|fn:hours-from-time|fn:hours-from-duration|fn:hours-from-dateTime|fn:floor|fn:false|fn:expanded-QName|fn:exists|fn:exactly-one|fn:escape-uri|fn:escape-html-uri|fn:error|fn:ends-with|fn:encode-for-uri|fn:empty|fn:document-uri|fn:doc-available|fn:doc|fn:distinct-values|fn:distinct-nodes|fn:default-collation|fn:deep-equal|fn:days-from-duration|fn:day-from-dateTime|fn:day-from-date|fn:data|fn:current-time|fn:current-dateTime|fn:current-date|fn:count|fn:contains|fn:concat|fn:compare|fn:collection|fn:codepoints-to-string|fn:codepoint-equal|fn:ceiling|fn:boolean|fn:base-uri|fn:avg|fn:adjust-time-to-timezone|fn:adjust-dateTime-to-timezone|fn:adjust-date-to-timezone|fn:abs|feed:unsubscribe|feed:subscription|feed:subscribe|feed:request|feed:item|feed:description|excel:clean|entity:enrich|dom:set-pipelines|dom:set-permissions|dom:set-name|dom:set-evaluation-context|dom:set-domain-scope|dom:set-description|dom:remove-pipeline|dom:remove-permissions|dom:remove|dom:get|dom:evaluation-context|dom:domains|dom:domain-scope|dom:create|dom:configuration-set-restart-user|dom:configuration-set-permissions|dom:configuration-set-evaluation-context|dom:configuration-set-default-domain|dom:configuration-get|dom:configuration-create|dom:collection|dom:add-pipeline|dom:add-permissions|dls:retention-rules|dls:retention-rule-remove|dls:retention-rule-insert|dls:retention-rule|dls:purge|dls:node-expand|dls:link-references|dls:link-expand|dls:documents-query|dls:document-versions-query|dls:document-version-uri|dls:document-version-query|dls:document-version-delete|dls:document-version-as-of|dls:document-version|dls:document-update|dls:document-unmanage|dls:document-set-quality|dls:document-set-property|dls:document-set-properties|dls:document-set-permissions|dls:document-set-collections|dls:document-retention-rules|dls:document-remove-properties|dls:document-remove-permissions|dls:document-remove-collections|dls:document-purge|dls:document-manage|dls:document-is-managed|dls:document-insert-and-manage|dls:document-include-query|dls:document-history|dls:document-get-permissions|dls:document-extract-part|dls:document-delete|dls:document-checkout-status|dls:document-checkout|dls:document-checkin|dls:document-add-properties|dls:document-add-permissions|dls:document-add-collections|dls:break-checkout|dls:author-query|dls:as-of-query|dbk:convert|dbg:wait|dbg:value|dbg:stopped|dbg:stop|dbg:step|dbg:status|dbg:stack|dbg:out|dbg:next|dbg:line|dbg:invoke|dbg:function|dbg:finish|dbg:expr|dbg:eval|dbg:disconnect|dbg:detach|dbg:continue|dbg:connect|dbg:clear|dbg:breakpoints|dbg:break|dbg:attached|dbg:attach|cvt:save-converted-documents|cvt:part-uri|cvt:destination-uri|cvt:basepath|cvt:basename|cts:words|cts:word-query-weight|cts:word-query-text|cts:word-query-options|cts:word-query|cts:word-match|cts:walk|cts:uris|cts:uri-match|cts:train|cts:tokenize|cts:thresholds|cts:stem|cts:similar-query-weight|cts:similar-query-nodes|cts:similar-query|cts:shortest-distance|cts:search|cts:score|cts:reverse-query-weight|cts:reverse-query-nodes|cts:reverse-query|cts:remainder|cts:registered-query-weight|cts:registered-query-options|cts:registered-query-ids|cts:registered-query|cts:register|cts:query|cts:quality|cts:properties-query-query|cts:properties-query|cts:polygon-vertices|cts:polygon|cts:point-longitude|cts:point-latitude|cts:point|cts:or-query-queries|cts:or-query|cts:not-query-weight|cts:not-query-query|cts:not-query|cts:near-query-weight|cts:near-query-queries|cts:near-query-options|cts:near-query-distance|cts:near-query|cts:highlight|cts:geospatial-co-occurrences|cts:frequency|cts:fitness|cts:field-words|cts:field-word-query-weight|cts:field-word-query-text|cts:field-word-query-options|cts:field-word-query-field-name|cts:field-word-query|cts:field-word-match|cts:entity-highlight|cts:element-words|cts:element-word-query-weight|cts:element-word-query-text|cts:element-word-query-options|cts:element-word-query-element-name|cts:element-word-query|cts:element-word-match|cts:element-values|cts:element-value-ranges|cts:element-value-query-weight|cts:element-value-query-text|cts:element-value-query-options|cts:element-value-query-element-name|cts:element-value-query|cts:element-value-match|cts:element-value-geospatial-co-occurrences|cts:element-value-co-occurrences|cts:element-range-query-weight|cts:element-range-query-value|cts:element-range-query-options|cts:element-range-query-operator|cts:element-range-query-element-name|cts:element-range-query|cts:element-query-query|cts:element-query-element-name|cts:element-query|cts:element-pair-geospatial-values|cts:element-pair-geospatial-value-match|cts:element-pair-geospatial-query-weight|cts:element-pair-geospatial-query-region|cts:element-pair-geospatial-query-options|cts:element-pair-geospatial-query-longitude-name|cts:element-pair-geospatial-query-latitude-name|cts:element-pair-geospatial-query-element-name|cts:element-pair-geospatial-query|cts:element-pair-geospatial-boxes|cts:element-geospatial-values|cts:element-geospatial-value-match|cts:element-geospatial-query-weight|cts:element-geospatial-query-region|cts:element-geospatial-query-options|cts:element-geospatial-query-element-name|cts:element-geospatial-query|cts:element-geospatial-boxes|cts:element-child-geospatial-values|cts:element-child-geospatial-value-match|cts:element-child-geospatial-query-weight|cts:element-child-geospatial-query-region|cts:element-child-geospatial-query-options|cts:element-child-geospatial-query-element-name|cts:element-child-geospatial-query-child-name|cts:element-child-geospatial-query|cts:element-child-geospatial-boxes|cts:element-attribute-words|cts:element-attribute-word-query-weight|cts:element-attribute-word-query-text|cts:element-attribute-word-query-options|cts:element-attribute-word-query-element-name|cts:element-attribute-word-query-attribute-name|cts:element-attribute-word-query|cts:element-attribute-word-match|cts:element-attribute-values|cts:element-attribute-value-ranges|cts:element-attribute-value-query-weight|cts:element-attribute-value-query-text|cts:element-attribute-value-query-options|cts:element-attribute-value-query-element-name|cts:element-attribute-value-query-attribute-name|cts:element-attribute-value-query|cts:element-attribute-value-match|cts:element-attribute-value-geospatial-co-occurrences|cts:element-attribute-value-co-occurrences|cts:element-attribute-range-query-weight|cts:element-attribute-range-query-value|cts:element-attribute-range-query-options|cts:element-attribute-range-query-operator|cts:element-attribute-range-query-element-name|cts:element-attribute-range-query-attribute-name|cts:element-attribute-range-query|cts:element-attribute-pair-geospatial-values|cts:element-attribute-pair-geospatial-value-match|cts:element-attribute-pair-geospatial-query-weight|cts:element-attribute-pair-geospatial-query-region|cts:element-attribute-pair-geospatial-query-options|cts:element-attribute-pair-geospatial-query-longitude-name|cts:element-attribute-pair-geospatial-query-latitude-name|cts:element-attribute-pair-geospatial-query-element-name|cts:element-attribute-pair-geospatial-query|cts:element-attribute-pair-geospatial-boxes|cts:document-query-uris|cts:document-query|cts:distance|cts:directory-query-uris|cts:directory-query-depth|cts:directory-query|cts:destination|cts:deregister|cts:contains|cts:confidence|cts:collections|cts:collection-query-uris|cts:collection-query|cts:collection-match|cts:classify|cts:circle-radius|cts:circle-center|cts:circle|cts:box-west|cts:box-south|cts:box-north|cts:box-east|cts:box|cts:bearing|cts:arc-intersection|cts:and-query-queries|cts:and-query-options|cts:and-query|cts:and-not-query-positive-query|cts:and-not-query-negative-query|cts:and-not-query|css:get|css:convert|cpf:success|cpf:failure|cpf:document-set-state|cpf:document-set-processing-status|cpf:document-set-last-updated|cpf:document-set-error|cpf:document-get-state|cpf:document-get-processing-status|cpf:document-get-last-updated|cpf:document-get-error|cpf:check-transition|alert:spawn-matching-actions|alert:rule-user-id-query|alert:rule-set-user-id|alert:rule-set-query|alert:rule-set-options|alert:rule-set-name|alert:rule-set-description|alert:rule-set-action|alert:rule-remove|alert:rule-name-query|alert:rule-insert|alert:rule-id-query|alert:rule-get-user-id|alert:rule-get-query|alert:rule-get-options|alert:rule-get-name|alert:rule-get-id|alert:rule-get-description|alert:rule-get-action|alert:rule-action-query|alert:remove-triggers|alert:make-rule|alert:make-log-action|alert:make-config|alert:make-action|alert:invoke-matching-actions|alert:get-my-rules|alert:get-all-rules|alert:get-actions|alert:find-matching-rules|alert:create-triggers|alert:config-set-uri|alert:config-set-trigger-ids|alert:config-set-options|alert:config-set-name|alert:config-set-description|alert:config-set-cpf-domain-names|alert:config-set-cpf-domain-ids|alert:config-insert|alert:config-get-uri|alert:config-get-trigger-ids|alert:config-get-options|alert:config-get-name|alert:config-get-id|alert:config-get-description|alert:config-get-cpf-domain-names|alert:config-get-cpf-domain-ids|alert:config-get|alert:config-delete|alert:action-set-options|alert:action-set-name|alert:action-set-module-root|alert:action-set-module-db|alert:action-set-module|alert:action-set-description|alert:action-remove|alert:action-insert|alert:action-get-options|alert:action-get-name|alert:action-get-module-root|alert:action-get-module-db|alert:action-get-module|alert:action-get-description|zero-or-one|years-from-duration|year-from-dateTime|year-from-date|upper-case|unordered|true|translate|trace|tokenize|timezone-from-time|timezone-from-dateTime|timezone-from-date|sum|subtract-dateTimes-yielding-yearMonthDuration|subtract-dateTimes-yielding-dayTimeDuration|substring-before|substring-after|substring|subsequence|string-to-codepoints|string-pad|string-length|string-join|string|static-base-uri|starts-with|seconds-from-time|seconds-from-duration|seconds-from-dateTime|round-half-to-even|round|root|reverse|resolve-uri|resolve-QName|replace|remove|QName|prefix-from-QName|position|one-or-more|number|not|normalize-unicode|normalize-space|node-name|node-kind|nilled|namespace-uri-from-QName|namespace-uri-for-prefix|namespace-uri|name|months-from-duration|month-from-dateTime|month-from-date|minutes-from-time|minutes-from-duration|minutes-from-dateTime|min|max|matches|lower-case|local-name-from-QName|local-name|last|lang|iri-to-uri|insert-before|index-of|in-scope-prefixes|implicit-timezone|idref|id|hours-from-time|hours-from-duration|hours-from-dateTime|floor|false|expanded-QName|exists|exactly-one|escape-uri|escape-html-uri|error|ends-with|encode-for-uri|empty|document-uri|doc-available|doc|distinct-values|distinct-nodes|default-collation|deep-equal|days-from-duration|day-from-dateTime|day-from-date|data|current-time|current-dateTime|current-date|count|contains|concat|compare|collection|codepoints-to-string|codepoint-equal|ceiling|boolean|base-uri|avg|adjust-time-to-timezone|adjust-dateTime-to-timezone|adjust-date-to-timezone|abs)\b/],
["pln",/^[\w:-]+/],["pln",/^[\t\n\r \xa0]+/]]),["xq","xquery"]);
================================================
FILE: docs/prettify/lang-yaml.js
================================================
var a=null;
PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]);
================================================
FILE: docs/prettify/prettify.css
================================================
.com { color: #93a1a1; }
.lit { color: #195f91; }
.pun, .opn, .clo { color: #93a1a1; }
.fun { color: #dc322f; }
.str, .atv { color: #D14; }
.kwd, .linenums .tag { color: #1e347b; }
.typ, .atn, .dec, .var { color: teal; }
.pln { color: #48484c; }
.prettyprint {
padding: 8px;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
}
.prettyprint.linenums {
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
-moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin: 0 0 0 33px; /* IE indents via margin-left */
}
ol.linenums li {
padding-left: 12px;
color: #bebec5;
line-height: 18px;
text-shadow: 0 1px 0 #fff;
}
================================================
FILE: docs/prettify/prettify.js
================================================
// Copyright (C) 2006 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @fileoverview
* some functions for browser-side pretty printing of code contained in html.
*
* <p>
* For a fairly comprehensive set of languages see the
* <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a>
* file that came with this source. At a minimum, the lexer should work on a
* number of languages including C and friends, Java, Python, Bash, SQL, HTML,
* XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk
* and a subset of Perl, but, because of commenting conventions, doesn't work on
* Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
* <p>
* Usage: <ol>
* <li> include this source file in an html page via
* {@code <script type="text/javascript" src="/path/to/prettify.js"></script>}
* <li> define style rules. See the example page for examples.
* <li> mark the {@code <pre>} and {@code <code>} tags in your source with
* {@code class=prettyprint.}
* You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
* printer needs to do more substantial DOM manipulations to support that, so
* some css styles may not be preserved.
* </ol>
* That's it. I wanted to keep the API as simple as possible, so there's no
* need to specify which language the code is in, but if you wish, you can add
* another class to the {@code <pre>} or {@code <code>} element to specify the
* language, as in {@code <pre class="prettyprint lang-java">}. Any class that
* starts with "lang-" followed by a file extension, specifies the file type.
* See the "lang-*.js" files in this directory for code that implements
* per-language file handlers.
* <p>
* Change log:<br>
* cbeust, 2006/08/22
* <blockquote>
* Java annotations (start with "@") are now captured as literals ("lit")
* </blockquote>
* @requires console
*/
// JSLint declarations
/*global console, document, navigator, setTimeout, window */
/**
* Split {@code prettyPrint} into multiple timeouts so as not to interfere with
* UI events.
* If set to {@code false}, {@code prettyPrint()} is synchronous.
*/
window['PR_SHOULD_USE_CONTINUATION'] = true;
(function () {
// Keyword lists for various languages.
// We use things that coerce to strings to make them compact when minified
// and to defeat aggressive optimizers that fold large string constants.
var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," +
"double,enum,extern,float,goto,int,long,register,short,signed,sizeof," +
"static,struct,switch,typedef,union,unsigned,void,volatile"];
var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
"new,operator,private,protected,public,this,throw,true,try,typeof"];
var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
"concept,concept_map,const_cast,constexpr,decltype," +
"dynamic_cast,explicit,export,friend,inline,late_check," +
"mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast," +
"template,typeid,typename,using,virtual,where"];
var JAVA_KEYWORDS = [COMMON_KEYWORDS,
"abstract,boolean,byte,extends,final,finally,implements,import," +
"instanceof,null,native,package,strictfp,super,synchronized,throws," +
"transient"];
var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
"as,base,by,checked,decimal,delegate,descending,dynamic,event," +
"fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock," +
"object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed," +
"stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];
var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
"for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
"true,try,unless,until,when,while,yes";
var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
"debugger,eval,export,function,get,null,set,undefined,var,with," +
"Infinity,NaN"];
var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
"goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
"sub,undef,unless,until,use,wantarray,while,BEGIN,END";
var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
"elif,except,exec,finally,from,global,import,in,is,lambda," +
"nonlocal,not,or,pass,print,raise,try,with,yield," +
"False,True,None"];
var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
"def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
"rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
"BEGIN,END"];
var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
"function,in,local,set,then,until"];
var ALL_KEYWORDS = [
CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS +
PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;
// token style names. correspond to css classes
/**
* token style for a string literal
* @const
*/
var PR_STRING = 'str';
/**
* token style for a keyword
* @const
*/
var PR_KEYWORD = 'kwd';
/**
* token style for a comment
* @const
*/
var PR_COMMENT = 'com';
/**
* token style for a type
* @const
*/
var PR_TYPE = 'typ';
/**
* token style for a literal value. e.g. 1, null, true.
* @const
*/
var PR_LITERAL = 'lit';
/**
* token style for a punctuation string.
* @const
*/
var PR_PUNCTUATION = 'pun';
/**
* token style for a punctuation string.
* @const
*/
var PR_PLAIN = 'pln';
/**
* token style for an sgml tag.
* @const
*/
var PR_TAG = 'tag';
/**
* token style for a markup declaration such as a DOCTYPE.
* @const
*/
var PR_DECLARATION = 'dec';
/**
* token style for embedded source.
* @const
*/
var PR_SOURCE = 'src';
/**
* token style for an sgml attribute name.
* @const
*/
var PR_ATTRIB_NAME = 'atn';
/**
* token style for an sgml attribute value.
* @const
*/
var PR_ATTRIB_VALUE = 'atv';
/**
* A class that indicates a section of markup that is not code, e.g. to allow
* embedding of line numbers within code listings.
* @const
*/
var PR_NOCODE = 'nocode';
/**
* A set of tokens that can precede a regular expression literal in
* javascript
* http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
* has the full list, but I've removed ones that might be problematic when
* seen in languages that don't support regular expression literals.
*
* <p>Specifically, I've removed any keywords that can't precede a regexp
* literal in a syntactically legal javascript program, and I've removed the
* "in" keyword since it's not a keyword in many languages, and might be used
* as a count of inches.
*
* <p>The link a above does not accurately describe EcmaScript rules since
* it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
* very well in practice.
*
* @private
* @const
*/
var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
// CAVEAT: this does not properly handle the case where a regular
// expression immediately follows another since a regular expression may
// have flags for case-sensitivity and the like. Having regexp tokens
// adjacent is not valid in any language I'm aware of, so I'm punting.
// TODO: maybe style special characters inside a regexp as punctuation.
/**
* Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
* matches the union of the sets of strings matched by the input RegExp.
* Since it matches globally, if the input strings have a start-of-input
* anchor (/^.../), it is ignored for the purposes of unioning.
* @param {Array.<RegExp>} regexs non multiline, non-global regexs.
* @return {RegExp} a global regex.
*/
function combinePrefixPatterns(regexs) {
var capturedGroupIndex = 0;
var needToFoldCase = false;
var ignoreCase = false;
for (var i = 0, n = regexs.length; i < n; ++i) {
var regex = regexs[i];
if (regex.ignoreCase) {
ignoreCase = true;
} else if (/[a-z]/i.test(regex.source.replace(
/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
needToFoldCase = true;
ignoreCase = false;
break;
}
}
var escapeCharToCodeUnit = {
'b': 8,
't': 9,
'n': 0xa,
'v': 0xb,
'f': 0xc,
'r': 0xd
};
function decodeEscape(charsetPart) {
var cc0 = charsetPart.charCodeAt(0);
if (cc0 !== 92 /* \\ */) {
return cc0;
}
var c1 = charsetPart.charAt(1);
cc0 = escapeCharToCodeUnit[c1];
if (cc0) {
return cc0;
} else if ('0' <= c1 && c1 <= '7') {
return parseInt(charsetPart.substring(1), 8);
} else if (c1 === 'u' || c1 === 'x') {
return parseInt(charsetPart.substring(2), 16);
} else {
return charsetPart.charCodeAt(1);
}
}
function encodeEscape(charCode) {
if (charCode < 0x20) {
return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
}
var ch = String.fromCharCode(charCode);
if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') {
ch = '\\' + ch;
}
return ch;
}
function caseFoldCharset(charSet) {
var charsetParts = charSet.substring(1, charSet.length - 1).match(
new RegExp(
'\\\\u[0-9A-Fa-f]{4}'
+ '|\\\\x[0-9A-Fa-f]{2}'
+ '|\\\\[0-3][0-7]{0,2}'
+ '|\\\\[0-7]{1,2}'
+ '|\\\\[\\s\\S]'
+ '|-'
+ '|[^-\\\\]',
'g'));
var groups = [];
var ranges = [];
var inverse = charsetParts[0] === '^';
for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
var p = charsetParts[i];
if (/\\[bdsw]/i.test(p)) { // Don't muck with named groups.
groups.push(p);
} else {
var start = decodeEscape(p);
var end;
if (i + 2 < n && '-' === charsetParts[i + 1]) {
end = decodeEscape(charsetParts[i + 2]);
i += 2;
} else {
end = start;
}
ranges.push([start, end]);
// If the range might intersect letters, then expand it.
// This case handling is too simplistic.
// It does not deal with non-latin case folding.
// It works for latin source code identifiers though.
if (!(end < 65 || start > 122)) {
if (!(end < 65 || start > 90)) {
ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
}
if (!(end < 97 || start > 122)) {
ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
}
}
}
}
// [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
// -> [[1, 12], [14, 14], [16, 17]]
ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1] - a[1]); });
var consolidatedRanges = [];
var lastRange = [NaN, NaN];
for (var i = 0; i < ranges.length; ++i) {
var range = ranges[i];
if (range[0] <= lastRange[1] + 1) {
lastRange[1] = Math.max(lastRange[1], range[1]);
} else {
consolidatedRanges.push(lastRange = range);
}
}
var out = ['['];
if (inverse) { out.push('^'); }
out.push.apply(out, groups);
for (var i = 0; i < consolidatedRanges.length; ++i) {
var range = consolidatedRanges[i];
out.push(encodeEscape(range[0]));
if (range[1] > range[0]) {
if (range[1] + 1 > range[0]) { out.push('-'); }
out.push(encodeEscape(range[1]));
}
}
out.push(']');
return out.join('');
}
function allowAnywhereFoldCaseAndRenumberGroups(regex) {
// Split into character sets, escape sequences, punctuation strings
// like ('(', '(?:', ')', '^'), and runs of characters that do not
// include any of the above.
var parts = regex.source.match(
new RegExp(
'(?:'
+ '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]' // a character set
+ '|\\\\u[A-Fa-f0-9]{4}' // a unicode escape
+ '|\\\\x[A-Fa-f0-9]{2}' // a hex escape
+ '|\\\\[0-9]+' // a back-reference or octal escape
+ '|\\\\[^ux0-9]' // other escape sequence
+ '|\\(\\?[:!=]' // start of a non-capturing group
+ '|[\\(\\)\\^]' // start/emd of a group, or line start
+ '|[^\\x5B\\x5C\\(\\)\\^]+' // run of other characters
+ ')',
'g'));
var n = parts.length;
// Maps captured group numbers to the number they will occupy in
// the output or to -1 if that has not been determined, or to
// undefined if they need not be capturing in the output.
var capturedGroups = [];
// Walk over and identify back references to build the capturedGroups
// mapping.
for (var i = 0, groupIndex = 0; i < n; ++i) {
var p = parts[i];
if (p === '(') {
// groups are 1-indexed, so max group index is count of '('
++groupIndex;
} else if ('\\' === p.charAt(0)) {
var decimalValue = +p.substring(1);
if (decimalValue && decimalValue <= groupIndex) {
capturedGroups[decimalValue] = -1;
}
}
}
// Renumber groups and reduce capturing groups to non-capturing groups
// where possible.
for (var i = 1; i < capturedGroups.length; ++i) {
if (-1 === capturedGroups[i]) {
capturedGroups[i] = ++capturedGroupIndex;
}
}
for (var i = 0, groupIndex = 0; i < n; ++i) {
var p = parts[i];
if (p === '(') {
++groupIndex;
if (capturedGroups[groupIndex] === undefined) {
parts[i] = '(?:';
}
} else if ('\\' === p.charAt(0)) {
var decimalValue = +p.substring(1);
if (decimalValue && decimalValue <= groupIndex) {
parts[i] = '\\' + capturedGroups[groupIndex];
}
}
}
// Remove any prefix anchors so that the output will match anywhere.
// ^^ really does mean an anchored match though.
for (var i = 0, groupIndex = 0; i < n; ++i) {
if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
}
// Expand letters to groups to handle mixing of case-sensitive and
// case-insensitive patterns if necessary.
if (regex.ignoreCase && needToFoldCase) {
for (var i = 0; i < n; ++i) {
var p = parts[i];
var ch0 = p.charAt(0);
if (p.length >= 2 && ch0 === '[') {
parts[i] = caseFoldCharset(p);
} else if (ch0 !== '\\') {
// TODO: handle letters in numeric escapes.
parts[i] = p.replace(
/[a-zA-Z]/g,
function (ch) {
var cc = ch.charCodeAt(0);
return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
});
}
}
}
return parts.join('');
}
var rewritten = [];
for (var i = 0, n = regexs.length; i < n; ++i) {
var regex = regexs[i];
if (regex.global || regex.multiline) { throw new Error('' + regex); }
rewritten.push(
'(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
}
return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
}
/**
* Split markup into a string of source code and an array mapping ranges in
* that string to the text nodes in which they appear.
*
* <p>
* The HTML DOM structure:</p>
* <pre>
* (Element "p"
* (Element "b"
* (Text "print ")) ; #1
* (Text "'Hello '") ; #2
* (Element "br") ; #3
* (Text " + 'World';")) ; #4
* </pre>
* <p>
* corresponds to the HTML
* {@code <p><b>print </b>'Hello '<br> + 'World';</p>}.</p>
*
* <p>
* It will produce the output:</p>
* <pre>
* {
* sourceCode: "print 'Hello '\n + 'World';",
* // 1 2
* // 012345678901234 5678901234567
* spans: [0, #1, 6, #2, 14, #3, 15, #4]
* }
* </pre>
* <p>
* where #1 is a reference to the {@code "print "} text node above, and so
* on for the other text nodes.
* </p>
*
* <p>
* The {@code} spans array is an array of pairs. Even elements are the start
* indices of substrings, and odd elements are the text nodes (or BR elements)
* that contain the text for those substrings.
* Substrings continue until the next index or the end of the source.
* </p>
*
* @param {Node} node an HTML DOM subtree containing source-code.
* @return {Object} source code and the text nodes in which they occur.
*/
function extractSourceSpans(node) {
var nocode = /(?:^|\s)nocode(?:\s|$)/;
var chunks = [];
var length = 0;
var spans = [];
var k = 0;
var whitespace;
if (node.currentStyle) {
whitespace = node.currentStyle.whiteSpace;
} else if (window.getComputedStyle) {
whitespace = document.defaultView.getComputedStyle(node, null)
.getPropertyValue('white-space');
}
var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
function walk(node) {
switch (node.nodeType) {
case 1: // Element
if (nocode.test(node.className)) { return; }
for (var child = node.firstChild; child; child = child.nextSibling) {
walk(child);
}
var nodeName = node.nodeName;
if ('BR' === nodeName || 'LI' === nodeName) {
chunks[k] = '\n';
spans[k << 1] = length++;
spans[(k++ << 1) | 1] = node;
}
break;
case 3: case 4: // Text
var text = node.nodeValue;
if (text.length) {
if (!isPreformatted) {
text = text.replace(/[ \t\r\n]+/g, ' ');
} else {
text = text.replace(/\r\n?/g, '\n'); // Normalize newlines.
}
// TODO: handle tabs here?
chunks[k] = text;
spans[k << 1] = length;
length += text.length;
spans[(k++ << 1) | 1] = node;
}
break;
}
}
walk(node);
return {
sourceCode: chunks.join('').replace(/\n$/, ''),
spans: spans
};
}
/**
* Apply the given language handler to sourceCode and add the resulting
* decorations to out.
* @param {number} basePos the index of sourceCode within the chunk of source
* whose decorations are already present on out.
*/
function appendDecorations(basePos, sourceCode, langHandler, out) {
if (!sourceCode) { return; }
var job = {
sourceCode: sourceCode,
basePos: basePos
};
langHandler(job);
out.push.apply(out, job.decorations);
}
var notWs = /\S/;
/**
* Given an element, if it contains only one child element and any text nodes
* it contains contain only space characters, return the sole child element.
* Otherwise returns undefined.
* <p>
* This is meant to return the CODE element in {@code <pre><code ...>} when
* there is a single child element that contains all the non-space textual
* content, but not to return anything where there are multiple child elements
* as in {@code <pre><code>...</code><code>...</code></pre>} or when there
* is textual content.
*/
function childContentWrapper(element) {
var wrapper = undefined;
for (var c = element.firstChild; c; c = c.nextSibling) {
var type = c.nodeType;
wrapper = (type === 1) // Element Node
? (wrapper ? element : c)
: (type === 3) // Text Node
? (notWs.test(c.nodeValue) ? element : wrapper)
: wrapper;
}
return wrapper === element ? undefined : wrapper;
}
/** Given triples of [style, pattern, context] returns a lexing function,
* The lexing function interprets the patterns to find token boundaries and
* returns a decoration list of the form
* [index_0, style_0, index_1, style_1, ..., index_n, style_n]
* where index_n is an index into the sourceCode, and style_n is a style
* constant like PR_PLAIN. index_n-1 <= index_n, and style_n-1 applies to
* all characters in sourceCode[index_n-1:index_n].
*
* The stylePatterns is a list whose elements have the form
* [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
*
* Style is a style constant like PR_PLAIN, or can be a string of the
* form 'lang-FOO', where FOO is a language extension describing the
* language of the portion of the token in $1 after pattern executes.
* E.g., if style is 'lang-lisp', and group 1 contains the text
* '(hello (world))', then that portion of the token will be passed to the
* registered lisp handler for formatting.
* The text before and after group 1 will be restyled using this decorator
* so decorators should take care that this doesn't result in infinite
* recursion. For example, the HTML lexer rule for SCRIPT elements looks
* something like ['lang-js', /<[s]cript>(.+?)<\/script>/]. This may match
* '<script>foo()<\/script>', which would cause the current decorator to
* be called with '<script>' which would not match the same rule since
* group 1 must not be empty, so it would be instead styled as PR_TAG by
* the generic tag rule. The handler registered for the 'js' extension would
* then be called with 'foo()', and finally, the current decorator would
* be called with '<\/script>' which would not match the original rule and
* so the generic tag rule would identify it as a tag.
*
* Pattern must only match prefixes, and if it matches a prefix, then that
* match is considered a token with the same style.
*
* Context is applied to the last non-whitespace, non-comment token
* recognized.
*
* Shortcut is an optional string of characters, any of which, if the first
* character, gurantee that this pattern and only this pattern matches.
*
* @param {Array} shortcutStylePatterns patterns that always start with
* a known character. Must have a shortcut string.
* @param {Array} fallthroughStylePatterns patterns that will be tried in
* order if the shortcut ones fail. May have shortcuts.
*
* @return {function (Object)} a
* function that takes source code and returns a list of decorations.
*/
function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
var shortcuts = {};
var tokenizer;
(function () {
var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
var allRegexs = [];
var regexKeys = {};
for (var i = 0, n = allPatterns.length; i < n; ++i) {
var patternParts = allPatterns[i];
var shortcutChars = patternParts[3];
if (shortcutChars) {
for (var c = shortcutChars.length; --c >= 0;) {
shortcuts[shortcutChars.charAt(c)] = patternParts;
}
}
var regex = patternParts[1];
var k = '' + regex;
if (!regexKeys.hasOwnProperty(k)) {
allRegexs.push(regex);
regexKeys[k] = null;
}
}
allRegexs.push(/[\0-\uffff]/);
tokenizer = combinePrefixPatterns(allRegexs);
})();
var nPatterns = fallthroughStylePatterns.length;
/**
* Lexes job.sourceCode and produces an output array job.decorations of
* style classes preceded by the position at which they start in
* job.sourceCode in order.
*
* @param {Object} job an object like <pre>{
* sourceCode: {string} sourceText plain text,
* basePos: {int} position of job.sourceCode in the larger chunk of
* sourceCode.
* }</pre>
*/
var decorate = function (job) {
var sourceCode = job.sourceCode, basePos = job.basePos;
/** Even entries are positions in source in ascending order. Odd enties
* are style markers (e.g., PR_COMMENT) that run from that position until
* the end.
* @type {Array.<number|string>}
*/
var decorations = [basePos, PR_PLAIN];
var pos = 0; // index into sourceCode
var tokens = sourceCode.match(tokenizer) || [];
var styleCache = {};
for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
var token = tokens[ti];
var style = styleCache[token];
var match = void 0;
var isEmbedded;
if (typeof style === 'string') {
isEmbedded = false;
} else {
var patternParts = shortcuts[token.charAt(0)];
if (patternParts) {
match = token.match(patternParts[1]);
style = patternParts[0];
} else {
for (var i = 0; i < nPatterns; ++i) {
patternParts = fallthroughStylePatterns[i];
match = token.match(patternParts[1]);
if (match) {
style = patternParts[0];
break;
}
}
if (!match) { // make sure that we make progress
style = PR_PLAIN;
}
}
isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
if (isEmbedded && !(match && typeof match[1] === 'string')) {
isEmbedded = false;
style = PR_SOURCE;
}
if (!isEmbedded) { styleCache[token] = style; }
}
var tokenStart = pos;
pos += token.length;
if (!isEmbedded) {
decorations.push(basePos + tokenStart, style);
} else { // Treat group 1 as an embedded block of source code.
var embeddedSource = match[1];
var embeddedSourceStart = token.indexOf(embeddedSource);
var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
if (match[2]) {
// If embeddedSource can be blank, then it would match at the
// beginning which would cause us to infinitely recurse on the
// entire token, so we catch the right context in match[2].
embeddedSourceEnd = token.length - match[2].length;
embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
}
var lang = style.substring(5);
// Decorate the left of the embedded source
appendDecorations(
basePos + tokenStart,
token.substring(0, embeddedSourceStart),
decorate, decorations);
// Decorate the embedded source
appendDecorations(
basePos + tokenStart + embeddedSourceStart,
embeddedSource,
langHandlerForExtension(lang, embeddedSource),
decorations);
// Decorate the right of the embedded section
appendDecorations(
basePos + tokenStart + embeddedSourceEnd,
token.substring(embeddedSourceEnd),
decorate, decorations);
}
}
job.decorations = decorations;
};
return decorate;
}
/** returns a function that produces a list of decorations from source text.
*
* This code treats ", ', and ` as string delimiters, and \ as a string
* escape. It does not recognize perl's qq() style strings.
* It has no special handling for double delimiter escapes as in basic, or
* the tripled delimiters used in python, but should work on those regardless
* although in those cases a single string literal may be broken up into
* multiple adjacent string literals.
*
* It recognizes C, C++, and shell style comments.
*
* @param {Object} options a set of optional parameters.
* @return {function (Object)} a function that examines the source code
* in the input job and builds the decoration list.
*/
function sourceDecorator(options) {
var shortcutStylePatterns = [], fallthroughStylePatterns = [];
if (options['tripleQuotedStrings']) {
// '''multi-line-string''', 'single-line-string', and double-quoted
shortcutStylePatterns.push(
[PR_STRING, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
null, '\'"']);
} else if (options['multiLineStrings']) {
// 'multi-line-string', "multi-line-string"
shortcutStylePatterns.push(
[PR_STRING, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
null, '\'"`']);
} else {
// 'single-line-string', "single-line-string"
shortcutStylePatterns.push(
[PR_STRING,
/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
null, '"\'']);
}
if (options['verbatimStrings']) {
// verbatim-string-literal production from the C# grammar. See issue 93.
fallthroughStylePatterns.push(
[PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
}
var hc = options['hashComments'];
if (hc) {
if (options['cStyleComments']) {
if (hc > 1) { // multiline hash comments
shortcutStylePatterns.push(
[PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
} else {
// Stop C preprocessor declarations at an unclosed open comment
shortcutStylePatterns.push(
[PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
null, '#']);
}
fallthroughStylePatterns.push(
[PR_STRING,
/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
null]);
} else {
shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
}
}
if (options['cStyleComments']) {
fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
fallthroughStylePatterns.push(
[PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
}
if (options['regexLiterals']) {
/**
* @const
*/
var REGEX_LITERAL = (
// A regular expression literal starts with a slash that is
// not followed by * or / so that it is not confused with
// comments.
'/(?=[^/*])'
// and then contains any number of raw characters,
+ '(?:[^/\\x5B\\x5C]'
// escape sequences (\x5C),
+ '|\\x5C[\\s\\S]'
// or non-nesting character sets (\x5B\x5D);
+ '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
// finally closed by a /.
+ '/');
fallthroughStylePatterns.push(
['lang-regex',
new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
]);
}
var types = options['types'];
if (types) {
fallthroughStylePatterns.push([PR_TYPE, types]);
}
var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
if (keywords.length) {
fallthroughStylePatterns.push(
[PR_KEYWORD,
new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
null]);
}
shortcutStylePatterns.push([PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0']);
fallthroughStylePatterns.push(
// TODO(mikesamuel): recognize non-latin letters and numerals in idents
[PR_LITERAL, /^@[a-z_$][a-z_$@0-9]*/i, null],
[PR_TYPE, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
[PR_PLAIN, /^[a-z_$][a-z_$@0-9]*/i, null],
[PR_LITERAL,
new RegExp(
'^(?:'
// A hex number
+ '0x[a-f0-9]+'
// or an octal or decimal number,
+ '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
// possibly in scientific notation
+ '(?:e[+\\-]?\\d+)?'
+ ')'
// with an optional modifier like UL for unsigned long
+ '[a-z]*', 'i'),
null, '0123456789'],
// Don't treat escaped quotes in bash as starting strings. See issue 144.
[PR_PLAIN, /^\\[\s\S]?/, null],
[PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]);
return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
}
var decorateSource = sourceDecorator({
'keywords': ALL_KEYWORDS,
'hashComments': true,
'cStyleComments': true,
'multiLineStrings': true,
'regexLiterals': true
});
/**
* Given a DOM subtree, wraps it in a list, and puts each line into its own
* list item.
*
* @param {Node} node modified in place. Its content is pulled into an
* HTMLOListElement, and each line is moved into a separate list item.
* This requires cloning elements, so the input might not have unique
* IDs after numbering.
*/
function numberLines(node, opt_startLineNum) {
var nocode = /(?:^|\s)nocode(?:\s|$)/;
var lineBreak = /\r\n?|\n/;
var document = node.ownerDocument;
var whitespace;
if (node.currentStyle) {
whitespace = node.currentStyle.whiteSpace;
} else if (window.getComputedStyle) {
whitespace = document.defaultView.getComputedStyle(node, null)
.getPropertyValue('white-space');
}
// If it's preformatted, then we need to split lines on line breaks
// in addition to <BR>s.
var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
var li = document.createElement('LI');
while (node.firstChild) {
li.appendChild(node.firstChild);
}
// An array of lines. We split below, so this is initialized to one
// un-split line.
var listItems = [li];
function walk(node) {
switch (node.nodeType) {
case 1: // Element
if (nocode.test(node.className)) { break; }
if ('BR' === node.nodeName) {
breakAfter(node);
// Discard the <BR> since it is now flush against a </LI>.
if (node.parentNode) {
node.parentNode.removeChild(node);
}
} else {
for (var child = node.firstChild; child; child = child.nextSibling) {
walk(child);
}
}
break;
case 3: case 4: // Text
if (isPreformatted) {
var text = node.nodeValue;
var match = text.match(lineBreak);
if (match) {
var firstLine = text.substring(0, match.index);
node.nodeValue = firstLine;
var tail = text.substring(match.index + match[0].length);
if (tail) {
var parent = node.parentNode;
parent.insertBefore(
document.createTextNode(tail), node.nextSibling);
}
breakAfter(node);
if (!firstLine) {
// Don't leave blank text nodes in the DOM.
node.parentNode.removeChild(node);
}
}
}
break;
}
}
// Split a line after the given node.
function breakAfter(lineEndNode) {
// If there's nothing to the right, then we can skip ending the line
// here, and move root-wards since splitting just before an end-tag
// would require us to create a bunch of empty copies.
while (!lineEndNode.nextSibling) {
lineEndNode = lineEndNode.parentNode;
if (!lineEndNode) { return; }
}
function breakLeftOf(limit, copy) {
// Clone shallowly if this node needs to be on both sides of the break.
var rightSide = copy ? limit.cloneNode(false) : limit;
var parent = limit.parentNode;
if (parent) {
// We clone the parent chain.
// This helps us resurrect important styling elements that cross lines.
// E.g. in <i>Foo<br>Bar</i>
// should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
var parentClone = breakLeftOf(parent, 1);
// Move the clone and everything to the right of the original
// onto the cloned parent.
var next = limit.nextSibling;
parentClone.appendChild(rightSide);
for (var sibling = next; sibling; sibling = next) {
next = sibling.nextSibling;
parentClone.appendChild(sibling);
}
}
return rightSide;
}
var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
// Walk the parent chain until we reach an unattached LI.
for (var parent;
// Check nodeType since IE invents document fragments.
(parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
copiedListItem = parent;
}
// Put it on the list of lines for later processing.
listItems.push(copiedListItem);
}
// Split lines while there are lines left to split.
for (var i = 0; // Number of lines that have been split so far.
i < listItems.length; // length updated by breakAfter calls.
++i) {
walk(listItems[i]);
}
// Make sure numeric indices show correctly.
if (opt_startLineNum === (opt_startLineNum|0)) {
listItems[0].setAttribute('value', opt_startLineNum);
}
var ol = document.createElement('OL');
ol.className = 'linenums';
var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0;
for (var i = 0, n = listItems.length; i < n; ++i) {
li = listItems[i];
// Stick a class on the LIs so that stylesheets can
// color odd/even rows, or any other row pattern that
// is co-prime with 10.
li.className = 'L' + ((i + offset) % 10);
if (!li.firstChild) {
li.appendChild(document.createTextNode('\xA0'));
}
ol.appendChild(li);
}
node.appendChild(ol);
}
/**
* Breaks {@code job.sourceCode} around style boundaries in
* {@code job.decorations} and modifies {@code job.sourceNode} in place.
* @param {Object} job like <pre>{
* sourceCode: {string} source as plain text,
* spans: {Array.<number|Node>} alternating span start indices into source
* and the text node or element (e.g. {@code <BR>}) corresponding to that
* span.
* decorations: {Array.<number|string} an array of style classes preceded
* by the position at which they start in job.sourceCode in order
* }</pre>
* @private
*/
function recombineTagsAndDecorations(job) {
var isIE = /\bMSIE\b/.test(navigator.userAgent);
var newlineRe = /\n/g;
var source = job.sourceCode;
var sourceLength = source.length;
// Index into source after the last code-unit recombined.
var sourceIndex = 0;
var spans = job.spans;
var nSpans = spans.length;
// Index into spans after the last span which ends at or before sourceIndex.
var spanIndex = 0;
var decorations = job.decorations;
var nDecorations = decorations.length;
// Index into decorations after the last decoration which ends at or before
// sourceIndex.
var decorationIndex = 0;
// Remove all zero-length decorations.
decorations[nDecorations] = sourceLength;
var decPos, i;
for (i = decPos = 0; i < nDecorations;) {
if (decorations[i] !== decorations[i + 2]) {
decorations[decPos++] = decorations[i++];
decorations[decPos++] = decorations[i++];
} else {
i += 2;
}
}
nDecorations = decPos;
// Simplify decorations.
for (i = decPos = 0; i < nDecorations;) {
var startPos = decorations[i];
// Conflate all adjacent decorations that use the same style.
var startDec = decorations[i + 1];
var end = i + 2;
while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
end += 2;
}
decorations[decPos++] = startPos;
decorations[decPos++] = startDec;
i = end;
}
nDecorations = decorations.length = decPos;
var decoration = null;
while (spanIndex < nSpans) {
var spanStart = spans[spanIndex];
var spanEnd = spans[spanIndex + 2] || sourceLength;
var decStart = decorations[decorationIndex];
var decEnd = decorations[decorationIndex + 2] || sourceLength;
var end = Math.min(spanEnd, decEnd);
var textNode = spans[spanIndex + 1];
var styledText;
if (textNode.nodeType !== 1 // Don't muck with <BR>s or <LI>s
// Don't introduce spans around empty text nodes.
&& (styledText = source.substring(sourceIndex, end))) {
// This may seem bizarre, and it is. Emitting LF on IE causes the
// code to display with spaces instead of line breaks.
// Emitting Windows standard issue linebreaks (CRLF) causes a blank
// space to appear at the beginning of every line but the first.
// Emitting an old Mac OS 9 line separator makes everything spiffy.
if (isIE) { styledText = styledText.replace(newlineRe, '\r'); }
textNode.nodeValue = styledText;
var document = textNode.ownerDocument;
var span = document.createElement('SPAN');
span.className = decorations[decorationIndex + 1];
var parentNode = textNode.parentNode;
parentNode.replaceChild(span, textNode);
span.appendChild(textNode);
if (sourceIndex < spanEnd) { // Split off a text node.
spans[spanIndex + 1] = textNode
// TODO: Possibly optimize by using '' if there's no flicker.
= document.createTextNode(source.substring(end, spanEnd));
parentNode.insertBefore(textNode, span.nextSibling);
}
}
sourceIndex = end;
if (sourceIndex >= spanEnd) {
spanIndex += 2;
}
if (sourceIndex >= decEnd) {
decorationIndex += 2;
}
}
}
/** Maps language-specific file extensions to handlers. */
var langHandlerRegistry = {};
/** Register a language handler for the given file extensions.
* @param {function (Object)} handler a function from source code to a list
* of decorations. Takes a single argument job which describes the
* state of the computation. The single parameter has the form
* {@code {
* sourceCode: {string} as plain text.
* decorations: {Array.<number|string>} an array of style classes
* preceded by the position at which they start in
* job.sourceCode in order.
* The language handler should assigned this field.
* basePos: {int} the position of source in the larger source chunk.
* All positions in the output decorations array are relative
* to the larger source chunk.
* } }
* @param {Array.<string>} fileExtensions
*/
function registerLangHandler(handler, fileExtensions) {
for (var i = fileExtensions.length; --i >= 0;) {
var ext = fileExtensions[i];
if (!langHandlerRegistry.hasOwnProperty(ext)) {
langHandlerRegistry[ext] = handler;
} else if (window['console']) {
console['warn']('cannot override language handler %s', ext);
}
}
}
function langHandlerForExtension(extension, source) {
if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
// Treat it as markup if the first non whitespace character is a < and
// the last non-whitespace character is a >.
extension = /^\s*</.test(source)
? 'default-markup'
: 'default-code';
}
return langHandlerRegistry[extension];
}
registerLangHandler(decorateSource, ['default-code']);
registerLangHandler(
createSimpleLexer(
[],
[
[PR_PLAIN, /^[^<?]+/],
[PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
[PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/],
// Unescaped content in an unknown language
['lang-', /^<\?([\s\S]+?)(?:\?>|$)/],
['lang-', /^<%([\s\S]+?)(?:%>|$)/],
[PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
['lang-', /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
// Unescaped content in javascript. (Or possibly vbscript).
['lang-js', /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
// Contains unescaped stylesheet content
['lang-css', /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
['lang-in.tag', /^(<\/?[a-z][^<>]*>)/i]
]),
['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
registerLangHandler(
createSimpleLexer(
[
[PR_PLAIN, /^[\s]+/, null, ' \t\r\n'],
[PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
],
[
[PR_TAG, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
[PR_ATTRIB_NAME, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
['lang-uq.val', /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
[PR_PUNCTUATION, /^[=<>\/]+/],
['lang-js', /^on\w+\s*=\s*\"([^\"]+)\"/i],
['lang-js', /^on\w+\s*=\s*\'([^\']+)\'/i],
['lang-js', /^on\w+\s*=\s*([^\"\'>\s]+)/i],
['lang-css', /^style\s*=\s*\"([^\"]+)\"/i],
['lang-css', /^style\s*=\s*\'([^\']+)\'/i],
['lang-css', /^style\s*=\s*([^\"\'>\s]+)/i]
]),
['in.tag']);
registerLangHandler(
createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
registerLangHandler(sourceDecorator({
'keywords': CPP_KEYWORDS,
'hashComments': true,
'cStyleComments': true,
'types': C_TYPES
}), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
registerLangHandler(sourceDecorator({
'keywords': 'null,true,false'
}), ['json']);
registerLangHandler(sourceDecorator({
'keywords': CSHARP_KEYWORDS,
'hashComments': true,
'cStyleComments': true,
'verbatimStrings': true,
'types': C_TYPES
}), ['cs']);
registerLangHandler(sourceDecorator({
'keywords': JAVA_KEYWORDS,
'cStyleComments': true
}), ['java']);
registerLangHandler(sourceDecorator({
'keywords': SH_KEYWORDS,
'hashComments': true,
'multiLineStrings': true
}), ['bsh', 'csh', 'sh']);
registerLangHandler(sourceDecorator({
'keywords': PYTHON_KEYWORDS,
'hashComments': true,
'multiLineStrings': true,
'tripleQuotedStrings': true
}), ['cv', 'py']);
registerLangHandler(sourceDecorator({
'keywords': PERL_KEYWORDS,
'hashComments': true,
'multiLineStrings': true,
'regexLiterals': true
}), ['perl', 'pl', 'pm']);
registerLangHandler(sourceDecorator({
'keywords': RUBY_KEYWORDS,
'hashComments': true,
'multiLineStrings': true,
'regexLiterals': true
}), ['rb']);
registerLangHandler(sourceDecorator({
'keywords': JSCRIPT_KEYWORDS,
'cStyleComments': true,
'regexLiterals': true
}), ['js']);
registerLangHandler(sourceDecorator({
'keywords': COFFEE_KEYWORDS,
'hashComments': 3, // ### style block comments
'cStyleComments': true,
'multilineStrings': true,
'tripleQuotedStrings': true,
'regexLiterals': true
}), ['coffee']);
registerLangHandler(createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
function applyDecorator(job) {
var opt_langExtension = job.langExtension;
try {
// Extract tags, and convert the source code to plain text.
var sourceAndSpans = extractSourceSpans(job.sourceNode);
/** Plain text. @type {string} */
var source = sourceAndSpans.sourceCode;
job.sourceCode = source;
job.spans = sourceAndSpans.spans;
job.basePos = 0;
// Apply the appropriate language handler
langHandlerForExtension(opt_langExtension, source)(job);
// Integrate the decorations and tags back into the source code,
// modifying the sourceNode in place.
recombineTagsAndDecorations(job);
} catch (e) {
if ('console' in window) {
console['log'](e && e['stack'] ? e['stack'] : e);
}
}
}
/**
* @param sourceCodeHtml {string} The HTML to pretty print.
* @param opt_langExtension {string} The language name to use.
* Typically, a filename extension like 'cpp' or 'java'.
* @param opt_numberLines {number|boolean} True to number lines,
* or the 1-indexed number of the first line in sourceCodeHtml.
*/
function prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
var container = document.createElement('PRE');
// This could cause images to load and onload listeners to fire.
// E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
// We assume that the inner HTML is from a trusted source.
container.innerHTML = sourceCodeHtml;
if (opt_numberLines) {
numberLines(container, opt_numberLines);
}
var job = {
langExtension: opt_langExtension,
numberLines: opt_numberLines,
sourceNode: container
};
applyDecorator(job);
return container.innerHTML;
}
function prettyPrint(opt_whenDone) {
function byTagName(tn) { return document.getElementsByTagName(tn); }
// fetch a list of nodes to rewrite
var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
var elements = [];
for (var i = 0; i < codeSegments.length; ++i) {
for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
elements.push(codeSegments[i][j]);
}
}
codeSegments = null;
var clock = Date;
if (!clock['now']) {
clock = { 'now': function () { return +(new Date); } };
}
// The loop is broken into a series of continuations to make sure that we
// don't make the browser unresponsive when rewriting a large page.
var k = 0;
var prettyPrintingJob;
var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
var prettyPrintRe = /\bprettyprint\b/;
function doWork() {
var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ?
clock['now']() + 250 /* ms */ :
Infinity);
for (; k < elements.length && clock['now']() < endTime; k++) {
var cs = elements[k];
var className = cs.className;
if (className.indexOf('prettyprint') >= 0) {
// If the classes includes a language extensions, use it.
// Language extensions can be specified like
// <pre class="prettyprint lang-cpp">
// the language extension "cpp" is used to find a language handler as
// passed to PR.registerLangHandler.
// HTML5 recommends that a language be specified using "language-"
// as the prefix instead. Google Code Prettify supports both.
// http://dev.w3.org/html5/spec-author-view/the-code-element.html
var langExtension = className.match(langExtensionRe);
// Support <pre class="prettyprint"><code class="language-c">
var wrapper;
if (!langExtension && (wrapper = childContentWrapper(cs))
&& "CODE" === wrapper.tagName) {
langExtension = wrapper.className.match(langExtensionRe);
}
if (langExtension) {
langExtension = langExtension[1];
}
// make sure this is not nested in an already prettified element
var nested = false;
for (var p = cs.parentNode; p; p = p.parentNode) {
if ((p.tagName === 'pre' || p.tagName === 'code' ||
p.tagName === 'xmp') &&
p.className && p.className.indexOf('prettyprint') >= 0) {
nested = true;
break;
}
}
if (!nested) {
// Look for a class like linenums or linenums:<n> where <n> is the
// 1-indexed number of the first line.
var lineNums = cs.className.match(/\blinenums\b(?::(\d+))?/);
lineNums = lineNums
? lineNums[1] && lineNums[1].length ? +lineNums[1] : true
: false;
if (lineNums) { numberLines(cs, lineNums); }
// do the pretty printing
prettyPrintingJob = {
langExtension: langExtension,
sourceNode: cs,
numberLines: lineNums
};
applyDecorator(prettyPrintingJob);
}
}
}
if (k < elements.length) {
// finish up in a continuation
setTimeout(doWork, 250);
} else if (opt_whenDone) {
opt_whenDone();
}
}
doWork();
}
/**
* Find all the {@code <pre>} and {@code <code>} tags in the DOM with
* {@code class=prettyprint} and prettify them.
*
* @param {Function?} opt_whenDone if specified, called when the last entry
* has been finished.
*/
window['prettyPrintOne'] = prettyPrintOne;
/**
* Pretty print a chunk of code.
*
* @param {string} sourceCodeHtml code as html
* @return {string} code as html, but prettier
*/
window['prettyPrint'] = prettyPrint;
/**
* Contains functions for creating and registering new language handlers.
* @type {Object}
*/
window['PR'] = {
'createSimpleLexer': createSimpleLexer,
'registerLangHandler': registerLangHandler,
'sourceDecorator': sourceDecorator,
'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
'PR_COMMENT': PR_COMMENT,
'PR_DECLARATION': PR_DECLARATION,
'PR_KEYWORD': PR_KEYWORD,
'PR_LITERAL': PR_LITERAL,
'PR_NOCODE': PR_NOCODE,
'PR_PLAIN': PR_PLAIN,
'PR_PUNCTUATION': PR_PUNCTUATION,
'PR_SOURCE': PR_SOURCE,
'PR_STRING': PR_STRING,
'PR_TAG': PR_TAG,
'PR_TYPE': PR_TYPE
};
})();
================================================
FILE: index.html
================================================
<!DOCTYPE html>
<html>
<head>
<title>即时通讯示例--自动登录</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>
<script type="text/javascript" src="js/jQuery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/im.plus.js?skin=im"></script>
<script type="text/javascript" src="js/jQuery.im.js"></script>
<script type="text/javascript">
$(function() {
$(document).FnWebIM({
autoLogin :true, //boolean型,默认是否自动登录,true:自动登录,false:手动登录,默认为true
msgRefreshTime :1000, //number型,消息刷新时间,单位为ms
friendRefreshTime :10000, //number型,好友刷新时间,单位为ms
showSecretary :true, //boolean型,默认是否显示小秘书,true:显示,false:不显示,默认为true
noticeContent :"唐僧师徒历经千辛万苦,终于见到了佛祖……", //string型,公告内容 为空时不显示公告
sendPicture :true, //boolean型,是否允许发送图片,true:允许,false:不允许,默认为true
msgMaxSize :300, //number型,单条消息最大允许字符
msgSound :false, //boolean型,是否开启声音提醒,true:开启,false:关闭,默认为true
defaultWindow :"" //string型,登录后打开新聊天窗口,此处接收的参数为联系人的uid,否则会出错
});
});
</script>
</body>
</html>
================================================
FILE: js/im.css
================================================
@charset "utf-8";
*{margin:0;padding:0}
img{border: none;}
a,input.d-button{outline: none;outline: 0;hide-focus: expression( this.hideFocus=true );}
*html{_background: url(about:blank) fixed;}
body { _margin:0; _height:100%; background: #fcfcfc}
#fn_imbar{position: fixed;right:3px;bottom:0;padding:0 5px;_float:right;height:24px;line-height: 26px;overflow:hidden;border: solid 1px #ddd;border-bottom:none;background: url("../img/im_bg.png") repeat-x 0 -798px;font-size: 12px;color:#666;cursor: pointer;}
*html #fn_imbar{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}
#fn_imbar span{display: block;padding-left:20px;}
#fn_imbar.im_loading span{background: url("../img/loading.gif") no-repeat 0 6px;}
#fn_imbar.im_login span{background: url("../img/newmsg.gif") no-repeat 2px 6px;}
#fn_imbar b{padding:0 5px;background: #c00;color:#fff;margin-left:3px;-moz-border-radius:8px;-khtml-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;font-weight: normal;line-height: 12px;overflow: hidden; }
.d-outer { text-align:left; }
.d-border, .d-dialog { border:0 none; margin:0; border-collapse:collapse; width:auto;}
.d-nw, .d-n, .d-ne, .d-w, .d-c, .d-e, .d-sw, .d-s, .d-se, .d-header, .d-main, .d-footer { padding:0; }
.d-title { overflow:hidden; text-overflow: ellipsis; cursor:default; font-family:tahoma,arial,\5b8b\4f53;}
.d-state-noTitle .d-title { display:none; }
.d-close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; }
.d-close:hover { text-decoration:none; }
.d-main { text-align:center; vertical-align:middle; min-width:9em;font-family:tahoma,arial,\5b8b\4f53; }
.d-content {font-size:12px; display:block\0/*IE8 BUG*/; display:inline-block\9\0; *zoom:1; *display:inline; text-align:left; border:0 none; }
.d-content.d-state-full { display:block; width:100%; margin:0; padding:0!important; height:100%; }
.d-loading { width:100%; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(../img/loading.gif) no-repeat center center; }
.d-buttons { padding:5px 8px; text-align:right; white-space:nowrap; }
.d-button { margin-left:8px; height:24px;line-height: 22px; padding:0 15px;+padding:0 5px;border:solid 1px #c1c8d1;background: url("../img/dialog.png") repeat-x 0 -61px;border-radius: 2px;color: #333;cursor: pointer;}
.d-button:focus { outline:none 0 !important; }
.d-button:hover { color:#000; border-color:#e8cca0; background-position: 0 -92px;}
.d-button:active {border-color:#7494c4;outline:none 0 !important; }
.d-button[disabled],.d-button[disabled]:hover { cursor:default; color:#999;}
.d-state-highlight { color: #000; border: 1px solid #a1badf;}
.d-state-highlight:hover { border-color:#7494c4; }
.d-state-highlight:active { border-color:#999; }
.d-input-text{width:338px;padding:3px 5px;border:solid 1px #b7b7b7;outline: none;color:#666;font-family:tahoma,arial,\5b8b\4f53;margin-top:3px;}
.d-input-text:focus{border:solid 1px #999;}
.d-mask { background:#fff; filter:alpha(opacity=20);-moz-opacity:0.2; opacity:0.2; }
.d-inner { background:#FFF;}
.d-outer{ border:1px solid #b7b7b7;border-top:solid 2px #000;}
.d-state-lock .d-nw, .d-state-lock .d-n, .d-state-lock .d-ne, .d-state-lock .d-w, .d-state-lock .d-e, .d-state-lock .d-sw, .d-state-lock .d-s, .d-state-lock .d-se { background:rgba(0, 0, 0, .5); background:#999\9!important; filter:alpha(opacity=50);}
.d-title { height:29px; line-height:28px; padding:0 28px 0 15px; background: url("../img/dialog.png") repeat-x 0 -28px; border-bottom:1px solid #b7b7b7;color:#333!important;font-size:12px;font-weight: bold;}
.d-state-drag .d-title,.d-state-drag .d-titleBar { box-shadow:none; }
.d-close { padding:0; top:8px; right:8px; width:17px; height:17px;background: url("../img/dialog.png") no-repeat 2px 2px;overflow: hidden; }
.d-close:hover {color:#C00;margin:-1px;background-color:#fff;border: solid 1px #ced5e0; }
.d-content { color:#666; }
.d-state-focus{background: #fff;}
.d-state-focus .d-content { color:#333; }
.d-buttons { background-color:#fcfcfc; }
.d-nw, .d-n, .d-ne, .d-w, .d-e, .d-sw, .d-s, .d-se { display:none; }
#fn_imbox{display:none;border-left:solid 1px #313131;border-top:solid 2px #000;font-size:12px;position:fixed;bottom:0;right:0;width:180px;height:360px;background: #fff; font-family:tahoma,arial,\5b8b\4f53;z-index: 1;}
*html #fn_imbox{position:absolute;bottom:auto;right:-1px;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}
#fn_imbox .im_top{height:31px;background: url("../img/im_bg.png") repeat-x 0 -867px;position: relative;z-index: 1;}
#fn_imbox .im_top a.cc{display: block;height:8px;background: url("../img/im_bg.png") no-repeat center -678px;overflow: hidden; }
#fn_imbox .im_top a:hover{background-position: center -717px; }
#fn_imbox .im_top h4{font-size:12px;font-weight:normal;color:#fff;padding-left:30px; background: url("../img/im_bg.png") no-repeat 11px -761px;float: left;width:126px;height:22px;cursor: pointer;}
#fn_imbox .im_top a.modify{text-decoration: none;color:#fff;display:inline-block;width:14px;margin-right:5px;background: url("../img/m_ico.png") no-repeat 0 -148px;float: right;}
#fn_imbox .im_top a.modify:hover{background-position: 0 -167px;}
#fn_imbox .im_contents{height:303px;_height:326px;}
#fn_imbox .im_contents .hide{display: none;}
#fn_imbox .im_contents h4{border-bottom:solid 1px #b7b7b7;padding-left:20px;color:#717171;height:24px;line-height: 22px;cursor: pointer;font-weight: normal;margin-top:1px;font-size:12px;}
#fn_imbox .im_contents h4 i{color:#999;font-style: normal;margin-left:5px;}
#fn_imbox .im_group_expansion{background:url("../img/im_bg.png") no-repeat 6px -346px #f3f3f3; }
#fn_imbox .im_group_expansion:hover{background-position: 6px -365px; color:#333;}
#fn_imbox .im_group_away{background:url("../img/im_bg.png") no-repeat 6px -386px #f3f3f3; }
#fn_imbox .im_group_away:hover{background-position: 6px -408px; color:#333;}
#fn_imbox .im_group_contacts{height:253px;overflow: hidden;margin-bottom:1px;border-bottom:solid 1px #b7b7b7;_width:180px;_height:251px;}
#fn_imbox .im_contact{padding:8px;height: 30px;overflow: hidden;width: 175px;-moz-user-select: none;cursor: default;}
#fn_imbox .im_contact:hover{background: #fafafa;}
#fn_imbox .current{background: #f7f7f7;}
#fn_imbox .im_contact i{float: left;display: block;width:30px;height: 30px;overflow: hidden;-moz-border-radius:2px;-khtml-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}
#fn_imbox .im_contact.offline i img{width:30px;height: 30px;FILTER: gray;-webkit-filter: grayscale(100%); }
#fn_imbox .im_contact.offline:hover i img{FILTER:;-webkit-filter: grayscale(0);}
#fn_imbox .im_contact sup{display:block;width:5px;height:5px;position: absolute;margin:-8px 0 0 24px;border:solid 1px #fff; +margin:24px 0 0 -6px;overflow: hidden;}
#fn_imbox .im_contact.online sup{background: green;}
#fn_imbox .im_contact.offline sup{background: #ddd;}
#fn_imbox .im_contact span{float:left;display:block;width:100px;height:30px;line-height:30px;overflow:hidden;padding:0 10px;color:#555;}
#fn_imbox .im_contact b{display: inline-block;width:21px;height:12px;background: url("../img/new.gif") no-repeat;margin-left:5px;}
#fn_imbox .im_group_contacts a{float: left;display: block;width: 10px;height:10px;background: url("../img/im_bg.png") no-repeat 0 -450px;margin-top:11px;}
#fn_imbox .im_group_contacts a:hover{background-position: 0 -480px;}
#fn_imbox .im_bottombar{background:url("../img/im_bg.png") repeat-x 0 -799px;height:25px;line-height: 25px;position: absolute;z-index: 1;width: 180px;border-top:solid 1px #b7b7b7;_margin-top:-23px;}
#fn_imbox .im_bottombar input{float: left;background:transparent url("../img/im_bg.png") no-repeat 7px -581px;border: none 0;height:25px;line-height:26px;padding:0 0 0 20px;color:#666;width: 134px;outline: none;}
#fn_imbox .im_bottombar span{float: left;display: block;width:25px;height:25px;background:url("../img/im_bg.png") no-repeat 6px -611px;border-left:solid 1px #b7b7b7;cursor: pointer; }
#fn_imbox .im_bottombar span:hover, #fn_imbox .im_bottombar span.current{background-position:6px -641px; }
#fn_imbox .im_bottombar ul{position: fixed;padding:10px 0;border-top:2px solid #000;right:0;bottom:25px;background: #fff;display: none;z-index: 2;_position: absolute;+bottom:26px; }
#fn_imbox .im_bottombar li{list-style: none;padding:0 15px 0 28px;line-height: 22px;color:#666;height:24px;cursor: pointer;width: 84px;width: 137px;+line-height:26px;_line-height: 22px;overflow: hidden;}
#fn_imbox .im_bottombar li.selected{background: url("../img/im_bg.png") no-repeat 10px -508px;}
#fn_imbox .im_bottombar li.selected.current{background: url("../img/im_bg.png") no-repeat 10px -552px;}
#fn_imbox .im_bottombar li:hover{background-color: #f0f2f5 !important;}
#fn_imbox .im_bottombar li.setting{background:url("../img/im_bg.png") no-repeat 10px -612px;}
#fn_imbox .im_bottombar li.backlist{background:url("../img/m_ico.png") no-repeat 10px 7px;}
#fn_imbox .im_bottombar li.friends{background:url("../img/m_ico.png") no-repeat 10px -67px;}
#fn_imbox .im_bottombar li.help{background:url("../img/m_ico.png") no-repeat 10px -94px;}
#fn_imbox .im_bottombar li.loginout{background:url("../img/im_bg.png") no-repeat 10px -1307px;}
#fn_imbox .im_bottombar li.loginout:hover{background-position:10px -1332px;}
#fn_imbox .im_top h4.im_newmsg{background:url("../img/msg.gif") no-repeat 10px 1px;}
.im_contactinfobar{margin-left:-8px;font-family:tahoma,arial,\5b8b\4f53;}
.im_contactinfobar a.im_avatar{display: block;position: absolute;+position:relative;float:left;width:50px;height:50px;padding:3px;border: #b7b7b7 solid 1px;background: #fff;margin-top:-25px;z-index: 2;}
.im_contactinfobar a.im_avatar:hover{border-color:#999; }
.im_contactinfobar a.im_avatar.offline img{width:50px;height: 50px;FILTER: gray;-webkit-filter: grayscale(100%); }
.im_contactinfobar a.im_avatar.offline:hover img{FILTER:;-webkit-filter: grayscale(0);}
.im_contactinfobar .im_contactinfo{float: left;margin-left:66px;+margin-left:10px;}
.im_contactinfobar .im_contactinfo a{color:#555;text-decoration: none;font-weight: normal;}
.im_contactinfobar .im_contactinfo a:hover{color:#333;text-decoration: underline;}
.im_contactinfobar .im_contactinfo a#imcontact{padding:6px;display:inline;}
.im_contactinfobar .im_contactinfo a.im_addcontact{background: url("../img/im_bg.png") no-repeat 0 -907px;}
.im_contactinfobar .im_contactinfo a.im_addcontact:hover{background-position: 0 -934px;text-decoration: none;}
.im_contactinfobar .im_contactinfo a.im_removecontact{background: url("../img/im_bg.png") no-repeat 0 -1103px;}
.im_contactinfobar .im_contactinfo a.im_removecontact:hover{background-position: 0 -1130px;text-decoration: none;}
.im_contactinfobar .im_contactinfo a.im_contact{padding-right:20px;background: url("../img/im_bg.png") no-repeat right -150px;}
.im_contactinfobar .im_contactinfo a.im_contact:hover{background-position: right -167px;}
#im_window{width:400px;+height:328px;background: #fff;font-size:12px;font-family:tahoma,arial,\5b8b\4f53;overflow: hidden;}
#im_window #im_body{float: left;width: 400px;}
#im_window .im_chats{height:240px;overflow:hidden;border-bottom: solid 1px #b7b7b7;width:100%;}
#im_window .im_notice{width:100%;float:left;line-height: 16px;background: #fffbe2;color:#777;}
#im_window .im_notice span{display: block;width: 89%;padding:4px 0 4px 24px;background:url("../img/im_bg.png") no-repeat 7px -191px;float: left;}
#im_window a.im_notice_close{display: block;width: 12px;height: 12px;background: url("../img/im_bg.png") no-repeat 0 -103px;float: right;margin:7px 6px 0 0;}
#im_window a.im_notice_close:hover{background-position: 0 -124px;}
#im_window a.im_morechats{display: block;text-align: center;line-height: 24px;color:#999;text-decoration: none;}
#im_window a.im_morechats:hover{color:#666;background: #fcfcfc;}
#im_window .im_chat_content{padding:3px 10px;background: #fcfcfc;border-top:solid 1px #f1f1f1;clear: both;}
#im_window .im_chat_content i{font-style:normal;color:#999; }
#im_window .im_chat_content a.fn_url{padding-right:20px;background: url("../img/im_bg.png") no-repeat right -1035px;line-height: 16px; }
#im_window .im_chat_content .im_chat_txt{color:#555;line-height: 16px;padding:3px 0 5px 0;word-break: break-all;}
#im_window .im_chat_content .im_chat_txt em{color:#666;font-style: normal;display: block;background:url("../img/im_bg.png") no-repeat 0 -196px;padding-left:18px;}
#im_window .im_chat_content .im_chat_txt img{max-width: 380px;_width: expression(this.width> 380 ? 380 : true);}
#im_window .im_chat_content.myself{background: #fff;border-top:none;}
#im_window .im_send_msg{height:49px;padding:5px;line-height: 16px;overflow: hidden;outline:none; cursor: text;}
#im_window .im_operatebar{background: #f5f6f7;height:30px;+position: absolute;width: 400px;}
#im_window .im_operatebars{background: #f5f6f7;height:30px;}
#im_window a.im_operates{display: block;width:16px;height:16px;float: left;margin:7px 0 0 7px;}
#im_window a.im_face{background: url("../img/im_bg.png") no-repeat 0 -257px;}
#im_window a.im_face:hover{background-position:0 -278px;}
#im_window a.im_upload_pic{background: url("../img/im_bg.png") no-repeat 0 -301px;overflow: hidden;}
#im_window a.im_upload_pic:hover{background-position:0 -321px;}
#im_window a.im_shake{background: url("../img/im_bg.png") no-repeat 0 -40px;}
#im_window a.im_shake:hover{background-position:0 -61px;}
#im_window a.im_product{background: url("../img/im_bg.png") no-repeat 0 -1174px;}
#im_window a.im_product:hover{background-position:0 -1200px;}
#im_window a.im_card{background: url("../img/im_bg.png") no-repeat 0 -1224px;}
#im_window a.im_card:hover{background-position:0 -1250px;}
#im_window a.im_moreoperates{background: url("../img/im_bg.png") no-repeat 2px -1361px;}
#im_window a.im_moreoperates:hover{background-position:2px -1385px;}
#im_window .im_moreoperate{position: absolute;background:#fbfbfb;line-height: 26px;width: 400px; height:0;overflow: hidden;}
#im_window .im_moreoperate a{color:#888;text-decoration: none; float: left;padding-left:15px;margin-left:8px;}
#im_window .im_moreoperate a:hover{color:#666;}
#im_window .im_moreoperate a.im_abacklist{background: url("../img/m_ico.png") no-repeat 0 9px;}
#im_window .im_moreoperate a.im_areport{background: url("../img/m_ico.png") no-repeat 0 -15px;}
#im_window .im_moreoperate a.im_aemptyrecords{background: url("../img/m_ico.png") no-repeat 1px -40px;}
#im_window .im_moreoperate a.im_aclose{float: right;margin-right:6px;font-size:16px;}
#im_window .im_operatebar i{float: right;line-height: 30px;white-space:nowrap;color:#999;font-style: normal;_margin-top:-25px;}
#im_window .im_operatebar a.im_sendmsg_btn{display:block;width:64px;height:22px;margin:4px 5px 0 7px;float: right;background: url("../img/sendmsg.png") no-repeat;}
#im_window .im_operatebar a.im_sendmsg_btn:hover{background-position: 0 bottom;}
#im_face{display:none;position: absolute;margin:-193px 0 0 -1px;z-index:3;border:solid 1px #b7b7b7;width:400px;height:190px;font-size: 12px;overflow: hidden;background:#fff url("../img/loading.gif") no-repeat center center;}
#im_window #im_contactinfo{position:absolute;width: 199px;height:360px;+height:361px;display: none;border:solid 1px #b7b7b7;border-top:2px #000 solid;margin:-32px 0 0 400px;+margin:-33px 0 0 0;}
#im_window .im_contactinfobar{height:29px;line-height: 29px;background: url("../img/im_bg.png") repeat-x;border-bottom: solid 1px #b7b7b7;padding:0 7px;margin:0;+margin-top:1px;}
#im_window .im_contactinfobar a.d-close{margin-top:-2px;}
#im_window .im_contactinfobar a.d-close:hover{margin-top:-3px;}
#im_window .im_contactinfos{height: 300px;overflow:hidden;background:#fff url("../img/loading.gif") no-repeat center center;}
#im_window .im_contactgohome{line-height: 30px;float: right;padding-left:13px;color:#999;margin-right:7px;text-decoration: none;background: url("../img/im_bg.png") no-repeat 0 -962px;+line-height: 34px;_line-height:30px;}
#im_window .im_contactgohome:hover{color:#666;background-position: 0 -992px;}
.im_infos{margin:-2px;background: url("../img/i.png") repeat-x center center;border:solid 2px #000;-moz-border-radius:2px;-khtml-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}
.im_infos p{padding:20px 25px 20px 60px;background: url("../img/i_ico.png") no-repeat 20px 12px;color:#555; }
#im_msgbox .d-content{height:240px;}
================================================
FILE: js/im.plus.js
================================================
(function(g,h){function i(a){var c=f.expando,d=a===g?0:a[c];d===h&&(a[c]=d=++f.uuid);return d}var f=g.art=function(a,c){return new f.fn.constructor(a,c)},p=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,o=/[\n\t]/g;if(g.$===h)g.$=f;f.fn=f.prototype={constructor:function(a,c){var d,c=c||document;if(!a)return this;if(a.nodeType)return this[0]=a,this;if("string"===typeof a&&(d=p.exec(a))&&d[2])return(d=c.getElementById(d[2]))&&d.parentNode&&(this[0]=d),this;this[0]=a;return this},hasClass:function(a){return-1<
(" "+this[0].className+" ").replace(o," ").indexOf(" "+a+" ")?!0:!1},addClass:function(a){this.hasClass(a)||(this[0].className+=" "+a);return this},removeClass:function(a){var c=this[0];if(a){if(this.hasClass(a))c.className=c.className.replace(a," ")}else c.className="";return this},css:function(a,c){var d,e=this[0];if("string"===typeof a){if(c===h)return f.css(e,a);e.style[a]=c}else for(d in a)e.style[d]=a[d];return this},show:function(){return this.css("display","block")},hide:function(){return this.css("display",
"none")},offset:function(){var a=this[0],c=a.getBoundingClientRect(),d=a.ownerDocument,a=d.body,d=d.documentElement;return{left:c.left+(self.pageXOffset||d.scrollLeft)-(d.clientLeft||a.clientLeft||0),top:c.top+(self.pageYOffset||d.scrollTop)-(d.clientTop||a.clientTop||0)}},html:function(a){var c=this[0];if(a===h)return c.innerHTML;f.cleanData(c.getElementsByTagName("*"));c.innerHTML=a;return this},remove:function(){var a=this[0];f.cleanData(a.getElementsByTagName("*"));f.cleanData([a]);a.parentNode.removeChild(a);
return this},bind:function(a,c){f.event.add(this[0],a,c);return this},unbind:function(a,c){f.event.remove(this[0],a,c);return this}};f.fn.constructor.prototype=f.fn;f.isWindow=function(a){return a&&"object"===typeof a&&"setInterval"in a};f.fn.find=function(a){var c=this[0],d=a.split(".")[1];if(d)if(document.getElementsByClassName)d=c.getElementsByClassName(d);else{for(var e=a=0,b=[],c=(c||document).getElementsByTagName("*"),m=c.length,d=RegExp("(^|\\s)"+d+"(\\s|$)");a<m;a++)d.test(c[a].className)&&
(b[e]=c[a],e++);d=b}else d=c.getElementsByTagName(a);return f(d[0])};f.each=function(a,c){var d,e=0,b=a.length;if(b===h)for(d in a){if(!1===c.call(a[d],d,a[d]))break}else for(d=a[0];e<b&&!1!==c.call(d,e,d);d=a[++e]);return a};f.data=function(a,c,d){var e=f.cache,a=i(a);if(c===h)return e[a];e[a]||(e[a]={});d!==h&&(e[a][c]=d);return e[a][c]};f.removeData=function(a,c){var d=!0,e=f.expando,b=f.cache,m=i(a),n=m&&b[m];if(n)if(c){delete n[c];for(var k in n)d=!1;d&&delete f.cache[m]}else delete b[m],a.removeAttribute?
a.removeAttribute(e):a[e]=null};f.uuid=0;f.cache={};f.expando="@cache"+ +new Date;f.event={add:function(a,c,d){var j;var e,b=f.event;e=f.data(a,"@events")||f.data(a,"@events",{});j=e[c]=e[c]||{},e=j;(e.listeners=e.listeners||[]).push(d);if(!e.handler)e.elem=a,e.handler=b.handler(e),a.addEventListener?a.addEventListener(c,e.handler,!1):a.attachEvent("on"+c,e.handler)},remove:function(a,c,d){var e,b,m;b=f.event;var n=!0,k=f.data(a,"@events");if(k)if(c){if(b=k[c]){m=b.listeners;if(d)for(e=0;e<m.length;e++)m[e]===
d&&m.splice(e--,1);else b.listeners=[];if(0===b.listeners.length){a.removeEventListener?a.removeEventListener(c,b.handler,!1):a.detachEvent("on"+c,b.handler);delete k[c];b=f.data(a,"@events");for(var r in b)n=!1;n&&f.removeData(a,"@events")}}}else for(e in k)b.remove(a,e)},handler:function(a){return function(c){for(var c=f.event.fix(c||g.event),d=0,e=a.listeners,b;b=e[d++];)!1===b.call(a.elem,c)&&(c.preventDefault(),c.stopPropagation())}},fix:function(a){if(a.target)return a;var c={target:a.srcElement||
document,preventDefault:function(){a.returnValue=!1},stopPropagation:function(){a.cancelBubble=!0}},d;for(d in a)c[d]=a[d];return c}};f.cleanData=function(a){for(var c=0,d,e=a.length,b=f.event.remove,m=f.removeData;c<e;c++)d=a[c],b(d),m(d)};f.css="defaultView"in document&&"getComputedStyle"in document.defaultView?function(a,c){return document.defaultView.getComputedStyle(a,!1)[c]}:function(a,c){return a.currentStyle[c]||""};f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(){var c=
this[0],b;return(b=f.isWindow(c)?c:9===c.nodeType?c.defaultView||c.parentWindow:!1)?"pageXOffset"in b?b[a?"pageYOffset":"pageXOffset"]:b.document.documentElement[d]||b.document.body[d]:c[d]}});f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn[d]=function(a){var b=this[0];return!b?null==a?null:this:f.isWindow(b)?b.document.documentElement["client"+c]||b.document.body["client"+c]:9===b.nodeType?Math.max(b.documentElement["client"+c],b.body["scroll"+c],b.documentElement["scroll"+c],
b.body["offset"+c],b.documentElement["offset"+c]):null}});return f})(window);
(function(g,h,i){if("BackCompat"===document.compatMode)throw Error("artDialog: Document types require more than xhtml1.0");var f,p=0,o="artDialog"+ +new Date,a=h.VBArray&&!h.XMLHttpRequest,c="createTouch"in document&&!("onmousemove"in document)||/(iPhone|iPad|iPod)/i.test(navigator.userAgent),d=!a&&!c,e=function(b,a,n){b=b||{};if("string"===typeof b||1===b.nodeType)b={content:b,fixed:!c};var k;k=e.defaults;var r=b.follow=1===this.nodeType&&this||b.follow,t;for(t in k)b[t]===i&&(b[t]=k[t]);b.id=r&&
r[o+"follow"]||b.id||o+p;if(k=e.list[b.id])return r&&k.follow(r),k.zIndex().focus(),k;if(!d)b.fixed=!1;if(!b.button||!b.button.push)b.button=[];if(a!==i)b.ok=a;b.ok&&b.button.push({id:"ok",value:b.okValue,callback:b.ok,focus:!0});if(n!==i)b.cancel=n;b.cancel&&b.button.push({id:"cancel",value:b.cancelValue,callback:b.cancel});e.defaults.zIndex=b.zIndex;p++;return e.list[b.id]=f?f.constructor(b):new e.fn.constructor(b)};e.version="5.0";e.fn=e.prototype={constructor:function(b){var a;this.closed=!1;
this.config=b;this.dom=a=this.dom||this._getDom();b.skin&&a.wrap.addClass(b.skin);a.wrap.css("position",b.fixed?"fixed":"absolute");a.close[!1===b.cancel?"hide":"show"]();a.content.css("padding",b.padding);this.button.apply(this,b.button);this.title(b.title).content(b.content).size(b.width,b.height).time(b.time);b.follow?this.follow(b.follow):this.position();this.zIndex();b.lock&&this.lock();this._addEvent();this[b.visible?"visible":"hidden"]().focus();f=null;b.initialize&&b.initialize.call(this);
return this},content:function(b){var a,c,e,d,f=this,v=this.dom.content,l=v[0];this._elemBack&&(this._elemBack(),delete this._elemBack);if("string"===typeof b)v.html(b);else if(b&&1===b.nodeType)d=b.style.display,a=b.previousSibling,c=b.nextSibling,e=b.parentNode,this._elemBack=function(){a&&a.parentNode?a.parentNode.insertBefore(b,a.nextSibling):c&&c.parentNode?c.parentNode.insertBefore(b,c):e&&e.appendChild(b);b.style.display=d;f._elemBack=null},v.html(""),l.appendChild(b),g(b).show();return this.position()},
title:function(b){var a=this.dom,c=a.outer,a=a.title;!1===b?(a.hide().html(""),c.addClass("d-state-noTitle")):(a.show().html(b),c.removeClass("d-state-noTitle"));return this},position:function(){var b=this.dom,a=b.wrap[0],c=b.window,e=b.document,d=this.config.fixed,b=d?0:e.scrollLeft(),e=d?0:e.scrollTop(),d=c.width(),f=c.height(),g=a.offsetHeight,c=(d-a.offsetWidth)/2+b,d=d=(g<4*f/7?0.382*f-g/2:(f-g)/2)+e,a=a.style;a.left=Math.max(c,b)+"px";a.top=Math.max(d,e)+"px";return this},size:function(b,a){var c=
this.dom.main[0].style;"number"===typeof b&&(b+="px");"number"===typeof a&&(a+="px");c.width=b;c.height=a;return this},follow:function(b){var a=g(b),c=this.config;if(!b||!b.offsetWidth&&!b.offsetHeight)return this.position(this._left,this._top);var d=c.fixed,e=o+"follow",f=this.dom,h=f.window,l=f.document,f=h.width(),h=h.height(),s=l.scrollLeft(),l=l.scrollTop(),j=a.offset(),a=b.offsetWidth,i=d?j.left-s:j.left,j=d?j.top-l:j.top,q=this.dom.wrap[0],p=q.style,u=q.offsetWidth,q=q.offsetHeight,w=i-(u-
a)/2,x=j+b.offsetHeight,s=d?0:s,d=d?0:l;p.left=(w<s?i:w+u>f&&i-u>s?i-u+a:w)+"px";p.top=(x+q>h+d&&j-q>d?j-q:x)+"px";this._follow&&this._follow.removeAttribute(e);this._follow=b;b[e]=c.id;return this},button:function(){for(var b=this.dom.buttons,a=b[0],c=this._listeners=this._listeners||{},d=[].slice.call(arguments),e=0,f,h,l,i,j;e<d.length;e++){f=d[e];h=f.value;l=f.id||h;i=!c[l];j=!i?c[l].elem:document.createElement("input");j.type="button";j.className="d-button";c[l]||(c[l]={});if(h)j.value=h;if(f.width)j.style.width=
f.width;if(f.callback)c[l].callback=f.callback;if(f.focus)this._focus&&this._focus.removeClass("d-state-highlight"),this._focus=g(j).addClass("d-state-highlight"),this.focus();j[o+"callback"]=l;j.disabled=!!f.disabled;if(i)c[l].elem=j,a.appendChild(j)}b[0].style.display=d.length?"":"none";return this},visible:function(){this.dom.wrap.css("visibility","visible");this.dom.outer.addClass("d-state-visible");this._isLock&&this._lockMask.show();return this},hidden:function(){this.dom.wrap.css("visibility",
"hidden");this.dom.outer.removeClass("d-state-visible");this._isLock&&this._lockMask.hide();return this},close:function(){if(this.closed)return this;var b=this.dom,a=b.wrap,c=e.list,k=this.config.beforeunload,g=this.config.follow;if(k&&!1===k.call(this))return this;if(e.focus===this)e.focus=null;g&&g.removeAttribute(o+"follow");this._elemBack&&this._elemBack();this.time();this.unlock();this._removeEvent();delete c[this.config.id];if(f)a.remove();else{f=this;b.title.html("");b.content.html("");b.buttons.html("");
a[0].className=a[0].style.cssText="";b.outer[0].className="d-outer";a.css({left:0,top:0,position:d?"fixed":"absolute"});for(var h in this)this.hasOwnProperty(h)&&"dom"!==h&&delete this[h];this.hidden()}this.closed=!0;return this},time:function(b){var a=this,c=this._timer;c&&clearTimeout(c);if(b)this._timer=setTimeout(function(){a._click("cancel")},b);return this},focus:function(){if(this.config.focus)try{var b=this._focus&&this._focus[0]||this.dom.close[0];b&&b.focus()}catch(a){}return this},zIndex:function(){var b=
this.dom,a=e.focus,c=e.defaults.zIndex++;b.wrap.css("zIndex",c);this._lockMask&&this._lockMask.css("zIndex",c-1);a&&a.dom.outer.removeClass("d-state-focus");e.focus=this;b.outer.addClass("d-state-focus");return this},lock:function(){if(this._isLock)return this;var b=this,a=this.dom,c=document.createElement("div"),f=g(c),i=e.defaults.zIndex-1;this.zIndex();a.outer.addClass("d-state-lock");f.css({zIndex:i,position:"fixed",left:0,top:0,width:"100%",height:"100%",overflow:"hidden"}).addClass("d-mask");
d||f.css({position:"absolute",width:g(h).width()+"px",height:g(document).height()+"px"});f.bind("click",function(){b._reset()});document.body.appendChild(c);this._lockMask=f;this._isLock=!0;return this},unlock:function(){if(!this._isLock)return this;this._lockMask.unbind();this._lockMask.hide();this._lockMask.remove();this.dom.outer.removeClass("d-state-lock");this._isLock=!1;return this},_getDom:function(){var b=document.body;if(!b)throw Error('artDialog: "documents.body" not ready');
var a=document.createElement("div");a.style.cssText="position:absolute;left:0;top:0";a.innerHTML=e._templates;b.insertBefore(a,b.firstChild);for(var c=0,d={},f=a.getElementsByTagName("*"),i=f.length;c<i;c++)(b=f[c].className.split("d-")[1])&&(d[b]=g(f[c]));d.window=g(h);d.document=g(document);d.wrap=g(a);return d},_click:function(b){b=this._listeners[b]&&this._listeners[b].callback;return"function"!==typeof b||!1!==b.call(this)?this.close():this},_reset:function(){var b=this.config.follow;b?this.follow(b):
this.position()},_addEvent:function(){var b=this,a=this.dom;a.wrap.bind("click",function(c){c=c.target;if(c.disabled)return!1;if(c===a.close[0])return b._click("cancel"),!1;(c=c[o+"callback"])&&b._click(c)}).bind("mousedown",function(){b.zIndex()})},_removeEvent:function(){this.dom.wrap.unbind()}};e.fn.constructor.prototype=e.fn;g.fn.dialog=g.fn.artDialog=function(){var b=arguments;this[this.live?"live":"bind"]("click",function(){e.apply(this,b);return!1});return this};e.focus=null;e.get=function(b){return b===
i?e.list:e.list[b]};e.list={};g(document).bind("keydown",function(b){var a=b.target,c=a.nodeName,d=/^input|textarea$/i,f=e.focus,b=b.keyCode;f&&f.config.esc&&!(d.test(c)&&"button"!==a.type)&&27===b&&f._click("cancel")});g(h).bind("resize",function(){var b=e.list,a;for(a in b)b[a]._reset()});e._templates='<div class="d-outer"><table class="d-border"><tbody><tr><td class="d-nw"></td><td class="d-n"></td><td class="d-ne"></td></tr><tr><td class="d-w"></td><td class="d-c"><div class="d-inner"><table class="d-dialog"><tbody><tr><td class="d-header"><div class="d-titleBar"><div class="d-title"></div><a class="d-close" href="javascript:/*artDialog*/;"></a></div></td></tr><tr><td class="d-main"><div class="d-content"></div></td></tr><tr><td class="d-footer"><div class="d-buttons"></div></td></tr></tbody></table></div></td><td class="d-e"></td></tr><tr><td class="d-sw"></td><td class="d-s"></td><td class="d-se"></td></tr></tbody></table></div>';
e.defaults={content:'<div class="d-loading"><span>数据加载中...</span></div>',
gitextract_eevj4kjm/
├── .gitattributes
├── .gitignore
├── README.md
├── ajax/
│ ├── card.html
│ ├── chats.php
│ ├── companyinfo.html
│ ├── friends.html
│ ├── friends.php
│ ├── im_contact.html
│ ├── im_face.html
│ ├── im_window.html
│ ├── login.html
│ ├── msgbox.html
│ ├── product.html
│ ├── report.html
│ ├── set.html
│ ├── share.html
│ └── userinfo.php
├── demo.html
├── docs/
│ ├── css/
│ │ └── docs.css
│ ├── index.html
│ └── prettify/
│ ├── lang-apollo.js
│ ├── lang-clj.js
│ ├── lang-css.js
│ ├── lang-go.js
│ ├── lang-hs.js
│ ├── lang-lisp.js
│ ├── lang-lua.js
│ ├── lang-ml.js
│ ├── lang-n.js
│ ├── lang-proto.js
│ ├── lang-scala.js
│ ├── lang-sql.js
│ ├── lang-tex.js
│ ├── lang-vb.js
│ ├── lang-vhdl.js
│ ├── lang-wiki.js
│ ├── lang-xq.js
│ ├── lang-yaml.js
│ ├── prettify.css
│ └── prettify.js
├── img/
│ └── set.psd
├── index.html
├── js/
│ ├── im.css
│ ├── im.plus.js
│ └── jQuery.im.js
├── set/
│ ├── Jcrop/
│ │ ├── css/
│ │ │ └── jquery.Jcrop.css
│ │ ├── demos/
│ │ │ ├── crop.php
│ │ │ ├── demo_files/
│ │ │ │ └── demos.css
│ │ │ ├── jquery-ui.html
│ │ │ ├── non-image.html
│ │ │ ├── styling.html
│ │ │ ├── tutorial1.html
│ │ │ ├── tutorial2.html
│ │ │ ├── tutorial3.html
│ │ │ ├── tutorial4.html
│ │ │ └── tutorial5.html
│ │ ├── index.html
│ │ └── js/
│ │ ├── jquery.Jcrop.js
│ │ └── jquery.color.js
│ ├── avatar.html
│ ├── css/
│ │ └── avatar.css
│ ├── js/
│ │ └── jquery.Jcrop.js
│ └── uploadify/
│ ├── jquery.uploadify-3.1.js
│ └── uploadify.swf
└── sound/
└── msg.swf
SYMBOL INDEX (229 symbols across 7 files)
FILE: docs/prettify/prettify.js
function combinePrefixPatterns (line 221) | function combinePrefixPatterns(regexs) {
function extractSourceSpans (line 493) | function extractSourceSpans(node) {
function appendDecorations (line 557) | function appendDecorations(basePos, sourceCode, langHandler, out) {
function childContentWrapper (line 580) | function childContentWrapper(element) {
function createSimpleLexer (line 639) | function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatter...
function sourceDecorator (line 782) | function sourceDecorator(options) {
function numberLines (line 910) | function numberLines(node, opt_startLineNum) {
function recombineTagsAndDecorations (line 1062) | function recombineTagsAndDecorations(job) {
function registerLangHandler (line 1177) | function registerLangHandler(handler, fileExtensions) {
function langHandlerForExtension (line 1187) | function langHandlerForExtension(extension, source) {
function applyDecorator (line 1296) | function applyDecorator(job) {
function prettyPrintOne (line 1328) | function prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLin...
function prettyPrint (line 1347) | function prettyPrint(opt_whenDone) {
FILE: js/im.plus.js
function i (line 1) | function i(a){var c=f.expando,d=a===g?0:a[c];d===h&&(a[c]=d=++f.uuid);re...
function n (line 34) | function n(){if(k<r){k=r}if(k>s-v-r){k=s-v-r}g.stop().animate({top:k},10...
function p (line 34) | function p(){if(k<r){k=r}if(k>s-v-r){k=s-v-r}g.css({top:k});var x=-((k-r...
FILE: js/jQuery.im.js
function loginIM (line 26) | function loginIM(data){
function loginError (line 199) | function loginError(XMLHttpRequest, textStatus, errorThrown){
function Friends (line 203) | function Friends(){
function openWindow (line 234) | function openWindow(cid,uid,o,a,n,c,m){
function msgList (line 250) | function msgList(){
function operatewindow (line 273) | function operatewindow(){
function sendShake (line 474) | function sendShake(){
function sendMsg (line 480) | function sendMsg(){
function urlFilter (line 499) | function urlFilter(){
function msgDate (line 510) | function msgDate(){
function newMsg (line 516) | function newMsg(){
function noMsg (line 524) | function noMsg(){
function modify (line 528) | function modify(){
function card (line 542) | function card(uid){
function cardQRcode (line 555) | function cardQRcode(pNode){
function message (line 572) | function message(c){
function msgPaste (line 583) | function msgPaste(){
FILE: set/Jcrop/js/jquery.Jcrop.js
function px (line 39) | function px(n) {
function cssClass (line 42) | function cssClass(cl) {
function supportsColorFade (line 45) | function supportsColorFade() {
function getPos (line 48) | function getPos(obj) //{{{
function mouseAbs (line 54) | function mouseAbs(e) //{{{
function setOptions (line 59) | function setOptions(opt) //{{{
function startDragMode (line 69) | function startDragMode(mode, pos) //{{{
function dragmodeHandler (line 88) | function dragmodeHandler(mode, f) //{{{
function createMover (line 127) | function createMover(pos) //{{{
function oppLockCorner (line 140) | function oppLockCorner(ord) //{{{
function createDragger (line 162) | function createDragger(ord) //{{{
function presize (line 184) | function presize($obj, w, h) //{{{
function unscale (line 201) | function unscale(c) //{{{
function doneSelect (line 213) | function doneSelect(pos) //{{{
function newSelection (line 225) | function newSelection(e) //{{{
function selectDrag (line 248) | function selectDrag(pos) //{{{
function newTracker (line 254) | function newTracker() //{{{
function hasTouchSupport (line 400) | function hasTouchSupport() {
function detectSupport (line 423) | function detectSupport() {
function setPressed (line 463) | function setPressed(pos) //{{{
function setCurrent (line 470) | function setCurrent(pos) //{{{
function getOffset (line 479) | function getOffset() //{{{
function moveOffset (line 484) | function moveOffset(offset) //{{{
function getCorner (line 509) | function getCorner(ord) //{{{
function getFixed (line 524) | function getFixed() //{{{
function rebound (line 623) | function rebound(p) //{{{
function flipCoords (line 642) | function flipCoords(x1, y1, x2, y2) //{{{
function getRect (line 659) | function getRect() //{{{
function makeObj (line 719) | function makeObj(a) //{{{
function resizeShades (line 759) | function resizeShades(w,h) {
function updateAuto (line 763) | function updateAuto()
function updateShade (line 767) | function updateShade(c)
function createShade (line 788) | function createShade() {
function enableShade (line 794) | function enableShade() {
function setBgColor (line 810) | function setBgColor(color,now) {
function disableShade (line 813) | function disableShade() {
function setOpacity (line 827) | function setOpacity(opacity,now) {
function refreshAll (line 840) | function refreshAll() {
function getShades (line 844) | function getShades() {
function insertBorder (line 871) | function insertBorder(type) //{{{
function dragDiv (line 881) | function dragDiv(ord, zi) //{{{
function insertHandle (line 897) | function insertHandle(ord) //{{{
function insertDragbar (line 905) | function insertDragbar(ord) //{{{
function createDragbars (line 910) | function createDragbars(li) //{{{
function createBorders (line 918) | function createBorders(li) //{{{
function createHandles (line 932) | function createHandles(li) //{{{
function moveto (line 940) | function moveto(x, y) //{{{
function resize (line 954) | function resize(w, h) //{{{
function refresh (line 959) | function refresh() //{{{
function updateVisible (line 971) | function updateVisible(select) //{{{
function update (line 978) | function update(select) //{{{
function setBgOpacity (line 995) | function setBgOpacity(opacity,force,now) //{{{
function show (line 1010) | function show() //{{{
function release (line 1020) | function release() //{{{
function showHandles (line 1032) | function showHandles() //{{{
function enableHandles (line 1039) | function enableHandles() //{{{
function disableHandles (line 1048) | function disableHandles() //{{{
function animMode (line 1054) | function animMode(v) //{{{
function done (line 1063) | function done() //{{{
function toFront (line 1131) | function toFront() //{{{
function toBack (line 1148) | function toBack() //{{{
function trackMove (line 1156) | function trackMove(e) //{{{
function trackUp (line 1162) | function trackUp(e) //{{{
function activateHandlers (line 1184) | function activateHandlers(move, done) //{{{
function trackTouchMove (line 1193) | function trackTouchMove(e) //{{{
function trackTouchEnd (line 1200) | function trackTouchEnd(e) //{{{
function setCursor (line 1207) | function setCursor(t) //{{{
function watchKeys (line 1236) | function watchKeys() //{{{
function onBlur (line 1244) | function onBlur(e) //{{{
function doNudge (line 1249) | function doNudge(e, x, y) //{{{
function parseKey (line 1259) | function parseKey(e) //{{{
function setClass (line 1312) | function setClass(cname) //{{{
function animateTo (line 1317) | function animateTo(a, callback) //{{{
function setSelect (line 1377) | function setSelect(rect) //{{{
function setSelectRaw (line 1384) | function setSelectRaw(l) //{{{
function tellSelect (line 1391) | function tellSelect() //{{{
function tellScaled (line 1396) | function tellScaled() //{{{
function setOptionsNew (line 1401) | function setOptionsNew(opt) //{{{
function disableCrop (line 1407) | function disableCrop() //{{{
function enableCrop (line 1415) | function enableCrop() //{{{
function cancelCrop (line 1421) | function cancelCrop() //{{{
function destroy (line 1427) | function destroy() //{{{
function setImage (line 1434) | function setImage(src, callback) //{{{
function colorChangeMacro (line 1463) | function colorChangeMacro($obj,color,now) {
function interfaceUpdate (line 1476) | function interfaceUpdate(alt) //{{{
function completeCheck (line 1622) | function completeCheck(){
FILE: set/Jcrop/js/jquery.color.js
function getRGB (line 30) | function getRGB(color) {
function getColor (line 57) | function getColor(elem, attr) {
FILE: set/js/jquery.Jcrop.js
function px (line 39) | function px(n) {
function cssClass (line 42) | function cssClass(cl) {
function supportsColorFade (line 45) | function supportsColorFade() {
function getPos (line 48) | function getPos(obj) //{{{
function mouseAbs (line 54) | function mouseAbs(e) //{{{
function setOptions (line 59) | function setOptions(opt) //{{{
function startDragMode (line 69) | function startDragMode(mode, pos) //{{{
function dragmodeHandler (line 88) | function dragmodeHandler(mode, f) //{{{
function createMover (line 127) | function createMover(pos) //{{{
function oppLockCorner (line 140) | function oppLockCorner(ord) //{{{
function createDragger (line 162) | function createDragger(ord) //{{{
function presize (line 184) | function presize($obj, w, h) //{{{
function unscale (line 201) | function unscale(c) //{{{
function doneSelect (line 213) | function doneSelect(pos) //{{{
function newSelection (line 225) | function newSelection(e) //{{{
function selectDrag (line 248) | function selectDrag(pos) //{{{
function newTracker (line 254) | function newTracker() //{{{
function hasTouchSupport (line 400) | function hasTouchSupport() {
function detectSupport (line 423) | function detectSupport() {
function setPressed (line 463) | function setPressed(pos) //{{{
function setCurrent (line 470) | function setCurrent(pos) //{{{
function getOffset (line 479) | function getOffset() //{{{
function moveOffset (line 484) | function moveOffset(offset) //{{{
function getCorner (line 509) | function getCorner(ord) //{{{
function getFixed (line 524) | function getFixed() //{{{
function rebound (line 623) | function rebound(p) //{{{
function flipCoords (line 642) | function flipCoords(x1, y1, x2, y2) //{{{
function getRect (line 659) | function getRect() //{{{
function makeObj (line 719) | function makeObj(a) //{{{
function resizeShades (line 759) | function resizeShades(w,h) {
function updateAuto (line 763) | function updateAuto()
function updateShade (line 767) | function updateShade(c)
function createShade (line 788) | function createShade() {
function enableShade (line 794) | function enableShade() {
function setBgColor (line 810) | function setBgColor(color,now) {
function disableShade (line 813) | function disableShade() {
function setOpacity (line 827) | function setOpacity(opacity,now) {
function refreshAll (line 840) | function refreshAll() {
function getShades (line 844) | function getShades() {
function insertBorder (line 871) | function insertBorder(type) //{{{
function dragDiv (line 881) | function dragDiv(ord, zi) //{{{
function insertHandle (line 897) | function insertHandle(ord) //{{{
function insertDragbar (line 905) | function insertDragbar(ord) //{{{
function createDragbars (line 910) | function createDragbars(li) //{{{
function createBorders (line 918) | function createBorders(li) //{{{
function createHandles (line 932) | function createHandles(li) //{{{
function moveto (line 940) | function moveto(x, y) //{{{
function resize (line 954) | function resize(w, h) //{{{
function refresh (line 959) | function refresh() //{{{
function updateVisible (line 971) | function updateVisible(select) //{{{
function update (line 978) | function update(select) //{{{
function setBgOpacity (line 995) | function setBgOpacity(opacity,force,now) //{{{
function show (line 1010) | function show() //{{{
function release (line 1020) | function release() //{{{
function showHandles (line 1032) | function showHandles() //{{{
function enableHandles (line 1039) | function enableHandles() //{{{
function disableHandles (line 1048) | function disableHandles() //{{{
function animMode (line 1054) | function animMode(v) //{{{
function done (line 1063) | function done() //{{{
function toFront (line 1131) | function toFront() //{{{
function toBack (line 1148) | function toBack() //{{{
function trackMove (line 1156) | function trackMove(e) //{{{
function trackUp (line 1162) | function trackUp(e) //{{{
function activateHandlers (line 1184) | function activateHandlers(move, done) //{{{
function trackTouchMove (line 1193) | function trackTouchMove(e) //{{{
function trackTouchEnd (line 1200) | function trackTouchEnd(e) //{{{
function setCursor (line 1207) | function setCursor(t) //{{{
function watchKeys (line 1236) | function watchKeys() //{{{
function onBlur (line 1244) | function onBlur(e) //{{{
function doNudge (line 1249) | function doNudge(e, x, y) //{{{
function parseKey (line 1259) | function parseKey(e) //{{{
function setClass (line 1312) | function setClass(cname) //{{{
function animateTo (line 1317) | function animateTo(a, callback) //{{{
function setSelect (line 1377) | function setSelect(rect) //{{{
function setSelectRaw (line 1384) | function setSelectRaw(l) //{{{
function tellSelect (line 1391) | function tellSelect() //{{{
function tellScaled (line 1396) | function tellScaled() //{{{
function setOptionsNew (line 1401) | function setOptionsNew(opt) //{{{
function disableCrop (line 1407) | function disableCrop() //{{{
function enableCrop (line 1415) | function enableCrop() //{{{
function cancelCrop (line 1421) | function cancelCrop() //{{{
function destroy (line 1427) | function destroy() //{{{
function setImage (line 1434) | function setImage(src, callback) //{{{
function colorChangeMacro (line 1463) | function colorChangeMacro($obj,color,now) {
function interfaceUpdate (line 1476) | function interfaceUpdate(alt) //{{{
function completeCheck (line 1622) | function completeCheck(){
FILE: set/uploadify/jquery.uploadify-3.1.js
function f (line 13) | function f(){if(J){return;}try{var Z=j.getElementsByTagName("body")[0].a...
function K (line 14) | function K(X){if(J){X();}else{U[U.length]=X;}}
function s (line 14) | function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load"...
function h (line 16) | function h(){if(T){V();}else{H();}}
function V (line 16) | function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);
function H (line 19) | function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[a...
function z (line 23) | function z(aa){var X=null;
function A (line 24) | function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312);
function P (line 25) | function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X...
function p (line 29) | function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");
function g (line 31) | function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML...
function u (line 33) | function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X;}if(aa){if...
function e (line 37) | function e(Z,X,Y){var aa=C("param");
function y (line 38) | function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.s...
function b (line 39) | function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function...
function c (line 40) | function c(Z){var X=null;try{X=j.getElementById(Z);}catch(Y){}return X;}
function C (line 40) | function C(X){return j.createElement(X);}
function i (line 40) | function i(Z,X,Y){Z.attachEvent(X,Y);
function F (line 41) | function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=pars...
function v (line 42) | function v(ac,Y,ad,ab){if(M.ie&&M.mac){return;}var aa=j.getElementsByTag...
function w (line 45) | function w(Z,X){if(!m){return;}var Y=X?"visible":"hidden";if(J&&c(Z)){c(...
function L (line 45) | function L(Y){var Z=/[\\\"<>\.;]/;
Condensed preview — 66 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (473K chars).
[
{
"path": ".gitattributes",
"chars": 483,
"preview": "# Auto detect text files and perform LF normalization\n* text=auto\n\n# Custom for Visual Studio\n*.cs diff=csharp\n*.sln"
},
{
"path": ".gitignore",
"chars": 2643,
"preview": "#################\n## Eclipse\n#################\n\n*.pydevproject\n.project\n.metadata\nbin/\ntmp/\n*.tmp\n*.bak\n*.swp\n*~.nib\nloc"
},
{
"path": "README.md",
"chars": 1312,
"preview": "# WebIM说明\nWebIM是一款基于jQuery的一款web即时通讯插件,姑且这么称呼吧。插件最大程度实现了IM的常用功能,除即时通讯的常用功能外,还加入了:消息盒子、窗口抖动、添加删除好友、最近联系人、超时登录界面、网站小秘书、聊天记"
},
{
"path": "ajax/card.html",
"chars": 1921,
"preview": "<dl class=\"im_contactcard\">\r\n <dt><b>郑子涵</b> 先生 <span>技术部</span> | <i>前端开发</i> <a href=\"#\" target=\"_blank\" title=\"实名"
},
{
"path": "ajax/chats.php",
"chars": 927,
"preview": "[\r\n {\"T\": \"1\",\"D\": \"6-11 12:12:23\",\"M\": \"你们带U盘了么?\"},\r\n {\"T\": \"0\",\"D\": \"6-11 12:12:23\",\"M\": \"<img src='face/qq/26.gif' "
},
{
"path": "ajax/companyinfo.html",
"chars": 3036,
"preview": "<div class=\"im_suppliersinfo\">\r\n <dl>\r\n <dt>生财通指数:</dt>\r\n <dd><i>120</i></dd>\r\n </dl>\r\n <dl>\r\n "
},
{
"path": "ajax/friends.html",
"chars": 4641,
"preview": "<div class=\"im_friendsbox\">\r\n <dl>\r\n <dt uid=\"\"><img src=\"../temp/1.jpg\" width=\"30\" height=\"30\" /></dt>\r\n "
},
{
"path": "ajax/friends.php",
"chars": 1287,
"preview": "[\r\n {\"RencentContacts\":\r\n [\r\n {\"a\": \"../img/noavatar_s.png\",\"n\": \"阳光般闪耀\",\"o\": \"online\",\"uid\": \"001\",\"h\":\"\", \""
},
{
"path": "ajax/im_contact.html",
"chars": 1149,
"preview": "<div class=\"im_top\">\r\n <a href=\"javascript:;\" class=\"cc\"></a>\r\n <h4>在线聊天工具 </h4>\r\n <a href =\"javascript:;\" titl"
},
{
"path": "ajax/im_face.html",
"chars": 5396,
"preview": "<ul>\r\n <li class=\"current\">默认表情</li>\r\n <li class=\"im_faceclose\">×</li>\r\n</ul>\r\n<div class=\"im_faceico\">\r\n "
},
{
"path": "ajax/im_window.html",
"chars": 1880,
"preview": "<div id=\"im_window\" >\r\n <div id=\"im_body\">\r\n <div class=\"im_chats\">\r\n\r\n <a class=\"im_morechats\" hre"
},
{
"path": "ajax/login.html",
"chars": 1779,
"preview": "<div class=\"input-prepend\">\r\n <span class=\"add-on\">用户名:</span>\r\n <input class=\"logintxt\" type=\"text\" size=\"20\">\r\n<"
},
{
"path": "ajax/msgbox.html",
"chars": 1720,
"preview": "<div class=\"im_msgboxs\" id=\"im_msgboxs\" style=\"height:240px;\">\r\n <dl class=\"im_msgbox\">\r\n <dt class=\"uid\"><img"
},
{
"path": "ajax/product.html",
"chars": 2409,
"preview": "<div class=\"im_productbox\">\r\n <a href=\"javascript:;\" class=\"im_product_img\">\r\n <img src=\"http://www.zghnyb.com"
},
{
"path": "ajax/report.html",
"chars": 986,
"preview": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n <meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\r\n <style type"
},
{
"path": "ajax/set.html",
"chars": 50,
"preview": "<img src=\"img/set.png\" width=\"489\" height=\"288\" />"
},
{
"path": "ajax/share.html",
"chars": 2205,
"preview": "<div class=\"im_sharebox\">\r\n <a href=\"#\" class=\"weibo\" target=\"_blank\">新浪微博</a>\r\n <a href=\"#\" class=\"t\" target=\"_bl"
},
{
"path": "ajax/userinfo.php",
"chars": 211,
"preview": "[\r\n {\"UserConfig\": [0,0,0,0],\"UserAvatar\": \"../img/avatar_b-sys.png\",\"UserName\": \"zihan\",\"isOnline\": \"online\",\"UID\": "
},
{
"path": "demo.html",
"chars": 1495,
"preview": "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <title>即时通讯示例</title>\r\n <meta http-equiv=\"Content-Type\" content=\"text/html;chars"
},
{
"path": "docs/css/docs.css",
"chars": 14740,
"preview": "* {\n margin: 0;\n padding: 0;\n}\n\na {\n outline: none;\n}\n\nbody {\n line-height: 1;\n}\n\ntable {\n border-collaps"
},
{
"path": "docs/index.html",
"chars": 11396,
"preview": "\r\n<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n <meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\" />\r\n <title>"
},
{
"path": "docs/prettify/lang-apollo.js",
"chars": 986,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"com\",/^#[^\\n\\r]*/,null,\"#\"],[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\xa0\"],"
},
{
"path": "docs/prettify/lang-clj.js",
"chars": 1444,
"preview": "/*\n Copyright (C) 2011 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use th"
},
{
"path": "docs/prettify/lang-css.js",
"chars": 861,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\f\\r ]+/,null,\" \\t\\r\\n\f\"]],[[\"str\",/^\"(?:[^\\n\\f\\r\"\\\\]|\\\\(?:\\r"
},
{
"path": "docs/prettify/lang-go.js",
"chars": 281,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\xa0\"],[\"pln\",/^(?:\"(?:[^\"\\\\]|\\\\[\\S\\s"
},
{
"path": "docs/prettify/lang-hs.js",
"chars": 569,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t-\\r ]+/,null,\"\\t\\n\u000b\f\\r \"],[\"str\",/^\"(?:[^\\n\\f\\r\"\\\\]|\\\\[\\S\\s])*("
},
{
"path": "docs/prettify/lang-lisp.js",
"chars": 755,
"preview": "var a=null;\nPR.registerLangHandler(PR.createSimpleLexer([[\"opn\",/^\\(+/,a,\"(\"],[\"clo\",/^\\)+/,a,\")\"],[\"com\",/^;[^\\n\\r]*/,a"
},
{
"path": "docs/prettify/lang-lua.js",
"chars": 551,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\xa0\"],[\"str\",/^(?:\"(?:[^\"\\\\]|\\\\[\\S\\s"
},
{
"path": "docs/prettify/lang-ml.js",
"chars": 1104,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\xa0\"],[\"com\",/^#(?:if[\\t\\n\\r \\xa0]+("
},
{
"path": "docs/prettify/lang-n.js",
"chars": 1400,
"preview": "var a=null;\nPR.registerLangHandler(PR.createSimpleLexer([[\"str\",/^(?:'(?:[^\\n\\r'\\\\]|\\\\.)*'|\"(?:[^\\n\\r\"\\\\]|\\\\.)*(?:\"|$))/"
},
{
"path": "docs/prettify/lang-proto.js",
"chars": 302,
"preview": "PR.registerLangHandler(PR.sourceDecorator({keywords:\"bytes,default,double,enum,extend,extensions,false,group,import,max,"
},
{
"path": "docs/prettify/lang-scala.js",
"chars": 914,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\xa0\"],[\"str\",/^\"(?:\"\"(?:\"\"?(?!\")|[^\""
},
{
"path": "docs/prettify/lang-sql.js",
"chars": 1685,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\xa0\"],[\"str\",/^(?:\"(?:[^\"\\\\]|\\\\.)*\"|"
},
{
"path": "docs/prettify/lang-tex.js",
"chars": 284,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\xa0\"],[\"com\",/^%[^\\n\\r]*/,null,\"%\"]]"
},
{
"path": "docs/prettify/lang-vb.js",
"chars": 1700,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0\\u2028\\u2029]+/,null,\"\\t\\n\\r \\xa0
\"],[\"str\",/^(?:[\"\\u"
},
{
"path": "docs/prettify/lang-vhdl.js",
"chars": 1448,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\xa0\"]],[[\"str\",/^(?:[box]?\"(?:[^\"]|\""
},
{
"path": "docs/prettify/lang-wiki.js",
"chars": 542,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\d\\t a-gi-z\\xa0]+/,null,\"\\t \\xa0abcdefgijklmnopqrstuvwxyz01234567"
},
{
"path": "docs/prettify/lang-xq.js",
"chars": 23242,
"preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"var pln\",/^\\$[\\w-]+/,null,\"$\"]],[[\"pln\",/^[\\s=][<>][\\s=]/],[\"lit\",/^@[\\w-"
},
{
"path": "docs/prettify/lang-yaml.js",
"chars": 412,
"preview": "var a=null;\nPR.registerLangHandler(PR.createSimpleLexer([[\"pun\",/^[:>?|]+/,a,\":|>?\"],[\"dec\",/^%(?:YAML|TAG)[^\\n\\r#]+/,a,"
},
{
"path": "docs/prettify/prettify.css",
"chars": 825,
"preview": ".com { color: #93a1a1; }\n.lit { color: #195f91; }\n.pun, .opn, .clo { color: #93a1a1; }\n.fun { color: #dc322f; }\n.str, .a"
},
{
"path": "docs/prettify/prettify.js",
"chars": 62594,
"preview": "// Copyright (C) 2006 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not u"
},
{
"path": "index.html",
"chars": 1230,
"preview": "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <title>即时通讯示例--自动登录</title>\r\n <meta http-equiv=\"Content-Type\" content=\"text/html"
},
{
"path": "js/im.css",
"chars": 16676,
"preview": "@charset \"utf-8\";\n*{margin:0;padding:0}\nimg{border: none;}\na,input.d-button{outline: none;outline: 0;hide-focus: express"
},
{
"path": "js/im.plus.js",
"chars": 21982,
"preview": "(function(g,h){function i(a){var c=f.expando,d=a===g?0:a[c];d===h&&(a[c]=d=++f.uuid);return d}var f=g.art=function(a,c)"
},
{
"path": "js/jQuery.im.js",
"chars": 36095,
"preview": ";(function($){\r\n $.fn.extend({\r\n //将可选择的变量传递给方法\r\n FnWebIM: function(options) {\r\n //设置默认值并用逗"
},
{
"path": "set/Jcrop/css/jquery.Jcrop.css",
"chars": 2963,
"preview": "/* jquery.Jcrop.css v0.9.10 - MIT License */\n\n/*\n The outer-most container in a typical Jcrop instance\n If you are hav"
},
{
"path": "set/Jcrop/demos/crop.php",
"chars": 2575,
"preview": "<?php\n\n/**\n * Jcrop image cropping plugin for jQuery\n * Example cropping script\n * @copyright 2008-2009 Kelly Hallman\n *"
},
{
"path": "set/Jcrop/demos/demo_files/demos.css",
"chars": 2164,
"preview": "/* Jcrop Demo CSS\n * Not required to run Jcrop\n * Just makes the demo pages look less ugly\n */\n\nbody\n{\n margin: 0;\n pa"
},
{
"path": "set/Jcrop/demos/jquery-ui.html",
"chars": 4342,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xm"
},
{
"path": "set/Jcrop/demos/non-image.html",
"chars": 1907,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xm"
},
{
"path": "set/Jcrop/demos/styling.html",
"chars": 3207,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xm"
},
{
"path": "set/Jcrop/demos/tutorial1.html",
"chars": 1382,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xm"
},
{
"path": "set/Jcrop/demos/tutorial2.html",
"chars": 2735,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xm"
},
{
"path": "set/Jcrop/demos/tutorial3.html",
"chars": 2019,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <title></title>\n <meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">"
},
{
"path": "set/Jcrop/demos/tutorial4.html",
"chars": 5611,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xm"
},
{
"path": "set/Jcrop/demos/tutorial5.html",
"chars": 8540,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xm"
},
{
"path": "set/Jcrop/index.html",
"chars": 2167,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xm"
},
{
"path": "set/Jcrop/js/jquery.Jcrop.js",
"chars": 42361,
"preview": "/**\n * jquery.Jcrop.js v0.9.10\n * jQuery Image Cropping Plugin - released under MIT License \n * Author: Kelly Hallman <k"
},
{
"path": "set/Jcrop/js/jquery.color.js",
"chars": 3660,
"preview": "/*\n * jQuery Color Animations\n * Copyright 2007 John Resig\n * Released under the MIT and GPL licenses.\n */\n\n(function(jQ"
},
{
"path": "set/avatar.html",
"chars": 3055,
"preview": "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <title></title>\r\n <meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF"
},
{
"path": "set/css/avatar.css",
"chars": 4138,
"preview": "*{padding:0;margin:0;}\nimg{border:none;}\n.jcrop-holder {direction: ltr;text-align: left;}\n.jcrop-vline,.jcrop-hline{back"
},
{
"path": "set/js/jquery.Jcrop.js",
"chars": 42361,
"preview": "/**\n * jquery.Jcrop.js v0.9.10\n * jQuery Image Cropping Plugin - released under MIT License \n * Author: Kelly Hallman <k"
},
{
"path": "set/uploadify/jquery.uploadify-3.1.js",
"chars": 64268,
"preview": "/*\nSWFObject v2.2 <http://code.google.com/p/swfobject/> \nis released under the MIT License <http://www.opensource.org/li"
}
]
// ... and 3 more files (download for full content)
About this extraction
This page contains the full source code of the Beau-zihan/WebIM GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 66 files (428.7 KB), approximately 121.9k tokens, and a symbol index with 229 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.