Commit 2c5fb5e7 authored by Łukasz Nowak's avatar Łukasz Nowak

Add hashchange plugin.

It allows to work on hashchanges on unsupported browsers.
parent a183a3a3
......@@ -53,6 +53,7 @@
<value> <string># This script returns an iterable of the paths to standard JavaScript objects.\n
\n
return (\'jquery/core/jquery.js\',\n
\'vifib_hosting_js/jquery.ba-hashchange.min.js\',\n
\'vifib_hosting_js/vifib_hosting.js\',\n
\'vifib_hosting_js/slap.js\',\n
\'vifib_hosting_js/vifib.js\',\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts21364347.26</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>jquery.ba-hashchange.min.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*\n
* jQuery hashchange event - v1.3 - 7/21/2010\n
* http://benalman.com/projects/jquery-hashchange-plugin/\n
* \n
* Copyright (c) 2010 "Cowboy" Ben Alman\n
* Dual licensed under the MIT and GPL licenses.\n
* http://benalman.com/about/license/\n
*/\n
(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(\'<iframe tabindex="-1" title="empty"/>\').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write(\'<script>document.domain="\'+t+\'"<\\/script>\');u.close();q.location.hash=v}}})();return j})()})(jQuery,this);
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1526</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
322
\ No newline at end of file
323
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment