Update DOM documentation

pull/29/head
Thibaut 11 years ago
parent 33bf960846
commit 40c1dda27d

@ -20,7 +20,12 @@ module Docs
# Remove double heading on SVG pages # Remove double heading on SVG pages
if slug.start_with? 'SVG' if slug.start_with? 'SVG'
at_css('h2:first-child').try(:remove) at_css('h2:first-child').try :remove
end
# Remove <div> wrapping .overheadIndicator
css('div > .overheadIndicator:first-child:last-child').each do |node|
node.parent.replace(node)
end end
end end
end end

@ -104,13 +104,9 @@ module Docs
end end
def include_default_entry? def include_default_entry?
if (node = at_css('.obsolete', '.deprecated')) && !(node = doc.at_css '.overheadIndicator') ||
(node.inner_html.include?('removed from the Web') || !node.content.include?('not on a standards track') &&
node.inner_html.include?('Try to avoid using it')) !node.content.include?('removed from the Web')
false
else
true
end
end end
end end
end end

@ -68,6 +68,7 @@ module Docs
/\A\/navigator\.id/i, /\A\/navigator\.id/i,
/\A\/Settings/, /\A\/Settings/,
/\A\/Telephony/, /\A\/Telephony/,
/\A\/Bluetooth/,
/UserData/, /UserData/,
/\A\/Window\.\w+bar/i] /\A\/Window\.\w+bar/i]

Loading…
Cancel
Save