Sha256: 9feadba32a4ff8a030c259570f9acfee864f7248bc9aa22f587f7344eb0b5a58

Contents?: true

Size: 589 Bytes

Versions: 13

Compression:

Stored size: 589 Bytes

Contents

function toggleSource(id) {
  var src = $('#' + id).toggle();
  var isVisible = src.is(':visible');
  $('#l_' + id).html(isVisible ? 'hide' : 'show');
}

window.highlight = function(url) {
  var hash = url.match(/#([^#]+)$/);
  if (hash) {
    var parent = document.querySelector('a[name=' + hash[1] + ']').parentElement;

    parent.classList.add('highlight');

    setTimeout(function() {
      parent.classList.remove('highlight');
    }, 1000);
  }
};

$(function() {
  highlight('#' + location.hash);
  $('.description pre').each(function() {
    hljs.highlightBlock(this);
  });
});

Version data entries

13 entries across 7 versions & 3 rubygems

Version Path
basic_temperature-1.0.0 docs/js/main.js
basic_temperature-0.2.2 docs/js/main.js
sdoc-1.1.0 lib/rdoc/generator/template/rails/resources/js/main.js
nanook-1.0.1 docs/0.7.0/js/main.js
nanook-1.0.1 docs/js/main.js
nanook-1.0.1 docs/0.8.0/js/main.js
nanook-1.0.1 docs/1.0.0/js/main.js
nanook-1.0.0 docs/js/main.js
nanook-1.0.0 docs/0.7.0/js/main.js
nanook-1.0.0 docs/0.8.0/js/main.js
nanook-1.0.0 docs/1.0.0/js/main.js
sdoc-1.0.0 lib/rdoc/generator/template/rails/resources/js/main.js
sdoc-1.0.0.rc3 lib/rdoc/generator/template/rails/resources/js/main.js