close
Attachments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #15: BibPatch.diff

File BibPatch.diff, 1.1 KB (added by Lorenz, 12 years ago)

Proposed fix. P.S.: fathom.js -> fathom.js.go converter seems to be missing

  • fathom.js

     
    180180
    181181                _setupEvents: function() {
    182182                        var self = this;
    183                        
     183                        window.onhashchange = function() {
     184                if(location.hash.length < 2)
     185                    return;
     186                var stripped = location.hash.substr(1);
     187                if(stripped.search(/^\d+$/) != -1) {
     188                    self.gotoSlide($(self.$slides[parseInt(stripped)-1]));
     189                    return;
     190                }
     191
     192                var targetEl = $("a[name="+stripped+"]").add("#"+stripped).get(0);
     193                while(targetEl)
     194                {
     195                    if($(targetEl).hasClass("slide"))
     196                    {
     197                        var slideNo = parseInt($(targetEl).attr('id'))-1;
     198                        self.gotoSlide($(self.$slides[slideNo]));
     199                        return;
     200                    }
     201                    targetEl = targetEl.parentNode;
     202                }
     203
     204            };
    184205                        $document.keydown(function(event) {
    185206                                var key = event.which;
    186207