Update DOM events documentation

pull/129/head
Thibaut 11 years ago
parent 10b4f445f7
commit d6168cf7ab

@ -16,7 +16,7 @@ module Docs
# Remove events we don't want
css('tr').each do |tr|
if td = tr.at_css('td:nth-child(3)')
tr.remove if td.content =~ /IndexedDB|Media|Audio|SVG|Battery|Gamepad|Sensor/i
tr.remove if td.content =~ /SVG|Battery|Gamepad|Sensor/i
end
end
end

@ -7,8 +7,11 @@ module Docs
'CSS' => 'CSS',
'Drag' => 'Drag & Drop',
'Focus' => 'Focus',
'Fullscreen' => 'Fullscreen',
'HashChange' => 'History',
'IndexedDB' => 'IndexedDB',
'Keyboard' => 'Keyboard',
'edia' => 'Media',
'Mouse' => 'Mouse',
'Offline' => 'Offline',
'Orientation' => 'Device',
@ -24,6 +27,7 @@ module Docs
'Transition' => 'CSS',
'PageTransition' => 'History',
'WebSocket' => 'WebSocket',
'Web Audio' => 'Web Audio',
'Web Messaging' => 'Web Messaging',
'Wheel' => 'Mouse',
'Worker' => 'Web Workers' }
@ -33,8 +37,8 @@ module Docs
LOAD_SLUGS = %w(abort beforeunload DOMContentLoaded error load
readystatechange unload)
APPEND_TYPE = %w(Application\ Cache Progress Server\ Sent\ Events
WebSocket Web\ Messaging Web\ Workers)
APPEND_TYPE = %w(Application\ Cache IndexedDB Progress
Server\ Sent\ Events WebSocket Web\ Messaging Web\ Workers)
def get_name
name = super.split.first

@ -2,7 +2,7 @@ module Docs
class DomEvents < Mdn
self.name = 'DOM Events'
self.slug = 'dom_events'
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/Reference/Events'
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/Events'
html_filters.insert_after 'clean_html', 'dom_events/clean_html'
html_filters.push 'dom_events/entries', 'title'
@ -11,6 +11,7 @@ module Docs
options[:fix_urls] = ->(url) do
url.sub! 'https://developer.mozilla.org/en-US/Mozilla_event_reference', DomEvents.base_url
url.sub! 'https://developer.mozilla.org/en-US/docs/Mozilla_event_reference', DomEvents.base_url
url.sub! 'https://developer.mozilla.org/en-US/docs/Web/Reference/Events', DomEvents.base_url
url
end
end

Loading…
Cancel
Save