Fixes #719.
Unified · Split
| @@ -7,8 +7,8 @@ module Docs · 6 unmodified lines | |||
| 7 | 'CSS_Columns' => 'Multi-column Layout', | 7 | 'CSS_Columns' => 'Multi-column Layout', |
| 8 | 'CSS_Flexible_Box_Layout' => 'Flexible Box Layout', | 8 | 'CSS_Flexible_Box_Layout' => 'Flexible Box Layout', |
| 9 | 'CSS_Grid_Layout' => 'Grid Layout', | 9 | 'CSS_Grid_Layout' => 'Grid Layout', |
| 10 | 'CSS_Images' => 'Image Values', | 10 | 'CSS_Images' => 'Images', |
| 11 | 'CSS_Lists_and_Counters' => 'Lists & Counters', | 11 | 'CSS_Lists_and_Counters' => 'Lists', |
| 12 | 'CSS_Transforms' => 'Transforms', | 12 | 'CSS_Transforms' => 'Transforms', |
| 13 | 'Media_Queries' => 'Media Queries', | 13 | 'Media_Queries' => 'Media Queries', |
| 14 | 'transform-function' => 'Transforms', | 14 | 'transform-function' => 'Transforms', |
| @@ -34,7 +34,7 @@ module Docs · 19 unmodified lines | |||
| 34 | "#{super}()" | 34 | "#{super}()" |
| 35 | elsif slug =~ /\A[a-z]+_/i | 35 | elsif slug =~ /\A[a-z]+_/i |
| 36 | slug.to_s.gsub('_', ' ').gsub('/', ': ') | 36 | slug.to_s.gsub('_', ' ').gsub('/', ': ') |
| 37 | elsif slug.start_with?('transform-function') | 37 | elsif slug.start_with?('transform-function') || slug.start_with?('filter-function') |
| 38 | slug.split('/').last + '()' | 38 | slug.split('/').last + '()' |
| 39 | else | 39 | else |
| 40 | super | 40 | super |
| @@ -74,9 +74,10 @@ module Docs · 33 unmodified lines | |||
| 74 | 'spec-Living' => 0, | 74 | 'spec-Living' => 0, |
| 75 | 'spec-REC' => 1, | 75 | 'spec-REC' => 1, |
| 76 | 'spec-CR' => 2, | 76 | 'spec-CR' => 2, |
| 77 | 'spec-LC' => 3, | 77 | 'spec-PR' => 3, |
| 78 | 'spec-WD' => 4, | 78 | 'spec-LC' => 4, |
| 79 | 'spec-ED' => 5 | 79 | 'spec-WD' => 5, |
| 80 | 'spec-ED' => 6 | ||
| 80 | } | 81 | } |
| 81 | 82 | ||
| 82 | PRIORITY_STATUSES = %w(spec-REC spec-CR) | 83 | PRIORITY_STATUSES = %w(spec-REC spec-CR) |
| @@ -89,6 +90,8 @@ module Docs · 6 unmodified lines | |||
| 89 | specs.map! { |node| [node.at_css('> td:nth-child(1) > a'), node.at_css('> td:nth-child(2) > span')] } | 90 | specs.map! { |node| [node.at_css('> td:nth-child(1) > a'), node.at_css('> td:nth-child(2) > span')] } |
| 90 | # ignore non-CSS specs | 91 | # ignore non-CSS specs |
| 91 | specs.select! { |pair| pair.first && pair.first['href'] =~ /css|fxtf|fullscreen|svg/i && !pair.first['href'].include?('compat.spec') } | 92 | specs.select! { |pair| pair.first && pair.first['href'] =~ /css|fxtf|fullscreen|svg/i && !pair.first['href'].include?('compat.spec') } |
| 93 | # ignore specs with no status | ||
| 94 | specs.select! { |pair| pair.second } | ||
| 92 | # ["Spec", "spec-REC"] | 95 | # ["Spec", "spec-REC"] |
| 93 | specs.map! { |pair| [pair.first.child.content, pair.second['class']] } | 96 | specs.map! { |pair| [pair.first.child.content, pair.second['class']] } |
| 94 | # sort by status | 97 | # sort by status |
| @@ -10,6 +10,7 @@ module Docs · 9 unmodified lines | |||
| 10 | 'Audio' => 'Audio', | 10 | 'Audio' => 'Audio', |
| 11 | 'Battery Status' => 'Battery Status', | 11 | 'Battery Status' => 'Battery Status', |
| 12 | 'Canvas ' => 'Canvas', | 12 | 'Canvas ' => 'Canvas', |
| 13 | 'Clipboard' => 'Clipboard', | ||
| 13 | 'Cooperative Scheduling' => 'Scheduling', | 14 | 'Cooperative Scheduling' => 'Scheduling', |
| 14 | 'CSS Font Loading' => 'CSS', | 15 | 'CSS Font Loading' => 'CSS', |
| 15 | 'CSS Object Model' => 'CSS', | 16 | 'CSS Object Model' => 'CSS', |
| @@ -45,6 +46,7 @@ module Docs · 29 unmodified lines | |||
| 45 | 'Stream API' => 'Media Streams', | 46 | 'Stream API' => 'Media Streams', |
| 46 | 'Streams' => 'Media Streams', | 47 | 'Streams' => 'Media Streams', |
| 47 | 'Touch Events' => 'Touch Events', | 48 | 'Touch Events' => 'Touch Events', |
| 49 | 'Visual Viewport' => 'Visual Viewport', | ||
| 48 | 'Web Animations' => 'Animation', | 50 | 'Web Animations' => 'Animation', |
| 49 | 'Web App Manifest' => 'Web App Manifest', | 51 | 'Web App Manifest' => 'Web App Manifest', |
| 50 | 'Budget' => 'Budget', | 52 | 'Budget' => 'Budget', |
| @@ -54,6 +56,8 @@ module Docs · 3 unmodified lines | |||
| 54 | 'WebVR' => 'WebVR' } | 56 | 'WebVR' => 'WebVR' } |
| 55 | 57 | ||
| 56 | TYPE_BY_NAME_STARTS_WITH = { | 58 | TYPE_BY_NAME_STARTS_WITH = { |
| 59 | 'AbortController' => 'Fetch', | ||
| 60 | 'AbortSignal' => 'Fetch', | ||
| 57 | 'Ambient' => 'Ambient Light', | 61 | 'Ambient' => 'Ambient Light', |
| 58 | 'Attr' => 'Nodes', | 62 | 'Attr' => 'Nodes', |
| 59 | 'Audio' => 'Audio', | 63 | 'Audio' => 'Audio', |
| @@ -61,6 +65,7 @@ module Docs · 1 unmodified line | |||
| 61 | 'Broadcast' => 'Broadcast Channel', | 65 | 'Broadcast' => 'Broadcast Channel', |
| 62 | 'Budget' => 'Budget', | 66 | 'Budget' => 'Budget', |
| 63 | 'Canvas' => 'Canvas', | 67 | 'Canvas' => 'Canvas', |
| 68 | 'Clipboard' => 'Clipboard', | ||
| 64 | 'CSS' => 'CSS', | 69 | 'CSS' => 'CSS', |
| 65 | 'CharacterData' => 'Nodes', | 70 | 'CharacterData' => 'Nodes', |
| 66 | 'ChildNode' => 'Nodes', | 71 | 'ChildNode' => 'Nodes', |
| @@ -105,6 +110,7 @@ module Docs · 38 unmodified lines | |||
| 105 | 'screen' => 'Screen', | 110 | 'screen' => 'Screen', |
| 106 | 'Selection' => 'Selection', | 111 | 'Selection' => 'Selection', |
| 107 | 'Shadow' => 'Shadow DOM', | 112 | 'Shadow' => 'Shadow DOM', |
| 113 | 'Streams' => 'Media Streams', | ||
| 108 | 'StyleSheet' => 'CSS', | 114 | 'StyleSheet' => 'CSS', |
| 109 | 'Stylesheet' => 'CSS', | 115 | 'Stylesheet' => 'CSS', |
| 110 | 'SVG' => 'SVG', | 116 | 'SVG' => 'SVG', |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | |||
| 2 | class Javascript | 2 | class Javascript |
| 3 | class EntriesFilter < Docs::EntriesFilter | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | TYPES = %w(Array ArrayBuffer Atomics Boolean DataView Date Function | 4 | TYPES = %w(Array ArrayBuffer Atomics Boolean DataView Date Function |
| 5 | Generator Intl JSON Map Math Number Object Promise Reflect RegExp | 5 | Generator Intl JSON Map Math Number Object PluralRules Promise Reflect RegExp |
| 6 | Set SharedArrayBuffer SIMD String Symbol TypedArray WeakMap WeakSet) | 6 | Set SharedArrayBuffer SIMD String Symbol TypedArray WeakMap WeakSet) |
| 7 | INTL_OBJECTS = %w(Collator DateTimeFormat NumberFormat) | 7 | INTL_OBJECTS = %w(Collator DateTimeFormat NumberFormat) |
| 8 | 8 | ||
| @@ -11,6 +11,7 @@ module Docs · 10 unmodified lines | |||
| 11 | options[:title] = ->(filter) { filter.current_url.host == 'tools.ietf.org' ? false : filter.default_title } | 11 | options[:title] = ->(filter) { filter.current_url.host == 'tools.ietf.org' ? false : filter.default_title } |
| 12 | options[:container] = ->(filter) { filter.current_url.host == 'tools.ietf.org' ? '.content' : nil } | 12 | options[:container] = ->(filter) { filter.current_url.host == 'tools.ietf.org' ? '.content' : nil } |
| 13 | options[:skip_links] = ->(filter) { filter.current_url.host == 'tools.ietf.org' ? true : false } | 13 | options[:skip_links] = ->(filter) { filter.current_url.host == 'tools.ietf.org' ? true : false } |
| 14 | options[:replace_paths] = { '/Access_control_CORS' => '/CORS' } | ||
| 14 | options[:fix_urls] = ->(url) do | 15 | options[:fix_urls] = ->(url) do |
| 15 | url.sub! %r{(Status/\d\d\d)_[A-Z].+}, '\1' | 16 | url.sub! %r{(Status/\d\d\d)_[A-Z].+}, '\1' |
| 16 | url | 17 | url |
| @@ -1,5 +1,7 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class DomEvents < Mdn | 2 | class DomEvents < Mdn |
| 3 | prepend FixInternalUrlsBehavior | ||
| 4 | |||
| 3 | self.name = 'DOM Events' | 5 | self.name = 'DOM Events' |
| 4 | self.slug = 'dom_events' | 6 | self.slug = 'dom_events' |
| 5 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/Events' | 7 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/Events' |
| @@ -9,6 +9,7 @@ module Docs · 8 unmodified lines | |||
| 9 | html_filters.push 'mdn/clean_html' | 9 | html_filters.push 'mdn/clean_html' |
| 10 | text_filters.insert_before 'attribution', 'mdn/contribute_link' | 10 | text_filters.insert_before 'attribution', 'mdn/contribute_link' |
| 11 | 11 | ||
| 12 | options[:rate_limit] = 400 | ||
| 12 | options[:trailing_slash] = false | 13 | options[:trailing_slash] = false |
| 13 | 14 | ||
| 14 | options[:skip_link] = ->(link) { | 15 | options[:skip_link] = ->(link) { |
| @@ -16,7 +17,7 @@ module Docs · 1 unmodified line | |||
| 16 | } | 17 | } |
| 17 | 18 | ||
| 18 | options[:attribution] = <<-HTML | 19 | options[:attribution] = <<-HTML |
| 19 | © 2005–2017 Mozilla Developer Network and individual contributors.<br> | 20 | © 2005–2018 Mozilla Developer Network and individual contributors.<br> |
| 20 | Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later. | 21 | Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later. |
| 21 | HTML | 22 | HTML |
| 22 | 23 | ||