购物比价的扩展和脚本找了很多,要不是对比结果不及时,数据滞后,要不是有后门,后台修改链接,经过推广网站赚钱。
虽然chrome的有道购物助手扩展代码是远程的,存在隐患,但目前试用来说,数据准确性比较高,且没有做什么手脚,因此一直在用。
无奈chrome的扩展太耗内存,且部分功能感觉作用不大,而查看扩展的代码,也就是调用了一下远程的js代码,于是上网查了一下,在userscript找到一个脚本“youdaoGWZS”,就是脚本版的有道购物助手,看来有同样需求的人还是有的,不过这个脚本是给firefox用的,chrome下有问题,问题下面说。
试用了一下,感觉有几点问题,问题如下:
1)由于使用了GM_getValue/setValue函数,chrome无法支持配置的保存和提取,导致chrome每次刷新都会弹出优惠提示框,很影响使用;
2)部分网站采用了iframe方式布局,脚本中未处理,导致iframe中也会弹出有道购物助手,页面混乱;
3)采用了setInterval来循环获取配置字符串,其实可以简单的初始化一下,然后通过addEventListener来自动更新配置字符串。
于是本着自己方便,做了一下修改,目前chrome下使用正常,代码如下:
// ==UserScript==
// @name youdao zhushou
// @description 有道购物助手
// @update 2012-2-1
// @create 2012-2-1
// @version 0.0.1
// @author lemonbox
// @namespace youdao
// @include http://product.yesky.com/product/*/*/price.shtml
// @include http://*.dangdang.com/*
// @include http://*.amazon.cn/*
// @include http://*.139shop.com/*
// @include http://*.taobao.com/*
// @include http://*.ouku.com/*
// @include http://*.china-pub.com/*
// @include http://*.rayi.cn/*
// @include http://*.no5.com.cn/*
// @include http://*.360buy.com/*
// @include http://*.18900.com/*
// @include http://*.wl.cn/*
// @include http://*.80ebus.com/*
// @include http://*.bearbuy.com.cn/*
// @include http://*.enet.com.cn/*
// @include http://*.958shop.com/*
// @include http://*.51youpin.com/*
// @include http://*.panasonic.cn/*
// @include http://*.sport2008.com.cn/*
// @include http://*.mpshow.com.cn/*
// @include http://*.e800.com.cn/*
// @include http://*.sanfo.com/*
// @include http://*.yide.com/*
// @include http://*.yasai.cn/*
// @include http://*.dixintong.com/*
// @include http://*.ouyea.com/*
// @include http://*.afffff.com/*
// @include http://*.yaja.com.cn/*
// @include http://*.bookschina.com/*
// @include http://*.chengdecs.com/*
// @include http://*.nokia.com.cn/*
// @include http://*.lijiababy.com.cn/*
// @include http://*.aiyingshi.com/*
// @include http://*.99read.com/*
// @include http://*.8264.com/*
// @include http://*.d1.com.cn/*
// @include http://*.redbaby.com.cn/*
// @include http://*.goodjd.com/*
// @include http://*.motostore.com.cn/*
// @include http://*.leyou.com/*
// @include http://*.benq.com.cn/*
// @include http://*.clady.com/*
// @include http://*.7shop24.com/*
// @include http://*.ehaier.com/*
// @include http://*.guopi.com/*
// @include http://*.lenovo.com.cn/*
// @include http://*.51dg.com/*
// @include http://*.cnave.com/*
// @include http://*.cosme-de.com/*
// @include http://*.sasa.com/*
// @include http://*.qinqinbaby.com/*
// @include http://*.olympus.com.cn/*
// @include http://*.strawberrynet.com/*
// @include http://*.bobomobi.com/*
// @include http://*.39ty.com/*
// @include http://*.133china.com/*
// @include http://*.hopebook.net/*
// @include http://*.the365.com/*
// @include http://*.beifabook.com/*
// @include http://*.timesinfor.com/*
// @include http://*.ofcard.com/*
// @include http://*.cncard.com/*
// @include http://*.zgcbb.com/*
// @include http://*.yongle.com.cn/*
// @include http://*.2688.com/*
// @include http://*.e-lining.com/*
// @include http://*.shishang.com.cn/*
// @include http://*.m18.com/*
// @include http://*.dayoo.com/*
// @include http://*.redmall.com.cn/*
// @include http://*.vafox.com/*
// @include http://*.532shop.com/*
// @include http://*.olymsports.com/*
// @include http://*.uiyi.cn/*
// @include http://*.it88.com.cn/*
// @include http://*.letao.com/*
// @include http://*.ourtasty.com/*
// @include http://*.sssy.com.cn/*
// @include http://*.likebuy.com/*
// @include http://*.shoubiao.com.cn/*
// @include http://*.77toy.com/*
// @include http://*.icson.com/*
// @include http://*.xindou.com/*
// @include http://*.yumaoclub.com/*
// @include http://*.aiju.com/*
// @include http://*.lanjiahuo.com/*
// @include http://*.yihaodian.com/*
// @include http://*.ejia.com/*
// @include http://*.5366.com/*
// @include http://*.jsbcmall.com/*
// @include http://*.milimall.com/*
// @include http://*.togj.com/*
// @include http://*.yoyo18.com/*
// @include http://*.buy007.com/*
// @include http://*.taoxie.cn/*
// @include http://*.xiaolaoren.com/*
// @include http://*.jiyi.asia/*
// @include http://*.shentop.com/*
// @include http://*.yuego.com/*
// @include http://*.258sd.com/*
// @include http://*.akimimi.com/*
// @include http://*.augshow.com/*
// @include http://*.obuy.cn/*
// @include http://*.sasacity.com/*
// @include http://*.woye.com/*
// @include http://*.wow-diamond.com.cn/*
// @include http://*.xiaozhuren.com/*
// @include http://*.egobuy.com/*
// @include http://*.shaobag.com/*
// @include http://*.hit168.com.cn/*
// @include http://*.uushouji.com/*
// @include http://*.168dg.com/*
// @include http://*.locknlock.com.cn/*
// @include http://*.gzbookcenter.com/*
// @include http://*.naccoo.com/*
// @include http://*.yoger.com.cn/*
// @include http://*.bbesports.com/*
// @include http://*.newegg.com.cn/*
// @include http://*.dconline.com.cn/*
// @include http://*.mbaobao.com/*
// @include http://*.yyosso.com/*
// @include http://*.ogage.cn/*
// @include http://*.justonline.cn/*
// @include http://*.cosize.com/*
// @include http://*.yangsam.com/*
// @include http://*.okaybuy.com.cn/*
// @include http://*.happigo.com/*
// @include http://*.menglu.com/*
// @include http://*.shishangqiyi.com/*
// @include http://*.vancl.com/*
// @include http://*.olomo.com/*
// @include http://*.masamaso.com/*
// @include http://*.hakunamatata.cn/*
// @include http://*.100fo.com/*
// @include http://*.yifu.com/*
// @include http://*.zopo.com/*
// @include http://*.shift6-6.com/*
// @include http://*.ishop.cn/*
// @include http://*.u1382.com/*
// @include http://*.yeeson.com/*
// @include http://*.vaakav.com/*
// @include http://*.hany.cn/*
// @include http://*.carrefour.com.cn/*
// @include http://*.3suisses.com.cn/*
// @include http://*.cdream.com/*
// @include http://*.yaofang.cn/*
// @include http://*.jxdyf.com/*
// @include http://*.youjk.com/*
// @include http://*.baiyjk.com/*
// @include http://*.sinobuy.cn/*
// @include http://*.daoyao.com/*
// @include http://*.511yd.com/*
// @include http://*.51yao.com.cn/*
// @include http://*.xtpo.cn/*
// @include http://*.okbig.com/*
// @include http://*.tztart.com/*
// @include http://*.mamahao.cn/*
// @include http://*.dongdianwang.com/*
// @include http://*.shihui.tv/*
// @include http://*.yoho.cn/*
// @include http://*.goonow.com/*
// @include http://*.100god.com/*
// @include http://*.caistv.com/*
// @include http://*.mmgw.cn/*
// @include http://*.365.com/*
// @include http://*.newgo5.com/*
// @include http://*.yeecare.com/*
// @include http://*.qissun.com/*
// @include http://*.ideemall.com/*
// @include http://*.96128.com/*
// @include http://*.eboxbuy.com/*
// @include http://*.wanew.com/*
// @include http://*.1j.cn/*
// @include http://*.mooiee.com/*
// @include http://*.wooha.com/*
// @include http://*.jtlhome.com/*
// @include http://*.kela.cn/*
// @include http://*.maichawang.com/*
// @include http://*.wangshanghai.com/*
// @include http://*.xiadingdan.com/*
// @include http://*.cansibei.cn/*
// @include http://*.joyran.com/*
// @include http://*.topshoes.cn/*
// @include http://*.bbn.com.cn/*
// @include http://*.huachu.com.cn/*
// @include http://*.fim.com.cn/*
// @include http://*.tinies.cn/*
// @include http://*.maywon.com/*
// @include http://*.venusveil.com/*
// @include http://*.ushan.cn/*
// @include http://*.daisonghua.com/*
// @include http://*.oyego.com/*
// @include http://*.laeibelle.com/*
// @include http://*.maimaike.cn/*
// @include http://*.chn81.com/*
// @include http://*.qingci.com/*
// @include http://*.huimeifang.cn/*
// @include http://*.baandma.com/*
// @include http://*.guobuy.com/*
// @include http://*.114x315.com/*
// @include http://*.cnfse.com/*
// @include http://*.chinayrs.com/*
// @include http://*.sun521.com/*
// @include http://*.moonbasa.com/*
// @include http://*.disiqu.cn/*
// @include http://*.mmuses.com/*
// @include http://*.xiezi.com/*
// @include http://*.boqii.com/*
// @include http://*.zbird.com/*
// @include http://*.acosme.com/*
// @include http://*.yiditu.com/*
// @include http://*.51eng.com/*
// @include http://*.ecosme.cn/*
// @include http://*.mamamei.com/*
// @include http://*.ejaja.cn/*
// @include http://*.yesfashion.cn/*
// @include http://*.4inlook.com/*
// @include http://*.lens2005.com/*
// @include http://*.e-giordano.com/*
// @include http://*.jshoppers.com/*
// @include http://*.icaifeng.com/*
// @include http://*.lamiu.com/*
// @include http://*.pb89.com/*
// @include http://*.conslive.com/*
// @include http://*.colebuy.com/*
// @include http://*.jomo.cc/*
// @include http://*.pirateship.com.cn/*
// @include http://*.flowercn.com/*
// @include http://*.chedangjia.com/*
// @include http://*.goyahome.com/*
// @include http://*.car6688.com/*
// @include http://*.04919.com/*
// @include http://*.01goo.com/*
// @include http://*.aim36.com/*
// @include http://*.imeelee.com/*
// @include http://*.inoble.com.cn/*
// @include http://*.hw2008.cn/*
// @include http://*.7sev.com/*
// @include http://*.sz-esun.com/*
// @include http://*.jew-online.com/*
// @include http://*.22shop.com/*
// @include http://*.palcent.com/*
// @include http://*.jinbaidu.com/*
// @include http://*.chashu.cn/*
// @include http://*.lili.hk/*
// @include http://*.ku56.net/*
// @include http://*.carpee.com/*
// @include http://*.lianhua360.com/*
// @include http://*.godida.com/*
// @include http://*.flowerby.com/*
// @include http://*.buy361.cn/*
// @include http://*.bonglett.cn/*
// @include http://*.all3c.com/*
// @include http://*.china-gift.com/*
// @include http://*.vipshop.com/*
// @include http://*.tian10.com/*
// @include http://*.maiaa.com/*
// @include http://*.ugou.cn/*
// @include http://*.wg365.com/*
// @include http://*.pgbao.com/*
// @include http://*.1gou.com/*
// @include http://*.sinow.com.cn/*
// @include http://*.doulaimai.com/*
// @include http://*.95mobi.com/*
// @include http://*.2bao.com/*
// @include http://*.5188bag.com/*
// @include http://*.goshishang.com/*
// @include http://*.baby2688.com/*
// @include http://*.paikepen.com/*
// @include http://*.minibuy.com/*
// @include http://*.9you.com/*
// @include http://*.xzuan.com/*
// @include http://*.sawbuy.com/*
// @include http://*.51mob.com.cn/*
// @include http://*.ladypk.com/*
// @include http://*.okddy.com/*
// @include http://*.6688.com/*
// @include http://*.jinjichina.com/*
// @include http://*.bazha.com.cn/*
// @include http://*.shjdq.com/*
// @include http://*.bloves.com/*
// @include http://*.homeold.cn/*
// @include http://*.loscent.com.cn/*
// @include http://*.ttago.com/*
// @include http://*.qudong365.com/*
// @include http://*.lehetimes.com/*
// @include http://*.wumeiwang.com/*
// @include http://*.jiaoyitong.com.cn/*
// @include http://*.gouwulian.com/*
// @include http://*.le978.cn/*
// @include http://*.7caihua.com/*
// @include http://*.piaoliang100.com/*
// @include http://*.xuandoo.com/*
// @include http://*.jiajiajk.com/*
// @include http://*.igobb.com/*
// @include http://*.cw100.com/*
// @include http://*.8mmo.com/*
// @include http://*.tiexue.net/*
// @include http://*.yjcs.cn/*
// @include http://*.ono.com.cn/*
// @include http://*.office.cn/*
// @include http://*.kidslandshop.com/*
// @include http://*.dianpu.com/*
// @include http://*.ledaojia.com/*
// @include http://*.itzm.com/*
// @include http://*.6root.com/*
// @include http://*.petyoo.com/*
// @include http://*.dalanzhu.com/*
// @include http://*.cobuy.com.cn/*
// @include http://*.lugo365.com/*
// @include http://*.ideaco.cn/*
// @include http://*.xiaokang.com/*
// @include http://*.leftlady.com/*
// @include http://*.trackman.cn/*
// @include http://*.91pretty.com/*
// @include http://*.gouduo.com/*
// @include http://*.thinkshop.cn/*
// @include http://*.pcarm.com/*
// @include http://*.salala.com.cn/*
// @include http://*.168flower.com/*
// @include http://*.toys365.com/*
// @include http://*.liyi99.com/*
// @include http://*.58hua.com/*
// @include http://*.iloveyou.com.cn/*
// @include http://*.7cv.com/*
// @include http://*.jiayougo.com/*
// @include http://*.carsfun.com/*
// @include http://*.autosup.com/*
// @include http://*.jumbomart.cn/*
// @include http://*.xdloutdoor.com/*
// @include http://*.5paipai.com/*
// @include http://*.shanghai-sports.com/*
// @include http://*.dayslove.com/*
// @include http://*.biaoshang.hk/*
// @include http://*.kadang.com/*
// @include http://*.veedl.com/*
// @include http://*.momoyoyo.com/*
// @include http://*.upin365.com/*
// @include http://*.maxfunbuy.com/*
// @include http://*.qianxun.com/*
// @include http://*.ihush.com/*
// @include http://*.apabi.com/*
// @include http://*.520eye.com/*
// @include http://*.quwan.com/*
// @include http://*.haotehao.com/*
// @include http://*.car339.com.cn/*
// @include http://*.8801.net/*
// @include http://*.4007000512.com/*
// @include http://*.18to82.com/*
// @include http://*.dtoto.com/*
// @include http://*.juqile.cn/*
// @include http://*.yesmywine.com/*
// @include http://*.best1.com/*
// @include http://*.vegoos.com/*
// @include http://*.5lux.com/*
// @include http://*.lovswan.com/*
// @include http://*.skcoo.com/*
// @include http://*.51y2.com/*
// @include http://*.wtaotao.com/*
// @include http://*.lijigou.com/*
// @include http://*.021kaoshi.com/*
// @include http://*.942radio.com/*
// @include http://*.epetbar.com/*
// @include http://*.u88go.com/*
// @include http://*.lengta.com/*
// @include http://*.hoba.com.cn/*
// @include http://*.luckigo.com/*
// @include http://*.buding.com/*
// @include http://*.6sbuy.com/*
// @include http://*.voipyeah.com/*
// @include http://*.51sheyuan.com/*
// @include http://*.womai.com/*
// @include http://*.ilovezuan.com/*
// @include http://*.7c.ms/*
// @include http://*.pt9999.com/*
// @include http://*.xinhuabookstore.com/*
// @include http://*.clinique.com.cn/*
// @include http://*.goocctv.cn/*
// @include http://*.meilieasy.com/*
// @include http://*.qumei.com/*
// @include http://*.ai356.com/*
// @include http://*.buynow.com.cn/*
// @include http://*.meilele.com/*
// @include http://*.emengniu.com/*
// @include http://*.winenice.com/*
// @include http://*.186mall.com/*
// @include http://*.lyceem.com/*
// @include http://*.929.cn/*
// @include http://*.zuanj.com/*
// @include http://*.eggcoo.com.cn/*
// @include http://*.dsgoo.com/*
// @include http://*.szshop.com/*
// @include http://*.f508.com/*
// @include http://*.easy361.com/*
// @include http://*.yzmx.cn/*
// @include http://*.gooded.com.cn/*
// @include http://*.919it.com/*
// @include http://*.lafaso.com/*
// @include http://*.pin114.com/*
// @include http://*.aidai.com/*
// @include http://*.mobi001.com/*
// @include http://*.meimeitong.com/*
// @include http://*.03l.cn/*
// @include http://*.cheku.cn/*
// @include http://*.tpy100.com/*
// @include http://*.inshion.com/*
// @include http://*.dodoo.com.cn/*
// @include http://*.myyike.cn/*
// @include http://*.keeph.com/*
// @include http://*.138shop.com/*
// @include http://*.buyfine.net/*
// @include http://*.gouxie.com/*
// @include http://*.52shehua.com/*
// @include http://*.stiova.cn/*
// @include http://*.cheshiwang.cn/*
// @include http://*.allasay.com/*
// @include http://*.likeface.com/*
// @include http://*.001town.com/*
// @include http://*.lovo.cn/*
// @include http://*.365goba.com/*
// @include http://*.fclub.cn/*
// @include http://*.lingdiandian.com/*
// @include http://*.ak111.com/*
// @include http://*.kooch.com.cn/*
// @include http://*.beautyplus.cn/*
// @include http://*.snyun.com/*
// @include http://*.6gogood.com/*
// @include http://*.38hzt.com/*
// @include http://*.71buy.com/*
// @include http://*.shnn.com/*
// @include http://*.f315.com.cn/*
// @include http://*.langshashop.com/*
// @include http://*.x-playboy.com/*
// @include http://*.congguo.com/*
// @include http://*.gou3618.com/*
// @include http://*.veryok.cn/*
// @include http://*.eoeogoo.com/*
// @include http://*.iyuyou.com/*
// @include http://*.yagelibai.net/*
// @include http://*.liqunshop.com/*
// @include http://*.goodnourish.cn/*
// @include http://*.et5155.com/*
// @include http://*.artgle.cn/*
// @include http://*.tooogooo.com/*
// @include http://*.nmlch.com/*
// @include http://*.popyj.com/*
// @include http://*.youlu.net/*
// @include http://*.adu100.com/*
// @include http://*.wenxuanshop.com/*
// @include http://*.enjoyeye.com/*
// @include http://*.montrosechina.com/*
// @include http://*.ceetop.com/*
// @include http://*.sina.com.cn/*
// @include http://*.kejibook.com/*
// @include http://*.yinyuehe.net/*
// @include http://*.chinayigou.net/*
// @include http://*.yesmytea.com/*
// @include http://*.vnasi.com/*
// @include http://*.itgoods.com.cn/*
// @include http://*.needblue.com/*
// @include http://*.youhuwang.com/*
// @include http://*.robam.com/*
// @include http://*.sigo.cn/*
// @include http://*.skomart.com/*
// @include http://*.toy90.com/*
// @include http://*.penseen.com/*
// @include http://*.lancome.com.cn/*
// @include http://*.mmbuy.cn/*
// @include http://*.5yth.com/*
// @include http://*.enuoqi.com/*
// @include http://*.tao3c.com/*
// @include http://*.mamabb.com/*
// @include http://*.uipmall.com/*
// @include http://*.pupai.cn/*
// @include http://*.jmeishop.com/*
// @include http://*.guuoo.com/*
// @include http://*.kappa-cn.com/*
// @include http://*.shopin.net/*
// @include http://*.rooyea.com/*
// @include http://*.95box.com/*
// @include http://*.zhaipin.com/*
// @include http://*.lvalue.net/*
// @include http://*.lohat.cn/*
// @include http://*.sapo.com.hk/*
// @include http://*.aizhigu.com.cn/*
// @include http://*.kuyundong.com/*
// @include http://*.xinbaigo.com/*
// @include http://*.d1car.com/*
// @include http://*.360mart.com/*
// @include http://*.ebtea.com/*
// @include http://*.cm365.com/*
// @include http://*.bgtvs.com/*
// @include http://*.w1.cn/*
// @include http://*.mokamall.com/*
// @include http://*.duoding.com/*
// @include http://*.paixie.net/*
// @include http://*.vjia.com/*
// @include http://*.chris-tina.com/*
// @include http://*.duhub.com/*
// @include http://*.hongkouzi.com/*
// @include http://*.viccol.com/*
// @include http://*.shopin.com.cn/*
// @include http://*.51ka.com/*
// @include http://*.nayao.com/*
// @include http://*.efeihu.com/*
// @include http://*.idshe.com/*
// @include http://*.hi-tec.cn/*
// @include http://*.keede.com.cn/*
// @include http://*.ebaimi.com/*
// @include http://*.chinapay.com/*
// @include http://*.junph.com/*
// @include http://*.360kxr.com/*
// @include http://*.yintai.com/*
// @include http://*.tuniu.com/*
// @include http://*.dazhe.cn/*
// @include http://*.coo8.com/*
// @include http://*.e-my.com.cn/*
// @include http://*.kuaishubao.com/*
// @include http://*.samsclub.cn/*
// @include http://*.anni.com/*
// @include http://*.okbuy.com/*
// @include http://*.xiu.com/*
// @include http://*.my-le.com/*
// @include http://*.uya100.com/*
// @include http://*.orange3c.com/*
// @include http://*.24dq.com/*
// @include http://*.lingshi.com/*
// @include http://*.vcotton.com/*
// @include http://*.meici.com/*
// @include http://*.binggo.com/*
// @include http://*.gap.cn/*
// @include http://*.dahuozhan.com/*
// @include http://*.9dadao.com/*
// @include http://*.163.com/*
// @include http://*.sea8.cn/*
// @include http://*.purcotton.com/*
// @include http://*.dazhongdianqi.com.cn/*
// @include http://*.51buy.com/*
// @include http://*.qxian.com/*
// @include http://*.mangocity.com/*
// @include http://*.qmango.com/*
// @include http://*.okgolf.cn/*
// @include http://*.manzuo.com/*
// @include http://*.jumei.com/*
// @include http://*.gome.com.cn/*
// @include http://*.zm7.cn/*
// @include http://*.24quan.com/*
// @include http://*.99pto.com/*
// @include http://*.vipstore.com/*
// @include http://*.meituan.com/*
// @include http://*.yougou.com/*
// @include http://*.58.com/*
// @include http://*.aibang.com/*
// @include http://*.didatuan.com/*
// @include http://*.lashou.com/*
// @include http://*.mengmai.com/*
// @include http://*.xing800.com/*
// @include http://*.caomeipai.com/*
// @include http://*.suning.com/*
// @include http://*.yobrand.com/*
// @include http://*.nonmin88.com/*
// @include http://*.leyou.com.cn/*
// @include http://*.360hqb.com/*
// @include http://*.hitao.com/*
// @include http://*.jiatx.com/*
// @include http://*.naguu.com/*
// @include http://*.aimer.com.cn/*
// @include http://*.lusen.com/*
// @include http://*.k121.com/*
// @include http://*.tieyou.com/*
// @include http://*.vivian.cn/*
// @include http://*.ctrip.com/*
// @include http://*.outice.com/*
// @include http://*.tiantian.com/*
// @include http://*.6919.com/*
// @include http://*.jiaju.com/*
// @include http://*.homevv.com/*
// @include http://*.kxtkx.com/*
// @include http://*.sonmai.cn/*
// @include http://*.waipowang.com/*
// ==/UserScript==
(function() {
if (window.top != window.self) //don't run on frames or iframes
return;
// Let's setup some html5 storage hooks incase greasemonkey is not available
if (typeof(GM_getValue) != "function" && !localStorage)
{
window.alert("\
Your browser does not support localstorage nor does it support greasemonkey commands!\n\
\n\
If you are running Firefox please upgrade to a newer version or install Greasemonkey.\n\
If you are running Chrome please upgrade to a newer version or install Tampermonkey.\
");
avtng.status.browserErr = 101;
}
else if(typeof(GM_getValue) != "function")
{
var GM_getValue = function (key, def) {return (localStorage.getItem(key) != "undefined")? localStorage.getItem(key) : def;};
var GM_setValue = function (key, val) {localStorage.setItem(key, val);};
var GM_deleteValue = function (key) {localStorage.removeItem(key);};
}
var optionstr = GM_getValue('youdaoGWZS_options', '');
if (!optionstr) {
optionstr = 'browser=chrome;' + 'position=down';
GM_setValue('youdaoGWZS_options', optionstr);
}
var optionNode = document.getElementById('youdaoGWZS_options');
if(!optionNode) {
optionNode = document.createElement('span');
optionNode.id = 'youdaoGWZS_options';
optionNode.style.display = 'none';
optionNode.innerHTML = optionstr;
document.documentElement.appendChild(optionNode);
if (optionNode.firstChild) {
optionNode.firstChild.addEventListener(
'DOMCharacterDataModified', function(event) {
var currentValue = event.newValue;
if(currentValue != GM_getValue('youdaoGWZS_options'))
GM_setValue('youdaoGWZS_options', currentValue);
}, false);
}
}
var head = document.getElementsByTagName('head')[0];
if(!head) return;
var domscript = document.createElement('script');
domscript.src = 'http://zhushou.youdao.com/script/extension_2_2.js?browser=chrome';
domscript.charset = 'utf-8';
head.appendChild(domscript);
})();
使用方法:将以上代码保存为文本文件,并修改文件后缀为user.js,然后拖入chrome即可安装。
再次感谢原作者的脚本。
补充一下:对于弹出的优惠信息窗口,由于原先是chrome扩展程序,可以集中保存关闭该消息框的配置属性,采用脚本后,不同网站的配置无法跨域保存,也就是说,第一次打开一个网站时,还是会弹出优惠信息窗口,关闭后下载打开这个网站,就不会再弹出了。这是和原扩展最大的不同,不过基本上不影响使用。
另外上面的网站是根据有道购物助手中提供的商家列表整理的,原始是一堆正则表达式,如下所示:
^(http:\/\/product\.pcpop\.com\/.*\/Index\.html|http:\/\/product\.pcpop\.com\/.*\/Price\.html|http:\/\/product\.yesky\.com\/product\/.*\/.*\/.*|http:\/\/product\.yesky\.com\/product\/.*\/.*\/price\.shtml|http:\/\/.*\.dangdang\.com\/.*|http:\/\/.*\.amazon\.cn\/.*|http:\/\/.*\.icson\.com\/.*|http:\/\/.*\.ouku\.com\/.*|http:\/\/.*\.dahuozhan\.com\/.*|http:\/\/51buy\.com\/.*|http:\/\/www\.51buy\.com\/.*|http:\/\/spu\.tmall\.com\/spu_.*|http:\/\/item\.tmall\.com\/item\.htm.*|http:\/\/list\.3c\.tmall\.com\/spu_.*|http:\/\/.*\.139shop\.com\/.*|http:\/\/item\.taobao\.com\/auction\/item_detail.*|http:\/\/item\.taobao\.com\/item\.htm.*|http:\/\/.*\.dhc\.net\.cn\/.*|http:\/\/.*\.china-pub\.com\/.*|http:\/\/.*\.rayi\.cn\/.*|http:\/\/.*\.no5\.com\.cn\/.*|http:\/\/.*\.51buy\.com\/.*|http:\/\/.*\.360buy\.com\/.*|http:\/\/.*\.18900\.com\/.*|http:\/\/.*\.wl\.cn\/.*|http:\/\/.*\.80ebus\.com\/.*|http:\/\/.*\.bearbuy\.com\.cn\/.*|http:\/\/.*\.958shop\.com\/.*|http:\/\/.*\.51youpin\.com\/.*|http:\/\/.*\.panasonic\.cn\/.*|http:\/\/.*\.muyingzhijia\.com\/.*|http:\/\/.*\.sport2008\.com\.cn\/.*|http:\/\/.*\.mpshow\.com\.cn\/.*|http:\/\/.*\.e800\.com\.cn\/.*|http:\/\/.*\.sanfo\.com\/.*|http:\/\/.*\.yide\.com\/.*|http:\/\/.*\.yasai\.cn\/.*|http:\/\/.*\.dixintong\.com\/.*|http:\/\/.*\.ouyea\.com\/.*|http:\/\/.*\.afffff\.com\/.*|http:\/\/.*\.yaja\.com\.cn\/.*|http:\/\/.*\.bookschina\.com\/.*|http:\/\/.*\.chengdecs\.com\/.*|http:\/\/.*\.nokia\.com\.cn\/.*|http:\/\/.*\.lijiababy\.com\.cn\/.*|http:\/\/.*\.aiyingshi\.com\/.*|http:\/\/.*\.99read\.com\/.*|http:\/\/.*\.d1\.com\.cn\/.*|http:\/\/.*\.redbaby\.com\.cn\/.*|http:\/\/.*\.goodjd\.com\/.*|http:\/\/.*\.motostore\.com\.cn\/.*|http:\/\/.*\.leyou\.com\/.*|http:\/\/.*\.benq\.com\.cn\/.*|http:\/\/.*\.clady\.com\/.*|http:\/\/.*\.7shop24\.com\/.*|http:\/\/.*\.ehaier\.com\/.*|http:\/\/.*\.guopi\.com\/.*|http:\/\/.*\.lenovo\.com\.cn\/.*|http:\/\/.*\.51dg\.com\/.*|http:\/\/.*\.cnave\.com\/.*|http:\/\/.*\.cosme-de\.com\/.*|http:\/\/.*\.sasa\.com\/.*|http:\/\/.*\.qinqinbaby\.com\/.*|http:\/\/.*\.olympus\.com\.cn\/.*|http:\/\/.*\.strawberrynet\.com\/.*|http:\/\/.*\.bobomobi\.com\/.*|http:\/\/.*\.39ty\.com\/.*|http:\/\/.*\.133china\.com\/.*|http:\/\/.*\.hopebook\.net\/.*|http:\/\/.*\.the365\.com\/.*|http:\/\/.*\.beifabook\.com\/.*|http:\/\/.*\.timesinfor\.com\/.*|http:\/\/.*\.ofcard\.com\/.*|http:\/\/.*\.cncard\.com\/.*|http:\/\/.*\.zgcbb\.com\/.*|http:\/\/.*\.yongle\.com\.cn\/.*|http:\/\/.*\.bookuu\.com\/.*|http:\/\/.*\.2688\.com\/.*|http:\/\/.*\.e-lining\.com\/.*|http:\/\/.*\.shishang\.com\.cn\/.*|http:\/\/.*\.m18\.com\/.*|http:\/\/.*\.chinadrtv\.com\/.*|http:\/\/.*\.dayoo\.com\/.*|http:\/\/.*\.redmall\.com\.cn\/.*|http:\/\/.*\.vafox\.com\/.*|http:\/\/.*\.532shop\.com\/.*|http:\/\/.*\.olymsports\.com\/.*|http:\/\/.*\.uiyi\.cn\/.*|http:\/\/.*\.it88\.com\.cn\/.*|http:\/\/.*\.letao\.com\/.*|http:\/\/.*\.ourtasty\.com\/.*|http:\/\/.*\.zoshow\.com\/.*|http:\/\/.*\.sssy\.com\.cn\/.*|http:\/\/.*\.likebuy\.com\/.*|http:\/\/.*\.shoubiao\.com\.cn\/.*|http:\/\/.*\.77toy\.com\/.*|http:\/\/.*\.xindou\.com\/.*|http:\/\/.*\.yumaoclub\.com\/.*|http:\/\/.*\.aiju\.com\/.*|http:\/\/.*\.lanjiahuo\.com\/.*|http:\/\/.*\.yihaodian\.com\/.*|http:\/\/.*\.ejia\.com\/.*|http:\/\/.*\.5366\.com\/.*|http:\/\/.*\.jsbcmall\.com\/.*|http:\/\/.*\.milimall\.com\/.*|http:\/\/.*\.togj\.com\/.*|http:\/\/.*\.yoyo18\.com\/.*|http:\/\/.*\.buy007\.com\/.*|http:\/\/.*\.taoxie\.cn\/.*|http:\/\/.*\.xiaolaoren\.com\/.*|http:\/\/.*\.jiyi\.asia\/.*|http:\/\/.*\.shentop\.com\/.*|http:\/\/.*\.yuego\.com\/.*|http:\/\/.*\.258sd\.com\/.*|http:\/\/.*\.akimimi\.com\/.*|http:\/\/.*\.augshow\.com\/.*|http:\/\/.*\.obuy\.cn\/.*|http:\/\/.*\.sasacity\.com\/.*|http:\/\/.*\.woye\.com\/.*|http:\/\/.*\.wow-diamond\.com\.cn\/.*|http:\/\/.*\.xiaozhuren\.com\/.*|http:\/\/.*\.egobuy\.com\/.*|http:\/\/.*\.shaobag\.com\/.*|http:\/\/.*\.hit168\.com\.cn\/.*|http:\/\/.*\.uushouji\.com\/.*|http:\/\/.*\.168dg\.com\/.*|http:\/\/.*\.locknlock\.com\.cn\/.*|http:\/\/.*\.gzbookcenter\.com\/.*|http:\/\/.*\.naccoo\.com\/.*|http:\/\/.*\.yoger\.com\.cn\/.*|http:\/\/.*\.bbesports\.com\/.*|http:\/\/.*\.newegg\.com\.cn\/.*|http:\/\/.*\.yidianda\.com\/.*|http:\/\/.*\.dconline\.com\.cn\/.*|http:\/\/.*\.mbaobao\.com\/.*|http:\/\/.*\.yyosso\.com\/.*|http:\/\/.*\.ogage\.cn\/.*|http:\/\/.*\.justonline\.cn\/.*|http:\/\/.*\.cosize\.com\/.*|http:\/\/.*\.yangsam\.com\/.*|http:\/\/.*\.okaybuy\.com\.cn\/.*|http:\/\/.*\.happigo\.com\/.*|http:\/\/.*\.menglu\.com\/.*|http:\/\/.*\.shishangqiyi\.com\/.*|http:\/\/.*\.vancl\.com\/.*|http:\/\/.*\.olomo\.com\/.*|http:\/\/.*\.masamaso\.com\/.*|http:\/\/.*\.hakunamatata\.cn\/.*|http:\/\/.*\.100fo\.com\/.*|http:\/\/.*\.yifu\.com\/.*|http:\/\/.*\.zopo\.com\/.*|http:\/\/.*\.shift6-6\.com\/.*|http:\/\/.*\.ishop\.cn\/.*|http:\/\/.*\.u1382\.com\/.*|http:\/\/.*\.yeeson\.com\/.*|http:\/\/.*\.vaakav\.com\/.*|http:\/\/.*\.hany\.cn\/.*|http:\/\/.*\.carrefour\.com\.cn\/.*|http:\/\/.*\.ocj\.com\.cn\/.*|http:\/\/.*\.3suisses\.com\.cn\/.*|http:\/\/.*\.cdream\.com\/.*|http:\/\/.*\.yaofang\.cn\/.*|http:\/\/.*\.youjk\.com\/.*|http:\/\/.*\.baiyjk\.com\/.*|http:\/\/.*\.sinobuy\.cn\/.*|http:\/\/.*\.daoyao\.com\/.*|http:\/\/.*\.511yd\.com\/.*|http:\/\/.*\.51yao\.com\.cn\/.*|http:\/\/.*\.xtpo\.cn\/.*|http:\/\/.*\.okbig\.com\/.*|http:\/\/.*\.tztart\.com\/.*|http:\/\/.*\.mamahao\.cn\/.*|http:\/\/.*\.mobi189\.com\/.*|http:\/\/.*\.dongdianwang\.com\/.*|http:\/\/.*\.shihui\.tv\/.*|http:\/\/buy\.yoho\.cn\/.*|http:\/\/.*\.yoho\.cn\/pro_.*|http:\/\/.*\.goonow\.com\/.*|http:\/\/.*\.100god\.com\/.*|http:\/\/.*\.caistv\.com\/.*|http:\/\/.*\.mmgw\.cn\/.*|http:\/\/.*\.365\.com\/.*|http:\/\/.*\.newgo5\.com\/.*|http:\/\/.*\.yeecare\.com\/.*|http:\/\/.*\.qissun\.com\/.*|http:\/\/.*\.ideemall\.com\/.*|http:\/\/.*\.96128\.com\/.*|http:\/\/.*\.eboxbuy\.com\/.*|http:\/\/.*\.wanew\.com\/.*|http:\/\/.*\.1j\.cn\/.*|http:\/\/.*\.mooiee\.com\/.*|http:\/\/.*\.wooha\.com\/.*|http:\/\/.*\.jtlhome\.com\/.*|http:\/\/.*\.kela\.cn\/.*|http:\/\/.*\.maichawang\.com\/.*|http:\/\/.*\.wangshanghai\.com\/.*|http:\/\/.*\.xiadingdan\.com\/.*|http:\/\/.*\.cansibei\.cn\/.*|http:\/\/.*\.joyran\.com\/.*|http:\/\/.*\.topshoes\.cn\/.*|http:\/\/.*\.bbn\.com\.cn\/.*|http:\/\/.*\.huachu\.com\.cn\/.*|http:\/\/.*\.fim\.com\.cn\/.*|http:\/\/.*\.tinies\.cn\/.*|http:\/\/.*\.maywon\.com\/.*|http:\/\/.*\.venusveil\.com\/.*|http:\/\/.*\.ushan\.cn\/.*|http:\/\/.*\.daisonghua\.com\/.*|http:\/\/.*\.oyego\.com\/.*|http:\/\/.*\.laeibelle\.com\/.*|http:\/\/.*\.maimaike\.cn\/.*|http:\/\/.*\.chn81\.com\/.*|http:\/\/.*\.qingci\.com\/.*|http:\/\/.*\.huimeifang\.cn\/.*|http:\/\/.*\.baandma\.com\/.*|http:\/\/.*\.guobuy\.com\/.*|http:\/\/.*\.114x315\.com\/.*|http:\/\/.*\.cnfse\.com\/.*|http:\/\/.*\.chinayrs\.com\/.*|http:\/\/.*\.sun521\.com\/.*|http:\/\/.*\.moonbasa\.com\/.*|http:\/\/.*\.disiqu\.cn\/.*|http:\/\/.*\.mmuses\.com\/.*|http:\/\/.*\.xiezi\.com\/.*|http:\/\/.*\.boqii\.com\/.*|http:\/\/.*\.zbird\.com\/.*|http:\/\/.*\.acosme\.com\/.*|http:\/\/.*\.yiditu\.com\/.*|http:\/\/.*\.51eng\.com\/.*|http:\/\/.*\.ecosme\.cn\/.*|http:\/\/.*\.mamamei\.com\/.*|http:\/\/.*\.ejaja\.cn\/.*|http:\/\/.*\.yesfashion\.cn\/.*|http:\/\/.*\.4inlook\.com\/.*|http:\/\/.*\.lens2005\.com\/.*|http:\/\/.*\.e-giordano\.com\/.*|http:\/\/.*\.jshoppers\.com\/.*|http:\/\/.*\.icaifeng\.com\/.*|http:\/\/.*\.lamiu\.com\/.*|http:\/\/.*\.shouhui07\.com\/.*|http:\/\/.*\.conslive\.com\/.*|http:\/\/.*\.colebuy\.com\/.*|http:\/\/.*\.jomo\.cc\/.*|http:\/\/.*\.pirateship\.com\.cn\/.*|http:\/\/.*\.flowercn\.com\/.*|http:\/\/.*\.chedangjia\.com\/.*|http:\/\/.*\.goyahome\.com\/.*|http:\/\/.*\.car6688\.com\/.*|http:\/\/.*\.04919\.com\/.*|http:\/\/.*\.01goo\.com\/.*|http:\/\/.*\.aim36\.com\/.*|http:\/\/.*\.imeelee\.com\/.*|http:\/\/.*\.inoble\.com\.cn\/.*|http:\/\/.*\.hw2008\.cn\/.*|http:\/\/.*\.7sev\.com\/.*|http:\/\/.*\.sz-esun\.com\/.*|http:\/\/.*\.jew-online\.com\/.*|http:\/\/.*\.22shop\.com\/.*|http:\/\/.*\.palcent\.com\/.*|http:\/\/.*\.jinbaidu\.com\/.*|http:\/\/.*\.chashu\.cn\/.*|http:\/\/.*\.lili\.hk\/.*|http:\/\/.*\.ku56\.net\/.*|http:\/\/.*\.carpee\.com\/.*|http:\/\/.*\.lianhua360\.com\/.*|http:\/\/.*\.godida\.com\/.*|http:\/\/.*\.flowerby\.com\/.*|http:\/\/.*\.buy361\.cn\/.*|http:\/\/.*\.bonglett\.cn\/.*|http:\/\/.*\.all3c\.com\/.*|http:\/\/.*\.china-gift\.com\/.*|http:\/\/.*\.vipshop\.com\/.*|http:\/\/.*\.tian10\.com\/.*|http:\/\/.*\.maiaa\.com\/.*|http:\/\/.*\.ugou\.cn\/.*|http:\/\/.*\.wg365\.com\/.*|http:\/\/.*\.pgbao\.com\/.*|http:\/\/.*\.1gou\.com\/.*|http:\/\/.*\.sinow\.com\.cn\/.*|http:\/\/.*\.doulaimai\.com\/.*|http:\/\/.*\.95mobi\.com\/.*|http:\/\/.*\.2bao\.com\/.*|http:\/\/.*\.5188bag\.com\/.*|http:\/\/.*\.goshishang\.com\/.*|http:\/\/.*\.baby2688\.com\/.*|http:\/\/.*\.paikepen\.com\/.*|http:\/\/.*\.minibuy\.com\/.*|http:\/\/.*\.9you\.com\/.*|http:\/\/.*\.xzuan\.com\/.*|http:\/\/.*\.sawbuy\.com\/.*|http:\/\/.*\.51mob\.com\.cn\/.*|http:\/\/.*\.ladypk\.com\/.*|http:\/\/.*\.okddy\.com\/.*|http:\/\/.*\.6688\.com\/.*|http:\/\/.*\.jinjichina\.com\/.*|http:\/\/.*\.bazha\.com\.cn\/.*|http:\/\/.*\.shjdq\.com\/.*|http:\/\/.*\.bloves\.com\/.*|http:\/\/.*\.homeold\.cn\/.*|http:\/\/.*\.loscent\.com\.cn\/.*|http:\/\/.*\.ttago\.com\/.*|http:\/\/.*\.qudong365\.com\/.*|http:\/\/.*\.lehetimes\.com\/.*|http:\/\/.*\.wumeiwang\.com\/.*|http:\/\/.*\.jiaoyitong\.com\.cn\/.*|http:\/\/.*\.gouwulian\.com\/.*|http:\/\/.*\.le978\.cn\/.*|http:\/\/.*\.7caihua\.com\/.*|http:\/\/.*\.piaoliang100\.com\/.*|http:\/\/.*\.xuandoo\.com\/.*|http:\/\/.*\.jiajiajk\.com\/.*|http:\/\/.*\.igobb\.com\/.*|http:\/\/.*\.8844\.com\/.*|http:\/\/.*\.cw100\.com\/.*|http:\/\/.*\.8mmo\.com\/.*|http:\/\/.*\.yjcs\.cn\/.*|http:\/\/.*\.ono\.com\.cn\/.*|http:\/\/.*\.office\.cn\/.*|http:\/\/.*\.kidslandshop\.com\/.*|http:\/\/.*\.dianpu\.com\/.*|http:\/\/.*\.ledaojia\.com\/.*|http:\/\/.*\.itzm\.com\/.*|http:\/\/.*\.6root\.com\/.*|http:\/\/.*\.petyoo\.com\/.*|http:\/\/.*\.dalanzhu\.com\/.*|http:\/\/.*\.cobuy\.com\.cn\/.*|http:\/\/.*\.lugo365\.com\/.*|http:\/\/.*\.ideaco\.cn\/.*|http:\/\/.*\.xiaokang\.com\/.*|http:\/\/.*\.leftlady\.com\/.*|http:\/\/.*\.trackman\.cn\/.*|http:\/\/.*\.91pretty\.com\/.*|http:\/\/.*\.gouduo\.com\/.*|http:\/\/.*\.thinkshop\.cn\/.*|http:\/\/.*\.pcarm\.com\/.*|http:\/\/.*\.salala\.com\.cn\/.*|http:\/\/.*\.168flower\.com\/.*|http:\/\/.*\.toys365\.com\/.*|http:\/\/.*\.liyi99\.com\/.*|http:\/\/.*\.58hua\.com\/.*|http:\/\/.*\.iloveyou\.com\.cn\/.*|http:\/\/.*\.7cv\.com\/.*|http:\/\/.*\.jiayougo\.com\/.*|http:\/\/.*\.carsfun\.com\/.*|http:\/\/.*\.autosup\.com\/.*|http:\/\/.*\.jumbomart\.cn\/.*|http:\/\/.*\.xdloutdoor\.com\/.*|http:\/\/.*\.5paipai\.com\/.*|http:\/\/.*\.shanghai-sports\.com\/.*|http:\/\/.*\.dayslove\.com\/.*|http:\/\/.*\.biaoshang\.hk\/.*|http:\/\/.*\.kadang\.com\/.*|http:\/\/.*\.veedl\.com\/.*|http:\/\/.*\.momoyoyo\.com\/.*|http:\/\/.*\.upin365\.com\/.*|http:\/\/.*\.maxfunbuy\.com\/.*|http:\/\/.*\.qianxun\.com\/.*|http:\/\/.*\.ihush\.com\/.*|http:\/\/.*\.apabi\.com\/.*|http:\/\/.*\.520eye\.com\/.*|http:\/\/.*\.quwan\.com\/.*|http:\/\/.*\.haotehao\.com\/.*|http:\/\/.*\.car339\.com\.cn\/.*|http:\/\/.*\.8801\.net\/.*|http:\/\/.*\.99gou\.com\/.*|http:\/\/.*\.4007000512\.com\/.*|http:\/\/.*\.18to82\.com\/.*|http:\/\/.*\.dtoto\.com\/.*|http:\/\/.*\.juqile\.cn\/.*|http:\/\/.*\.yesmywine\.com\/.*|http:\/\/.*\.best1\.com\/.*|http:\/\/.*\.vegoos\.com\/.*|http:\/\/.*\.5lux\.com\/.*|http:\/\/.*\.lovswan\.com\/.*|http:\/\/.*\.skcoo\.com\/.*|http:\/\/.*\.51y2\.com\/.*|http:\/\/.*\.wtaotao\.com\/.*|http:\/\/.*\.lijigou\.com\/.*|http:\/\/.*\.021kaoshi\.com\/.*|http:\/\/.*\.942radio\.com\/.*|http:\/\/.*\.epetbar\.com\/.*|http:\/\/.*\.u88go\.com\/.*|http:\/\/.*\.lengta\.com\/.*|http:\/\/.*\.hoba\.com\.cn\/.*|http:\/\/.*\.luckigo\.com\/.*|http:\/\/.*\.buding\.com\/.*|http:\/\/.*\.6sbuy\.com\/.*|http:\/\/.*\.voipyeah\.com\/.*|http:\/\/.*\.51sheyuan\.com\/.*|http:\/\/.*\.womai\.com\/.*|http:\/\/.*\.ilovezuan\.com\/.*|http:\/\/.*\.7c\.ms\/.*|http:\/\/.*\.pt9999\.com\/.*|http:\/\/.*\.xinhuabookstore\.com\/.*|http:\/\/.*\.clinique\.com\.cn\/.*|http:\/\/.*\.goocctv\.cn\/.*|http:\/\/.*\.meilieasy\.com\/.*|http:\/\/.*\.qumei\.com\/.*|http:\/\/.*\.ai356\.com\/.*|http:\/\/.*\.green3c\.com\/.*|http:\/\/.*\.buynow\.com\.cn\/.*|http:\/\/.*\.meilele\.com\/.*|http:\/\/.*\.suning\.com\/.*|http:\/\/.*\.emengniu\.com\/.*|http:\/\/.*\.winenice\.com\/.*|http:\/\/.*\.186mall\.com\/.*|http:\/\/.*\.lyceem\.com\/.*|http:\/\/.*\.929\.cn\/.*|http:\/\/.*\.zuanj\.com\/.*|http:\/\/.*\.eggcoo\.com\.cn\/.*|http:\/\/.*\.dsgoo\.com\/.*|http:\/\/.*\.szshop\.com\/.*|http:\/\/.*\.f508\.com\/.*|http:\/\/.*\.easy361\.com\/.*|http:\/\/.*\.yzmx\.cn\/.*|http:\/\/.*\.gooded\.com\.cn\/.*|http:\/\/.*\.919it\.com\/.*|http:\/\/.*\.lafaso\.com\/.*|http:\/\/.*\.pin114\.com\/.*|http:\/\/.*\.aidai\.com\/.*|http:\/\/.*\.mobi001\.com\/.*|http:\/\/.*\.meimeitong\.com\/.*|http:\/\/.*\.03l\.cn\/.*|http:\/\/.*\.cheku\.cn\/.*|http:\/\/.*\.tpy100\.com\/.*|http:\/\/.*\.inshion\.com\/.*|http:\/\/.*\.dodoo\.com\.cn\/.*|http:\/\/.*\.myyike\.cn\/.*|http:\/\/.*\.keeph\.com\/.*|http:\/\/.*\.138shop\.com\/.*|http:\/\/.*\.buyfine\.net\/.*|http:\/\/.*\.gouxie\.com\/.*|http:\/\/.*\.52shehua\.com\/.*|http:\/\/.*\.stiova\.cn\/.*|http:\/\/.*\.cheshiwang\.cn\/.*|http:\/\/.*\.allasay\.com\/.*|http:\/\/.*\.001town\.com\/.*|http:\/\/.*\.lovo\.cn\/.*|http:\/\/.*\.365goba\.com\/.*|http:\/\/.*\.fclub\.cn\/.*|http:\/\/.*\.lingdiandian\.com\/.*|http:\/\/.*\.ak111\.com\/.*|http:\/\/.*\.kooch\.com\.cn\/.*|http:\/\/.*\.beautyplus\.cn\/.*|http:\/\/.*\.snyun\.com\/.*|http:\/\/.*\.6gogood\.com\/.*|http:\/\/.*\.38hzt\.com\/.*|http:\/\/.*\.71buy\.com\/.*|http:\/\/.*\.shnn\.com\/.*|http:\/\/.*\.f315\.com\.cn\/.*|http:\/\/.*\.langshashop\.com\/.*|http:\/\/.*\.x-playboy\.com\/.*|http:\/\/.*\.congguo\.com\/.*|http:\/\/.*\.gou3618\.com\/.*|http:\/\/.*\.veryok\.cn\/.*|http:\/\/.*\.eoeogoo\.com\/.*|http:\/\/.*\.iyuyou\.com\/.*|http:\/\/.*\.yagelibai\.net\/.*|http:\/\/.*\.liqunshop\.com\/.*|http:\/\/.*\.goodnourish\.cn\/.*|http:\/\/.*\.et5155\.com\/.*|http:\/\/.*\.artgle\.cn\/.*|http:\/\/.*\.tooogooo\.com\/.*|http:\/\/.*\.nmlch\.com\/.*|http:\/\/.*\.popyj\.com\/.*|http:\/\/.*\.youlu\.net\/.*|http:\/\/.*\.adu100\.com\/.*|http:\/\/.*\.wenxuanshop\.com\/.*|http:\/\/.*\.enjoyeye\.com\/.*|http:\/\/.*\.montrosechina\.com\/.*|http:\/\/.*\.ceetop\.com\/.*|http:\/\/.*\.kejibook\.com\/.*|http:\/\/.*\.yinyuehe\.net\/.*|http:\/\/.*\.chinayigou\.net\/.*|http:\/\/.*\.yesmytea\.com\/.*|http:\/\/.*\.vnasi\.com\/.*|http:\/\/.*\.itgoods\.com\.cn\/.*|http:\/\/.*\.needblue\.com\/.*|http:\/\/.*\.youhuwang\.com\/.*|http:\/\/.*\.robam\.com\/.*|http:\/\/.*\.sigo\.cn\/.*|http:\/\/.*\.skomart\.com\/.*|http:\/\/.*\.toy90\.com\/.*|http:\/\/.*\.diannaoshop\.com\/.*|http:\/\/.*\.penseen\.com\/.*|http:\/\/.*\.lancome\.com\.cn\/.*|http:\/\/.*\.mmbuy\.cn\/.*|http:\/\/.*\.5yth\.com\/.*|http:\/\/.*\.enuoqi\.com\/.*|http:\/\/.*\.tao3c\.com\/.*|http:\/\/.*\.mamabb\.com\/.*|http:\/\/.*\.uipmall\.com\/.*|http:\/\/.*\.pupai\.cn\/.*|http:\/\/.*\.jmeishop\.com\/.*|http:\/\/.*\.guuoo\.com\/.*|http:\/\/.*\.kappa-cn\.com\/.*|http:\/\/.*\.shopin\.net\/.*|http:\/\/.*\.rooyea\.com\/.*|http:\/\/.*\.95box\.com\/.*|http:\/\/.*\.zhaipin\.com\/.*|http:\/\/.*\.lvalue\.net\/.*|http:\/\/.*\.lohat\.cn\/.*|http:\/\/.*\.sapo\.com\.hk\/.*|http:\/\/.*\.aizhigu\.com\.cn\/.*|http:\/\/.*\.kuyundong\.com\/.*|http:\/\/.*\.d1car\.com\/.*|http:\/\/.*\.1626\.com\/.*|http:\/\/.*\.360mart\.com\/.*|http:\/\/.*\.ebtea\.com\/.*|http:\/\/.*\.cm365\.com\/.*|http:\/\/.*\.bgtvs\.com\/.*|http:\/\/.*\.w1\.cn\/.*|http:\/\/.*\.mokamall\.com\/.*|http:\/\/.*\.xifuquan\.com\/.*|http:\/\/.*\.duoding\.com\/.*|http:\/\/.*\.paixie\.net\/.*|http:\/\/.*\.vjia\.com\/.*|http:\/\/.*\.chris-tina\.com\/.*|http:\/\/.*\.duhub\.com\/.*|http:\/\/.*\.hongkouzi\.com\/.*|http:\/\/.*\.viccol\.com\/.*|http:\/\/.*\.shopin\.com\.cn\/.*|http:\/\/.*\.51ka\.com\/.*|http:\/\/.*\.nayao\.com\/.*|http:\/\/.*\.efeihu\.com\/.*|http:\/\/.*\.idshe\.com\/.*|http:\/\/.*\.hi-tec\.cn\/.*|http:\/\/.*\.keede\.com\.cn\/.*|http:\/\/.*\.ebaimi\.com\/.*|http:\/\/.*\.chinapay\.com\/.*|http:\/\/.*\.junph\.com\/.*|http:\/\/.*\.360kxr\.com\/.*|http:\/\/.*\.yintai\.com\/.*|http:\/\/.*\.tuniu\.com\/.*|http:\/\/.*\.dazhe\.cn\/.*|http:\/\/.*\.apple\.com\/.*|http:\/\/.*\.coo8\.com\/.*|http:\/\/.*\.e-my\.com\.cn\/.*|http:\/\/.*\.kuaishubao\.com\/.*|http:\/\/.*\.samsclub\.cn\/.*|http:\/\/.*\.anni\.com\/.*|http:\/\/.*\.okbuy\.com\/.*|http:\/\/.*\.24dq\.com\/.*)$
以上列表有道会时不时更新,不过据说实际上有道自己也只支持了一部分而已,因此我不再维护该网站列表,如果各位觉得网站太多太麻烦,可以只添加自己常去的网站(比如只保留新蛋,京东,亚马逊,当当之类的),其他全部删除就好。
【Update 1】
稍微调整了一下:
1) 去掉一堆无用的网站,只保留了最常用的购物网站。
2) 改为默认为不弹出优惠信息窗口,不再需要一个个的点击关闭了。
// ==UserScript==
// @name youdao zhushou
// @description 有道购物助手
// @update 2012-2-10
// @create 2012-2-1
// @version 0.0.2
// @author lemonbox
// @namespace youdao
// @include http://product.yesky.com/product/*/*/price.shtml
// @include http://*.dangdang.com/*
// @include http://*.amazon.cn/*
// @include http://*.taobao.com/*
// @include http://*.ouku.com/*
// @include http://*.360buy.com/*
// @include http://*.icson.com/*
// @include http://*.coo8.com/*
// @include http://*.vancl.com/*
// @include http://*.efeihu.com/*
// @include http://*.tao3c.com/*
// @include http://*.suning.com/*
// @include http://*.gome.com.cn/*
// @include http://*.yihaodian.com/*
// @include http://*.all3c.com/*
// @include http://*.newegg.com.cn/*
// ==/UserScript==
(function() {
if (window.top != window.self) //don't run on frames or iframes
return;
// Let's setup some html5 storage hooks incase greasemonkey is not available
if (typeof(GM_getValue) != "function" && !localStorage)
{
window.alert("\
Your browser does not support localstorage nor does it support greasemonkey commands!\n\
\n\
If you are running Firefox please upgrade to a newer version or install Greasemonkey.\n\
If you are running Chrome please upgrade to a newer version or install Tampermonkey.\
");
avtng.status.browserErr = 101;
}
else if(typeof(GM_getValue) != "function")
{
var GM_getValue = function (key, def) {return (localStorage.getItem(key) != "undefined")? localStorage.getItem(key) : def;};
var GM_setValue = function (key, val) {localStorage.setItem(key, val);};
var GM_deleteValue = function (key) {localStorage.removeItem(key);};
}
var optionstr = GM_getValue('youdaoGWZS_options', '');
if (!optionstr) {
optionstr = 'browser=chrome;position=down;featureCode=011;isDiscountOpen=close';
GM_setValue('youdaoGWZS_options', optionstr);
}
var optionNode = document.getElementById('youdaoGWZS_options');
if(!optionNode) {
optionNode = document.createElement('span');
optionNode.id = 'youdaoGWZS_options';
optionNode.style.display = 'none';
optionNode.innerHTML = optionstr;
document.documentElement.appendChild(optionNode);
if (optionNode.firstChild) {
optionNode.firstChild.addEventListener('DOMCharacterDataModified', function(event) {
var currentValue = event.newValue;
if(currentValue != GM_getValue('youdaoGWZS_options'))
GM_setValue('youdaoGWZS_options', currentValue);
}, false);
}
}
var head = document.getElementsByTagName('head')[0];
if(!head) return;
var domscript = document.createElement('script');
domscript.src = 'http://zhushou.youdao.com/script/extension_2_2.js?browser=chrome';
domscript.charset = 'utf-8';
head.appendChild(domscript);
})();
【Update 2】
一段时间没有用,发现突然不能用了,于是下载最新的有道购物助手,看了一下代码,做了如下升级:
1)升级后的脚本地址变了,以前的脚本地址不能用了,换为新地址。
2)新版本增加一个优惠券的弹窗,改为默认不再弹出。
3)添加苏宁易购的网址。
更新一下代码:
// ==UserScript==
// @name youdao zhushou
// @description 有道购物助手
// @update 2012-2-1
// @create 2012-2-1
// @version 0.0.1
// @author lemonbox
// @namespace youdao
// @include http://product.yesky.com/product/*/*/price.shtml
// @include http://*.dangdang.com/*
// @include http://*.amazon.cn/*
// @include http://*.taobao.com/*
// @include http://*.ouku.com/*
// @include http://*.360buy.com/*
// @include http://*.icson.com/*
// @include http://*.coo8.com/*
// @include http://*.vancl.com/*
// @include http://*.efeihu.com/*
// @include http://*.tao3c.com/*
// @include http://*.suning.com/*
// @include http://*.gome.com.cn/*
// @include http://*.yihaodian.com/*
// @include http://*.all3c.com/*
// @include http://*.newegg.com.cn/*
// @include http://*.suning.com/*
// ==/UserScript==
(function() {
if (window.top != window.self) //don't run on frames or iframes
return;
// Let's setup some html5 storage hooks incase greasemonkey is not available
if (typeof(GM_getValue) != "function" && !localStorage)
{
window.alert("\
Your browser does not support localstorage nor does it support greasemonkey commands!\n\
\n\
If you are running Firefox please upgrade to a newer version or install Greasemonkey.\n\
If you are running Chrome please upgrade to a newer version or install Tampermonkey.\
");
avtng.status.browserErr = 101;
}
else if(typeof(GM_getValue) != "function")
{
var GM_getValue = function (key, def) {return (localStorage.getItem(key) != "undefined")? localStorage.getItem(key) : def;};
var GM_setValue = function (key, val) {localStorage.setItem(key, val);};
var GM_deleteValue = function (key) {localStorage.removeItem(key);};
}
var optionstr = GM_getValue('youdaoGWZS_options', '');
if (!optionstr) {
optionstr = 'browser=chrome;position=down;featureCode=011001;isDiscountOpen=close';
GM_setValue('youdaoGWZS_options', optionstr);
}
var optionNode = document.getElementById('youdaoGWZS_options');
if(!optionNode) {
optionNode = document.createElement('span');
optionNode.id = 'youdaoGWZS_options';
optionNode.style.display = 'none';
optionNode.innerHTML = optionstr;
document.documentElement.appendChild(optionNode);
if (optionNode.firstChild) {
optionNode.firstChild.addEventListener('DOMCharacterDataModified', function(event) {
var currentValue = event.newValue;
if(currentValue != GM_getValue('youdaoGWZS_options'))
GM_setValue('youdaoGWZS_options', currentValue);
}, false);
}
}
var head = document.getElementsByTagName('head')[0];
if(!head) return;
var domscript = document.createElement('script');
domscript.src = 'http://zhushou.youdao.com/script/extension_2_4.js?browser=chrome&version=2.4';
domscript.charset = 'utf-8';
head.appendChild(domscript);
})();