Sha256: bed3fc00c534dd48042999c6980e116f099561dee5dd7e982b6f9ade76bd98bb
Contents?: true
Size: 1.07 KB
Versions: 10
Compression:
Stored size: 1.07 KB
Contents
pageflow.links = { setup: function() { this.preventFocusRectOnClick(); this.ensureClickOnEnterKeyPress(); this.setupContentSkipLinks(); this.ensureTargetBlankForContentLinks(); }, preventFocusRectOnClick: function() { $('body').on('click mousedown', 'a, [tabindex]', function() { $(this).blur(); }); }, ensureClickOnEnterKeyPress: function() { $('body').on('keypress', 'a, [tabindex]', function(e) { if (e.which == 13) { $(this).click(); } }); $('body').on('keyup', 'a, [tabindex]', function (e) { e.stopPropagation(); }); }, setupContentSkipLinks: function() { $('.content_link').attr('href', '#firstContent'); $('.content_link').click(function(e) { $('#firstContent').focus(); e.preventDefault(); return false; }); }, // There was a time when the rich text editor did not add target // attributes to inline links even though it should have. ensureTargetBlankForContentLinks: function(context) { $('.contentText p a', context).attr('target', '_blank'); } };
Version data entries
10 entries across 10 versions & 1 rubygems