// ==UserScript==
// @name 下载一键通
// @author greasepig
// @namespace https://greasyfork.org/users/2620-greasepig
// @description 利用搜狗浏览器“下载一键通”功能的API,自动帮您找到页面中资源的最佳下载地址,让下载更简单!
// @version 1.0.2
// @include http://*
// @run-at document-end
// @grant GM_xmlhttpRequest
// ==/UserScript==
var strDownloadUrl = 'http://extention.ie.sogou.com/se_plugin/download?exp=0';
var downloadUrl = ['item.taobao.com', 'theater.mtime.com', 's.taobao.com', 's.etao.com', 'search.dangdang.com', 'search.jd.com', 'v.youku.com', 'www.yunfan.com', 'read.douban.com', 'movie.douban.com', 'item.jd.com', 'book.douban.com', 'www.sogou.com', 'www.so.com', 'www.google.com.hk', 'www.soso.com', 'cn.bing.com', 'www.yahoo.cn', 'www.youdao.com', 'www.jike.com', 'bbs.gfan.com', 'www.02345.com', 'font.knowsky.com', 'www.rrting.com', 'www.bookben.com', 'www.xdowns.com', 'www.tusuu.com', 'www.books28.com', 'www.52empress.com', 'www.abada.cn', 'bxzw.com', 'www.queentxt.com', 'bt.ktxp.com', 'www.dxsxs.com', 'book.sooyuu.com', 'www.ibook8.com', 'www.txt99.cc', 'www.qisuu.com', 'www.pptbz.com', 'drivers.mydrivers.com', 'download.pchome.net', 'www.3dxia.com', 'xiazai.zol.com.cn', 'www.drvsky.com', 'www.55you.com', 'sj.zol.com.cn', 'www.bzfxw.com', 'www.55x.cn', 'www.upan.cc', 'war3.uuu9.com', 'www.tingroom.com', 'download.enet.com.cn', 'www.sucaitianxia.com', 'www.mfcad.com', 'www.gg1z.com', 'www.booktxt.com', 'www.mt30.com', 'product.it168.com', 'www.xiazaiba.com', 'www.yyets.com', 'www.yxdown.com', 'www.gamersky.com', 'app.hiapk.com', 'www.coolxn.com', 'www.mobanwang.com', 'www.bbdj.com', 'vr.3dxia.com', 'www.ttcnn.com', 'www.txtbook.com.cn', 'desk.zhuoku.com', 'www.yanqing888.net', 'www.feiku.com', 'down.766.com', 'www.feifeishijie.com', 'www.gamehome.tv', 'www.webshu.net', 'www.zhulang.com', 'www.txt66.com', 'www.16kbook.org', 'ie.sogou.com', 'club.topsage.com', 'hkbici.com', 'emuch.net', 'bbs.yzz.cn', 'bbs.eastsea.com.cn', 'bbs.hiapk.com', 'bbs.dospy.com', 'www.cnwav.com', 'bbs.kaoyan.com', 'www.lspjy.com', 'www.tuozhe8.com', 'bbs.qzzn.org', 'www.55188.com', 'bbs.3dmgame.com', 'bbs.anzhi.com', 'bbs.duowan.com', 'bbs.artron.net', 'bbs.yingjiesheng.com', 'bbs.waptw.com', 'game.ali213.net', 'bbs.uggd.com', 'forum.chasedream.com', 'www.btbbt.com', 'www.eeff.net', 'bbs.xiaomi.cn', 'touch99.com', 'bbs.tgbus.com', 'bbs.docin.net', 'bbs.angeeks.com', 'bbs.houdao.com', 'bbs.co188.com', 'bbs.pinggu.org', 'www.h-car.cn', 'productbbs.it168.com', 'www.jczqw.com', 'www.yanqingbbs.com', 'bbs.pcbeta.com', 'www.lianmuba.com', 'bbs.txtbbs.com', 'xy2.netease.com', 'www.sharewithu.com', 'bbs.bt5156.com', 'bbs.xxyw.com', 'bbs.fengbao.com', 'www.52blackberry.com', 'bbs.eduu.com', 'www.comichx.com', 'bbs.lcdhome.net', 'club.excelhome.net', 'www.3dportal.cn', 'bbs.cool-de.com', 'bbs.7xz.com', 'www.7dong.cc', 'www.cskaoyan.com', 'girlbt.com', 'sjbbs.zol.com.cn', 'bbs.tumukeji.com', 'f.mt-bbs.com', 'www.liushishi.cn', 'forum.ccer.edu.cn', 'www.gtn9.com', 'bbs.gter.net', 'www.i52nv.com', 'bbs.winning11cn.com', 'bbs.seu.edu.cn', 'bbs.imobile.com.cn', 'bbs.app111.com', 'bbs.gamersky.com', '27.98.194.236:8988', 'bbs.hdbird.com', 'bbs.uuu9.com', 'xinsheng.huawei.com', 'hd.cnscg.com', 'bbs.subpig.net', 'www.chdtv.net', 'bbs.fwxgx.com', 'bbs.eetop.cn', 'www.toshu.cn', 'www.ilovematlab.cn', 'bbs.meizu.com', 'bbs.3s001.com', 'www.cgmodel.cn', 'www.anzhuo.cn', 'www.shuaigay.org', 'www.iiyi.com', 'www.eeeetop.com', 'bbs.freekaoyan.com', 'www.mythe3.com', 'bbs.redocn.com', 'bbs.chinaqigong.com', 'www.amobbs.com', 'www.int.18p2p.com', 'www.jgzj.net', 'bbs.mumayi.com', 'bbs.tianmu.com', 'bbs.vivo.com.cn', 'bbs.duba.net', 'bbs.21manager.com', 'bbs.muscn.com', 'www.oiegg.com', 'bbs.siluhd.com', 'www.ourob.cn', 'www.fafawang.com', 'samsungbbs.cnmo.com', 'www.qqjinpai.com', 'www.cncad.net', 'forum.6cn.org', 'www.discuz.net', 'bbs.xda.cn', 'www.yqtxt.net', 'bbs.rainmeter.cn', 'www.txtbbs.com', 'www.rapidbbs.cn', 'bbs.koolearn.com', 'a.mt-bbs.com', 'bbs.visionzone.com.cn', 'www.znczz.com', 'www.yyweishi.com', 'www.dell800.com', 'www.shukuai.com', 'www.itpub.net', 'www.dospy.com', 'www.astronomy.com.cn', 'bbs.vsharing.com', 'bbs.taisha.org', 'bbs.dianyuan.com', 'bbs.weiphone.com', 'bbs.game.163.com', 'www.btscg.com', 'www.yeslicake.com', 'www.y4dg.com', 'www.eiafans.com', 'www.3dezu.com', 'cool-de.com', 'bbs.exam8.com', 'www.simcity.cn', 'bbs.eeworld.com.cn', 'bbs.lewaos.com', 'bbs.hxland.com', 'www.mscbsc.com', 'bbs.hupu.com', 'www.mengyemy.com', 'pdawiki.5d6d.net', 'forum.putclub.com', 'products.mobileuncle.com', 'www.lexun.cn', 'bbs.etjy.com', 'bbs.ehvacr.com', 'www.dcjianghu.com', 'bbs.pep.com.cn', 'bbs.mfunz.com', 'bbs.kafan.cn', 'sebbs.it168.com', 'bbs.66xue.com', 'www.xin9yang.com', 'www.swotbbs.com', 'bbs.smmail.cn', 'bbs.btmyth.com', 'www.eastedu.org', 'www.gtabbs.com', 'bbs.lidroid.com', 'bbs.eyuyan.com', 'bbs.178.com', 'www.jiane86.com', 'www.eeban.com', 'bbs.ngacn.cc', 'www.suppig.net', 'bbs.21mould.net', 'www.wuxinren.net', 'dell.benyouhui.it168.com', 'bbs.xuekuaiji.com', 'bbs.byr.cn', 'bbs.ptbus.com', 'bbs.189store.com', 'bbs.baballs.com', 'bbs.hrloo.com', 'bbs.comicdd.com', 'www.fqai.info', 'bbs.mscbsc.com', 'forum.simwe.com', 'rutracker.org', 'www.63jiuye.com', 'okok.org', 'android.zone.it.sohu.com', 'www.yantubbs.com', 'www.veryxe.com', 'bbs.jumpcn.com', 'www.1zhao.org', 'bbs.startos.com', 'bbs.233.com', 'bbs.14wx.com', 'www.sketchupbar.com', 'www.52qwbl.com', 'www.61ic.com', 'home.feifeishijie.com', 'www.world3dmodel.com', 'www.96bbs.com', 'bbs.rxjhbaby.com', 'forum.int.18p2p.com', 'bbs.hh010.com', 'bbs.asuro.cn', 'a.it168.com', 'www.gongkong365.com', 'bbs.nydyw.com', 'www.173520.com', 'bbs.sept5.com', 'bbs.maxpda.com', 'www.htcbbs.net', 'www.92dpw.com', 'www.4u88.com', 'bbs.shendu.com', 'bbs.hxsd.com', '184.164.149.202', 'ibbs.91.com', 'i.mt-bbs.com', 'bbs.jianshe99.com', 'bbs.fhsx.cn', 'bbs.area-11.com', 'bbs.anjian.com', 'www.zhanyou365.com', 'www.pooban.com', 'www.jadepot.com.cn', 'www.clinphar.cn', 'bbs.shuame.com', 'bbs.cnliti.com', 'dong.za.net', 'bbs.gudi8899.com', 'bbs.geonet.cn', 'bbs.xxsx.cn', 'bbs.ku-yu.com', 'bbs.caup.net', 'www.cngba.com', 'www.ceet.hbnu.edu.cn', 'bbs.yleco.com', 'bbs.dongao.com', 'bbs.1x.la', 'www.cgbolo.com', 'bbs.shouji.com.cn', 'bbs.jjxj.org', 'www.koodj.com', 'hometown.scau.edu.cn', 'bbs1.gamersky.com', 'bbs.lephone.cc', 'bbs.17173.com', 'bbsbt.cupl.edu.cn', 'bbs.uc.cn', 'www.eechina.com', 'www.diypda.com', 'www.52pojie.cn', 'www.2wedm.cn', 'bbs.tranbbs.com', 'bbs.elecfans.com', 'www.ylstudy.com', 'www.tichinese.com', 'www.ca001.com', 'bbs.foodmate.net', 'bbs.bianzhirensheng.com', 'www.luz-image.com', 'bbs.popiano.org', 'bbs.pcgames.com.cn', 'bbs.c114.net', 'bbs.21ic.com', 'www.touhangbbs.cn', 'www.hi-pda.com', 'www.ehafo.com', 'www.jiazhang100.com', 'bbsdown2.zhulong.com', 'bbs.pediy.com', 'www.ooomm.com', 'www.flypt.org', 'qianfan.net', 'bbs.to8to.com', 'bbs.keniu.com', 'www.55top.com', 'selang.ca', 'learn.tsinghua.edu.cn', 'home.xdf.cn', 'www.yelanhua.com', 'www.wctxt.com', 'www.actionforjoongi.com', 'www.abbs.com.cn', 'www.592zn.com', 'tx3.netease.com', 'bbs.sciencenet.cn', 'www.playgm.cn', 'www.pgos.cc', 'www.madio.net', 'www.eeboard.com', 'bbs.rfeda.cn', 'bbs.gaoqing.tv', 'bbs.bbioo.com', 'www.mt-bbs.com', 'www.1xbbs.com', 'sns.byr.edu.cn', 'cs.voc.com.cn', 'bbs.wuyou.com', 'bbs.sdatc.com', 'bbs.ruoren.com', 'bbs.cnii.com.cn', 'www.ptianx.com', 'www.in189.com', 'www.cnxmbbs.com', 'www.2px.com', 'bbs.shejiqun.com', 'xyq.netease.com', 'www.otomedream.com', 'www.661yx.com', 'bbs.macd.cn', 'bbs.chizhouren.com', 'bbs.cfaspace.com', 'bbs.51cto.com', 'apple.zone.it.sohu.com', 'www.iopq.com', 'www.5isotoi5.org', 'forum.xda-developers.com', 'bbs.pcpop.com', 'bbs.51testing.com', 'bbs.25pp.com', 'www.xmtxt.com', 'www.war33.com', 'forum.er07.com', 'down.bbs156.cn', 'bbs.zoopda.com', 'bbs.waapk.com', 'www.balang88.cn', 'www.9mcu.com', 'lt.imobile.com.cn', 'hkbc.net', 'bbs.zhulong.com', 'bbs.pingshu8.com', 'bbs.malshenzu.com', 'bbs.lenovomobile.com', 'bbs.exrpg.com', 'www.yuesha.com', 'www.treo8.com', 'www.soudoc.com', 'www.hjdwx.com', 'club.offcn.com', 'bbs.jooyoo.net', 'bbs.guitarchina.com', 'bbs.godeyes.cn', 'bbs.bjx.com.cn', 'www.fengshui-168.com', 'www.bdpt.net', 'mgs.homeinns.com', 'bbs.verypsp.com', 'bbs.game798.com', 'bbs.ezacg.com', 'bbs.chinadjba.com', 'www.yycaf.net', 'www.rr-sc.com', 'www.fingerstylechina.com', 'www.chinazhw.com', 'bbs.zhibo8.cc', 'bbs.yxcax.com', 'www.xtzj.com', 'www.uwants.com', 'www.skwl.org', 'www.lanselm.com', 'www.cryxw.com', 'www.chinacitywater.org', 'res.pk.njau.edu.cn', 'forum.anywlan.com', 'club.kuaijiren.com', 'bbs.ourtw.com', 'bbs.leshe.net', 'bbs.huacolor.com', 'www.souso.org', 'www.eda365.com', 'www.cscecqd.com.cn', 'dou.tgbus.com', 'bbs.huain.com', 'bbs.bhgbox.org', '3g.lenovo.com', 'www.htfcn.com', 'www.fevernet.com', 'www.deyi.com', 'www.bbs.kljiyou.com', 'bbs.mumayi.net', 'bbs.hshylover.com', 'bbs.guanjia.qq.com', 'www.sis.xxx', 'www.rhammer.cn', 'www.gpshk.cc', 'www.anzhuo365.com', 'www.abcug.com', 'bbs.52miji.com', '2012jm.5d6d.net', 'www.gobbs.com.cn', 'www.eshuzone.cn', 'www.bdwm.net', 'bbs.xypie.com', 'bbs.jianzhuren.com', 'bbs.3996.com', 'xixian24.com', 'www.ou99.com', 'www.jd-bbs.com', 'www.gongbi.net', 'www.blue08.cn', 'www.52zhitan.cn', 'www.009y.com', 'tuan.sis001.us', 'bbs.silverlightchina.net', 'bbs.hr369.com', 'bbs.gsdzone.net', 'bbs.e10000.cn', 'bbs.bojistudio.org', 'youth.njust.edu.cn', 'www.v6dp.com', 'www.umdbbs.com', 'www.51yam.com', 'www.1huisuo.com', 'diybbs.zol.com.cn', 'bbs.zhangku.com', 'bbs.sunwy.org', 'bbs.heiguang.com', 'bbs.h5gal.cc', 'bbs.chdxc.net', 'bbs.131.com', 'bangpai.taobao.com', 'www.hunterbase.com', 'www.eefocus.com', 'www.chnmining.com', 'www.bnb520.com', 'v6.oiegg.com', 'mimip2p.net', 'hanmi.cc', 'forum.joyiphone.net', 'bbs.helloba.com', 'bbs.goodlift.net', 'bbs.cndzq.com', 'www.zycg.gov.cn', 'www.yingzheng.com', 'www.txrjy.com', 'www.lightnovel.cn', 'www.gthcs.cn', 'bbs.stuhome.net', 'bbs.abd.cn', 'www.zeromoot.org', 'www.sunpetro.cn', 'www.excelpx.com', 'www.eoeandroid.com', 'www.chinafix.com.cn', 'www.bbs.55sf.net', 'bbs.neoimaging.cn', 'bbs.hfut.edu.cn', 'bbs.blueshow.net', 'bbs.52print.com', 'archive.hxsd.com', 'www.wpxap.com', 'www.ukulelecn.com', 'www.tiantangbbs.com', 'www.taisha.org', 'www.mysipo.com', 'www.lanxixiaowu.com', 'www.fashuounion.com', 'www.ccwzz.cc', 'www.9bt.org', 'jue-ce.com', 'bbs.spoto.net', 'bbs.pku.edu.cn', 'bbs.jingxing.net', 'bbs.fsxcn.com.cn', 'bbs.cupl.edu.cn', 'bbs.a9vg.com', 'bbs.01w.com', 'www.handsurgery.cn', 'www.banjiajia.com', 'www.anyeah.net', 'www.258ch.com', 'pk.netease.com', 'bbs.plu.cn', 'bbs.o.cn', 'bbs.mhzx2.wanmei.com', 'bbs.dedecms.com', 'bbs.astsh.com', 'bbs.51touch.com', '50.117.115.218', '3dgundam.com', 'www.yizhubbs.com.cn', 'www.yewuyuan.com', 'www.tysxy.com', 'www.matlabsky.com', 'www.fpgaw.com', 'www.coolxap.com', 'www.cgebook.com', 'www.canton8.com', 'sydj24.china.cn', 'moto.it168.com', 'm109.mail.qq.com', 'lkbbs.mba.org.cn', 'htcbbs.cnmo.com', 'bbs.somdom.com', 'bbs.guqu.net', 'www.stmcu.org', 'www.muzhiwan.com', 'www.hellodsp.com', 'www.freehead.com', 'www.chuisax.com', 'www.apkbus.com', 'ttdb.51wball.com', 'lol.gamebbs.qq.com', 'bt.jnrain.com', 'bbs.wps.cn', 'bbs.qibosoft.com', 'bbs.luren.cc', 'bbs.kuaibo.com', 'bbs.hyycn.com', 'bbs.hui100.com', 'bbs.gpsuu.com', 'bbs.eol.cn', 'bbs.cnpou.com', 'bbs.chinaunix.net', 'www.zyqj.net', 'www.wxr.cc', 'www.unionfacade.com', 'www.swothouse.com', 'www.mcbbs.net', 'www.hslq.cn', 'www.hn2525.com', 'www.hdcdape.com', 'www.cgpainter.com', 'www.bb06.com', 'www.baoxianwangluo.com', 'bbs.tumuzhe.com', 'bbs.phpcms.cn', 'bbs.mountblade.com.cn', 'bbs.imp3.net', 'bbs.hcbbs.com', 'bbs.cnmo.com', 'bbs.apkok.com', 'bbs.55you.com', 'www.wxg.cc', 'www.wq52.com', 'www.weshareedu.com', 'www.tingtaoge.com', 'www.szshbs.com', 'www.petroren.com', 'www.missyuan.com', 'www.leawo.cn', 'www.hiphopzg.com', 'www.bridgehead.com.cn', 'www.aetalk.cn', 'tmpdl.xiaoma.com', 'lt.cjdby.net', 'ilearn.miis.edu', 'from2005.com', 'benyouhui.it168.com', 'bbs.suning.com', 'bbs.riffbox.cn', 'bbs.kukao.org', 'bbs.gwlong.info', 'bbs.caroledu.com', 'yyhero18net.com', 'xy3.netease.com', 'www.zby.in', 'www.yaoq.net', 'www.ddqcw.com', 'www.cnbpn.com', 'forum.zichen.com', 'bbs.xiaoma.com', 'bbs.tigtag.com', 'bbs.smthome.net', 'bbs.shgzs.com', 'bbs.ruideppt.com', 'bbs.photops.com', 'bbs.nowxue.com', 'bbs.moyiza.com', 'bbs.jcwcn.com', 'bbs.ithome.com', 'bbs.icpcw.com', 'bbs.icafe8.com', 'bbs.gemeitech.com', 'bbs.ednchina.com', 'bbs.chinaacc.com', 'www.zgwxbbs.com', 'www.xbox-skyer.com', 'www.nnsikao.com', 'www.newsmth.net', 'www.mysilu.com', 'www.meisitt.com', 'www.lzllbbs.com', 'www.kuwoziliao.cn', 'www.bjaoxiao.com', 'www.5dfly.cn', 'vip.gwgz.com', 'mx.bbs.duoyi.com', 'killman.net', 'forum.bebeyond.com', 'bbs.tongbu.com', 'bbs.fishc.com', 'bbs.dianjian.net', '67.220.90.30', '67.220.91.30', 'bbs.myhd1080.com', 'www.setianshi.org', 'cnbbs8.net', 'ww.1huisuo.com', '67.220.90.15', 'sis001.us', '67.220.92.11', 'www.selang.ca', 'bbs.21dianyuan.com', 'www.huanlefuqi.com', '38.103.161.187', '68.168.16.151', '64.78.167.62', 'w.sis001.us', '68.168.16.155', '1.ca.wo.tc', '68.168.16.153', '18p2p.com', '1huisuo.com', 'www.sis001.us', 'www.mulange.cn', 'www.yese22.com', '67.220.92.017', '9.8xbbs.com', '67.220.91.2', '64.62.209.30', 'www.jiepaisw.com', 'www.btchina.info', '67.220.91.20', '64.78.167.63', 'down.tech.sina.com.cn', 'www.52z.com', 'www.7edown.com', 'www.arpun.com', 'www.3987.com', 'www.bkill.com', 'www.cncrk.com', 'www.cngr.cn', 'www.cr173.com', 'www.ddooo.com', 'www.downxia.com', 'www.downbank.cn', 'www.greenxf.com', 'www.huacolor.com', 'www.jz5u.com', 'www.liqucn.com', 'www.orsoon.com', 'www.pc6.com', 'www.piaodown.com', 'www.qqtn.com', 'www.uzzf.com', 'www.ttzw.com', 'wenwen.soso.com', 'iask.sina.com.cn', 'ishare.iask.sina.com.cn', 'download.csdn.net', 'www.yuncheng.com', '', 'www.baidu.com', 'www.23us.com', 'www.luoqiu.com', 'www.yzuu.com', 'www.epzw.com', 'www.dajiadu.net', 'book.zhulang.com', 'b.faloo.com', 'www.readnovel.com', 'soudu.org', 'read.shanwen.com', 'www.shushuw.cn', 'www.binhuo.com', 'baishulou.com', 'www.123du.net', 'www.33xs.com', 'www.myshulou.com', 'www.69zw.com', 'www.xiaoshuozhe.com', 'www.xunshu.org', 'www.77shu.com', 'www.xiazailou.com', 'www.kenwen.com', 'www.docin.net', 'www.5wei8.com', 'www.shanwen.com', 'www.yanmoxuan.org', 'www.junshishu.com', 'zhidao.baidu.com', 'jingyan.baidu.com', 'baike.baidu.com'];
var style = '<style>#onekey_download { position: fixed; width: 500px; background-color: #f5f6f7; border: 1px solid #adb1bb; color: #5a5f65; z-index: 1000; } #onekey_download span { height: 22px; display: inline-block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } #onekey_info { width: 480px; height: 22px; padding: 5px 10px; font-size: 14px; line-height: 22px; overflow: hidden; } #onekey_info_file, #onekey_info_count { max-width: 150px; padding: 0 5px; font-weight: 700; color: #8EBD27; } #onekey_download i, #onekey_close, #onekey_switch { height: 22px; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAABYCAYAAABbJcGbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpDQTNGRTA5ODdERTRFMzExODE1QkNDNUYyNEZFMjM1NiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo3QUREMDQzNkU0N0YxMUUzOTlFQkQ5MTY4QTA0RjVFNiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo3QUREMDQzNUU0N0YxMUUzOTlFQkQ5MTY4QTA0RjVFNiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkNEM0ZFMDk4N0RFNEUzMTE4MTVCQ0M1RjI0RkUyMzU2IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkNBM0ZFMDk4N0RFNEUzMTE4MTVCQ0M1RjI0RkUyMzU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+hBnYEwAAA3JJREFUeNrsm79rFEEUx3f3YkCx8KLpLA4RjI2ohTZaeP4LVkHBxuLEX1dopf+AgkEErwkiRLCxyR/gWdhbpDGFhMNazkY4UHF9c9kL49zc7Lw3u+d5+30wzGZ2ZjP7mffmvZ2XxGmaRhC+JEAAcAD3P8jCWnflA9UXBGO77eb25cpqXBLXzogGxrXzFTfVOJYNlY6bE1O1I0l+XTn96t7R+rn+ztf3y5tbrWfY1XzARckPgvaSLgfHjlw6SDXAMbzqIKu/AxPCkbJMNf7dbn66Shc/9VYKO1ZVvdY9+TqKUsAe17g0obhOhRlvjX5vqP0ioLmdw12CVCMtu72rZSs1qtapXAeuHK9KcisD9pDKcyqrQOUHTkkrKxB41QLB7d936Itk4IHFwztVBhfjBBimCnAAB3AQgAM4gAM4gIPwwPV6vRdUUlWbHV33oHFR1Pq49XlY64Cy6717wDZ+rNQ5e+r4EJCqCdhfQKlt2AfYLB/5unZloCIdWqPRuAlsE05HDNMENHjVEsGZpqqKzWEAnHt/62QOA/Bce5yK02yOwARK7TE0bjwcGXME2XUH4UiOV4XAqwIcwAEcwEEEov7PYZHqJ1TUHxQuAYlTvlHZoHJfHSs9pnIHTLyknrEaKFO9Bh5suZHAPEWyBOcwTa/abm6L+5U11ve5hXlVySDyxMOJqlqfuP6z+VKT7rleetI4V3/bXLnPds2VBc53or6/1Ow7qm3jbW0hLyxdfBE418N9V06HPLqeBCpPW3xNOQ+CDo8LfqEM+zchcVZV1z7fxZRonEvz/hm40WR8Vl2yuRexx3H7BIPjqneeSZnP8QFu0+CQ/WomP/LV5PVitpkgOC9rWwBfaBytLQycdF/geltuP868dNASLU0kL6abR5GBZ0jooZu475y4WhoUx9nMyjeEyHu+b7Cb51E5zklqPfHTdyeQ5ppF5wBwkDFwfWBgS1+B2wAHtqwrr/pAOYlo9wi9DiZOGSVrHul7HLwr81sVWS5/QZYrUJDlEgqyXFMNgJHlqnCWizM/Mbh5zHKZ40o5VprXLJe5eIWnB0P2wFnNcoWeIFc2y8VtDwaHLFeJGsc1qUnH3hzNC8nKSyBXNstl09hSwc1TlsvmVUuL4+YlyxWqschyTfNbFQJwQeCQ5eILslxCQZaLKXtZrj8CDAA74cNDYXS0SAAAAABJRU5ErkJggg==") no-repeat 0 0; } #onekey_close { width: 16px; float: right; background-position: 0 -22px; } #onekey_switch { width: 78px; float: right; margin-right: 10px; background-position: 0 -44px; } #onekey_switch.expand { background-position: 0 -66px; } #onekey_download i { display: inline-block; float: left; width: 22px; } #onekey_file_list { display: none; padding: 0 10px; border-top: 1px solid #adb1bb; font-size: 12px; } #onekey_file_list .onekey_file { height: 22px; padding: 10px 0; border-bottom: 1px solid #dfdfdf; line-height: 22px; overflow: hidden; } #onekey_file_list .onekey_file a { float: right; text-decoration: none; color: #5a5f65; } #onekey_file_list .onekey_file span { width: 420px; }</style>';
var html = '<div id="onekey_download"><div id="onekey_info"><a href="javascript:void(0)" id="onekey_close"></a><a href="javascript:void(0)" id="onekey_switch"></a><i></i><span>当前页有</span><span id="onekey_info_file"></span><span>等</span><span id="onekey_info_count"></span><span>个资源可下载</span></div><div id="onekey_file_list"></div></div>';
var ids = ['onekey_download', 'onekey_info_file', 'onekey_info_count', 'onekey_file_list', 'onekey_switch', 'onekey_close'];
function initHTML() {
var div = document.createElement('div');
div.innerHTML = style + html;
document.body.appendChild(div);
for (i in ids) {
window[ids[i]] = document.getElementById(ids[i]);
}
}
function showDownloadDiaolog(files) {
initHTML();
var cw = document.compatMode == "CSS1Compat" ? document.documentElement.clientWidth : document.body.clientWidth;
onekey_download.style.left = (cw - 502) / 2 + 'px';
onekey_download.style.top = '5px';
onekey_info_file.textContent = files[0].filename;
onekey_info_count.textContent = files.length;
for (var i = 0; i < files.length; i++) {
var file = document.createElement('div');
file.className = 'onekey_file';
file.innerHTML = '<a href="' + files[i].url + '"><i></i>下载</a><span>' + files[i].filename + '</span>';
onekey_file_list.appendChild(file);
}
onekey_switch.addEventListener('click', function(e){
if (this.className == 'expand') {
onekey_file_list.style.display = 'none';
this.className = '';
} else {
onekey_file_list.style.display = 'block';
this.className = 'expand';
}
});
onekey_close.addEventListener('click', function(e){
onekey_download.style.display = 'none';
});
}
if (downloadUrl.indexOf(location.host) >= 0) {
GM_xmlhttpRequest({
method: 'GET',
url: strDownloadUrl,
headers: {'content-extra': 'refer=' + location.href},
onload: function (res) {
var files = JSON.parse(res.responseText);
if (files.length > 0) showDownloadDiaolog(files);
}
});
}