Description
I believe most developers have been experiencing compatiblity issues with so-called brwosers. I know you have spent lots of time fixing pages to grace all browsers. So have I. I feel distressed, exhausted when finishing tweaking. The last words I want to voice out —- I hate this!
Why not ask visitors to change another browser?! This plugin is set to list pros and cons of various browsers and recommend visitors to alter their browser!
描述
相信大多数开发人员都遇到过浏览器兼容性问题。你一定花费了大量的时间调试页面以便让大多数浏览器都能正常显示你的页面。我也如此!我觉得不爽,而且很累。我最后想说的是——我恨死这种工作了!
为什么不能让劝说浏览者换个浏览器呢?!这个插件就是用来干这个的,它会自动判断浏览者的浏览器,并且列出其他浏览器的优缺点,推荐浏览者使用某个其他的浏览器。
Requirements
- jQuery Libary, just download from jQuery Official Site
- webPrejudice script file. You can download it from below
- a little knowledge on xhtml and js
Download
Features
This plugin will check the type and version of the browser the visitor is using, and show a UI box to recommend visitors to change his browser, etc.
You can also manually choose the browser you want to prejudice on, and the plugin will help you tell the visitor how bad is the browser he’s using and the benifits of other browsers!
Currently only 3 parameters are avaiblable, all of which are optional.
- disable if the plugin is disabled. Don’t assign any vallue and the plugin will work. Set to “true” if you want to disable the plugin.
- loc the path of XML file where stores the language settings of this plugin.
- target the browser you want to condem. You can choose from “ie6″,”ie7,”ie8″,”safari”,”mozilla”,”opera”, or leave it blank. Default is “ie6″. (Most people will agree with my prejudice on IE6)
Usage
- Load jQuery Libary
- You can directly add the following code in <head> tag:
<script type="text/javascript" src="jquery..js"></script>
- Load webPrejudice Plugin
- <script type=”text/javascript” src=”jquery.webPrejudice.js”></script>
- Assing the target object
- Use it inside jQuery(document).ready() block:
jQuery.webPrejudice();
You can, of course , apply some change, customizing the xml path and target browser:
jQuery.webPrejudice({ loc: "pathtoxml/set.xml", target: "opera" })Codes above will using the language settings in set.xml and the plugin will help you persuade visitors to drop out Opera and use another browser.
- XML Preferrence File
- By default, all lines are English, you can localize this plugin by creating XML Preferrence File in your own language. Open default.xml and edit it following the structure of this sample xml. The links of browsers downloading page are also in this xml file.
Change Log
You can always refer to jQuery Plugin to trace the builds.
- 1.0.0 First Edition
需求
- jQuery脚本库,你可以从 jQuery Official官方站点下载
- webPrejudice脚本文件
- 一点点关于xhtml,css,js的知识
功能
这个插件会自动检查浏览者使用的浏览器类型和版本,如果浏览者使用了太古老的浏览器或者你设置的浏览器(当然是你讨厌的浏览器),该插件显示出一个交互窗口,推荐浏览者更换浏览器。
你可以手动设置你想鄙视的浏览器类型,这个插件会帮助你告诉浏览者这个浏览器是多么的差,而其他的浏览器则更优秀!
目前总共有三个可选参数:
- disable 如果你想禁用插件,设置该值为”true”。如果你想正常使用该插件,请不要使用这个参数。
- loc XML设置文件的地址,这个XML文件内部存储着各种设置。
- target 你想要鄙视的浏览器,你可以从 “ie6″,”ie7,”ie8″,”safari”,”mozilla”,”opera”这些浏览器里面选. 默认的是”ie6″,我相信大多数都同意我的这个决定。
用法
- 加载jQuery脚本库
- 在 <head> 标签内部加入如下代码:
<script type="text/javascript" src="jquery..js"></script>
- 加载webPrejudice插件
- <script type=”text/javascript” src=”jquery.webPrejudice.js”></script>
- 运用插件
- 在jQuery(document).ready()内部加入语句:
jQuery.webPrejudice();
你可以添加一些参数:
jQuery.webPrejudice({ loc: "pathtoxml/set.xml", target: "opera" })这样设置的话,该插件会加载set.xml文件,并会帮助你一起鄙视Opera浏览器
- XML配置文件
- 默认状态下,插件里面的所有语言都是英文。打开default.xml,根据里面的结构替换相应的内容,你就可以订制一套符合你的语言的配置文件了。
wP.rar (4.1 KiB, 10 hits)







![[F5] Brisbane and Gold Coast Web Design, Development, Illustration and more... (20100729)](http://farm5.static.flickr.com/4120/4874414037_b26e7875d6_s.jpg)
4 Comments
wow, how wrong can you be… I agree with you regarding Safari and Opera, the rest is the other way around. IE6 and 7 don’t follow W3C standards, while FF does.
IE8 will follow W3C standards, and you’ll see many websites that look ok in IE6 and 7 will be broken in IE8, just because IE8 is compliant and the previous versions are not.
http://www.webstandards.org/action/acid2/
I am not a FF fan, but think it is a lot better than IE.
Best wishes!
Alex
大哥……那个图片是个例子……这个插件不针对任何浏览器,完全可以根据你自己的意思选择想要抵制的浏览器……
只是默认设置到了IE6……
以防萬一你不知道..
上面那個不是我喔 ><
你……人格分裂……?!
One Trackback
jQuery webPrejudice Plugin…
I believe most developers have been experiencing compatiblity issues with so-called popular brwosers. I know you have spent lots of time fixing pages to grace all browsers. So have I. I feel distressed, exhausted when finishing tweaking. The last words…