Closes #476.
Unified · Split
| @@ -22,9 +22,11 @@ · 21 unmodified lines | ||
| 22 | 22 | |
| 23 | 23 | > h2 { @extend %block-heading; } |
| 24 | 24 | > h3 { @extend %block-label, %label-blue; } |
| 25 | + > h4 { font-size: 1em; } | |
| 25 | 26 | |
| 26 | 27 | > .note, |
| 27 | 28 | .notice, |
| 29 | + .warning, | |
| 28 | 30 | .overheadIndicator, |
| 29 | 31 | .syntaxbox, // CSS, JavaScript |
| 30 | 32 | .twopartsyntaxbox, // CSS |
| @@ -33,6 +35,8 @@ · 2 unmodified lines | ||
| 33 | 35 | @extend %note; |
| 34 | 36 | } |
| 35 | 37 | |
| 38 | + .warning { @extend %note-red; } | |
| 39 | + | |
| 36 | 40 | > .note { |
| 37 | 41 | em { |
| 38 | 42 | font-style: normal; |
| @@ -12,6 +12,10 @@ module Docs · 11 unmodified lines | ||
| 12 | 12 | end |
| 13 | 13 | |
| 14 | 14 | def other |
| 15 | + css('.syntaxbox > .syntaxbox').each do |node| | |
| 16 | + node.parent.before(node.parent.children).remove | |
| 17 | + end | |
| 18 | + | |
| 15 | 19 | # Remove "|" and "||" links in syntax box (e.g. animation, all, etc.) |
| 16 | 20 | css('.syntaxbox', '.twopartsyntaxbox').css('a').each do |node| |
| 17 | 21 | if node.content == '|' || node.content == '||' |
| @@ -42,7 +42,9 @@ module Docs · 41 unmodified lines | ||
| 42 | 42 | end |
| 43 | 43 | |
| 44 | 44 | def get_type |
| 45 | − if type = TYPE_BY_PATH[slug.split('/').first] | |
| 45 | + if slug.include?('-webkit') || slug.include?('-moz') | |
| 46 | + 'Extensions' | |
| 47 | + elsif type = TYPE_BY_PATH[slug.split('/').first] | |
| 46 | 48 | type |
| 47 | 49 | elsif type = get_spec |
| 48 | 50 | type.remove! 'CSS ' |
| @@ -123,6 +125,11 @@ module Docs · 74 unmodified lines | ||
| 123 | 125 | def additional_entries |
| 124 | 126 | ADDITIONAL_ENTRIES[slug] || [] |
| 125 | 127 | end |
| 128 | + | |
| 129 | + def include_default_entry? | |
| 130 | + return true unless warning = at_css('.warning').try(:content) | |
| 131 | + !warning.include?('CSS Flexible Box') && !warning.include?('replaced in newer drafts') | |
| 132 | + end | |
| 126 | 133 | end |
| 127 | 134 | end |
| 128 | 135 | end |
| @@ -23,9 +23,10 @@ module Docs · 22 unmodified lines | ||
| 23 | 23 | 'Intersection' => 'Intersection Observer', |
| 24 | 24 | 'Media Capture' => 'Media', |
| 25 | 25 | 'Media Source' => 'Media', |
| 26 | − 'MediaStream' => 'Stream', | |
| 26 | + 'MediaStream' => 'Media Streams', | |
| 27 | 27 | 'Navigation Timing' => 'Web Performance', |
| 28 | 28 | 'Network Information' => 'Network Information', |
| 29 | + 'Payment Request' => 'Payment Request', | |
| 29 | 30 | 'Performance Timeline' => 'Web Performance', |
| 30 | 31 | 'Pointer Events' => 'Pointer Events', |
| 31 | 32 | 'Push API' => 'Push', |
| @@ -33,7 +34,8 @@ module Docs · 1 unmodified line | ||
| 33 | 34 | 'Shadow DOM' => 'Shadow DOM', |
| 34 | 35 | 'Server-Sent Events' => 'Server-Sent Events', |
| 35 | 36 | 'Service Workers' => 'Service Workers', |
| 36 | − 'Stream API' => 'Stream', | |
| 37 | + 'Stream API' => 'Media Streams', | |
| 38 | + 'Streams' => 'Media Streams', | |
| 37 | 39 | 'Touch Events' => 'Touch Events', |
| 38 | 40 | 'Web Animations' => 'Animation', |
| 39 | 41 | 'Web App Manifest' => 'Web App Manifest', |
| @@ -71,6 +73,7 @@ module Docs · 31 unmodified lines | ||
| 71 | 73 | 'location' => 'Location', |
| 72 | 74 | 'navigator' => 'Navigator', |
| 73 | 75 | 'MediaQuery' => 'MediaQuery', |
| 76 | + 'MediaTrack' => 'Media Streams', | |
| 74 | 77 | 'Node' => 'Node', |
| 75 | 78 | 'Notification' => 'Notification', |
| 76 | 79 | 'OffscreenCanvas' => 'Canvas', |
| @@ -108,7 +111,8 @@ module Docs · 31 unmodified lines | ||
| 108 | 111 | 'ImageData' => 'Canvas', |
| 109 | 112 | 'IndexedDB' => 'IndexedDB', |
| 110 | 113 | 'Media Source' => 'Media', |
| 111 | − 'MediaStream' => 'Stream', | |
| 114 | + 'MediaStream' => 'Media Streams', | |
| 115 | + 'Media Streams' => 'Media Streams', | |
| 112 | 116 | 'NodeList' => 'Node', |
| 113 | 117 | 'Path2D' => 'Canvas', |
| 114 | 118 | 'Pointer' => 'Pointer Events', |
| @@ -7,11 +7,8 @@ module Docs · 6 unmodified lines | ||
| 7 | 7 | end |
| 8 | 8 | |
| 9 | 9 | def root |
| 10 | − # Remove parapraph mentioning non-standard events | |
| 11 | − at_css('#Standard_events').previous_element.remove | |
| 12 | − | |
| 13 | 10 | # Remove everything after "Standard events" |
| 14 | − css('.standard-table ~ *').remove | |
| 11 | + css('#Non-standard_events', '#Non-standard_events ~ *').remove | |
| 15 | 12 | |
| 16 | 13 | # Remove events we don't want |
| 17 | 14 | css('tr').each do |tr| |
| @@ -4,6 +4,7 @@ module Docs · 3 unmodified lines | ||
| 4 | 4 | TYPE_BY_INFO = { |
| 5 | 5 | 'applicationCache' => 'Application Cache', |
| 6 | 6 | 'Battery' => 'Battery', |
| 7 | + 'Call' => 'Telephony', | |
| 7 | 8 | 'Clipboard' => 'Clipboard', |
| 8 | 9 | 'CSS' => 'CSS', |
| 9 | 10 | 'Drag' => 'Drag & Drop', |
| @@ -27,6 +28,7 @@ module Docs · 17 unmodified lines | ||
| 27 | 28 | 'Push' => 'Push', |
| 28 | 29 | 'Progress' => 'Progress', |
| 29 | 30 | 'Proximity' => 'Device', |
| 31 | + 'Selection' => 'Selection', | |
| 30 | 32 | 'Server Sent' => 'Server Sent Events', |
| 31 | 33 | 'Speech' => 'Web Speech', |
| 32 | 34 | 'Storage' => 'Web Storage', |
| @@ -37,6 +39,7 @@ module Docs · 4 unmodified lines | ||
| 37 | 39 | 'Web App Manifest' => 'Web App Manifest', |
| 38 | 40 | 'Web Audio' => 'Web Audio', |
| 39 | 41 | 'Web Messaging' => 'Web Messaging', |
| 42 | + 'WebGL' => 'WebGL', | |
| 40 | 43 | 'WebRTC' => 'WebRTC', |
| 41 | 44 | 'WebVR' => 'WebVR', |
| 42 | 45 | 'Wheel' => 'Mouse', |
| @@ -47,7 +50,7 @@ module Docs · 4 unmodified lines | ||
| 47 | 50 | LOAD_SLUGS = %w(abort beforeunload DOMContentLoaded error load |
| 48 | 51 | readystatechange unload) |
| 49 | 52 | |
| 50 | − APPEND_TYPE = %w(Application\ Cache IndexedDB Progress | |
| 53 | + APPEND_TYPE = %w(Application\ Cache IndexedDB Progress Telephony | |
| 51 | 54 | Server\ Sent\ Events WebSocket Web\ Messaging Web\ Workers) |
| 52 | 55 | |
| 53 | 56 | def get_name |
| @@ -62,10 +65,9 @@ module Docs · 8 unmodified lines | ||
| 62 | 65 | elsif LOAD_SLUGS.include?(slug) |
| 63 | 66 | 'Load' |
| 64 | 67 | else |
| 65 | − if info = at_css('.eventinfo, .properties').try(:content) | |
| 66 | − TYPE_BY_INFO.each_pair do |key, value| | |
| 67 | − return value if info.include?(key) | |
| 68 | − end | |
| 68 | + info = css('.eventinfo, .properties, .standard-table').map(&:content).join | |
| 69 | + TYPE_BY_INFO.each_pair do |key, value| | |
| 70 | + return value if info.include?(key) | |
| 69 | 71 | end |
| 70 | 72 | |
| 71 | 73 | 'Miscellaneous' |
| @@ -73,7 +75,11 @@ module Docs · 1 unmodified line | ||
| 73 | 75 | end |
| 74 | 76 | |
| 75 | 77 | def include_default_entry? |
| 76 | − !doc.content.include?('Firefox OS specific') | |
| 78 | + content = doc.content | |
| 79 | + !content.include?('Firefox OS specific') && | |
| 80 | + !content.include?('Addons specific') && | |
| 81 | + !content.include?('Mozilla specific') && | |
| 82 | + content !~ /Specification\s+XUL/ | |
| 77 | 83 | end |
| 78 | 84 | end |
| 79 | 85 | end |
| @@ -21,7 +21,7 @@ module Docs · 20 unmodified lines | ||
| 21 | 21 | node.name = 'th' |
| 22 | 22 | end |
| 23 | 23 | |
| 24 | − css('nobr', 'span[style*="font"]', 'pre code').each do |node| | |
| 24 | + css('nobr', 'span[style*="font"]', 'pre code', 'h2 strong').each do |node| | |
| 25 | 25 | node.before(node.children).remove |
| 26 | 26 | end |
| 27 | 27 | |
| @@ -10,7 +10,7 @@ module Docs · 9 unmodified lines | ||
| 10 | 10 | |
| 11 | 11 | options[:skip] = %w(/CSS3 /Media/Visual /paged_media) |
| 12 | 12 | options[:skip] += %w(/mq-boolean /single-transition-timing-function) # bug |
| 13 | − options[:skip_patterns] = [/\-webkit/, /\-moz/, /Extensions/, /Tools/] | |
| 13 | + options[:skip_patterns] = [/Extensions/, /Tools/, /@media\/-webkit/, /webkit-mask/, /-moz-system-metric/] | |
| 14 | 14 | |
| 15 | 15 | options[:replace_paths] = { |
| 16 | 16 | '/%3Cbasic-shape%3E' => '/basic-shape', |
| @@ -18,7 +18,8 @@ module Docs · 1 unmodified line | ||
| 18 | 18 | '/range' => '/@counter-style/range', |
| 19 | 19 | '/symbols' => '/@counter-style/symbols', |
| 20 | 20 | '/system' => '/@counter-style/system', |
| 21 | − '/var' => '/var()' | |
| 21 | + '/var' => '/var()', | |
| 22 | + '/Flexbox' => '/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes' | |
| 22 | 23 | } |
| 23 | 24 | |
| 24 | 25 | options[:fix_urls] = ->(url) do |