jquery_core.rb 711 B

123456789101112131415161718192021222324252627282930
  1. module Docs
  2. class JqueryCore < Jquery
  3. self.name = 'jQuery'
  4. self.release = '3.7.1'
  5. self.base_url = 'https://api.jquery.com/'
  6. self.initial_paths = %w(/index/index)
  7. self.links = {
  8. home: 'https://jquery.com/',
  9. code: 'https://github.com/jquery/jquery'
  10. }
  11. html_filters.insert_before 'jquery/clean_html', 'jquery_core/entries'
  12. options[:root_title] = 'jQuery'
  13. options[:fix_urls] = ->(url) do
  14. url.sub! 'http://api.jquery.com/', 'https://api.jquery.com/'
  15. end
  16. options[:skip_patterns] += [
  17. /h\/deferred\.reject/i,
  18. /Selectors\/odd/i,
  19. /index/i
  20. ]
  21. def get_latest_version(opts)
  22. get_npm_version('jquery', opts)
  23. end
  24. end
  25. end