History

Update MDN documentation

Thibaut Courouble committed 8 years ago

Commit f94dbb01 parent 6aae9eb3 files · +7 −2Browse files

Unified · Split

3 files
  1. lib/docs/filters/css/entries.rb +1 −0
  2. lib/docs/filters/dom/entries.rb +5 −1
  3. lib/docs/scrapers/mdn/mdn.rb +1 −1
lib/docs/filters/css/entries.rb+1−0
@@ -51,6 +51,7 @@ module Docs · 50 unmodified lines
51 type.remove! ' Module'51 type.remove! ' Module'
52 type.remove! %r{ Level \d\z}52 type.remove! %r{ Level \d\z}
53 type.remove! %r{\(.*\)}53 type.remove! %r{\(.*\)}
54 type.remove! %r{ \d\z}
54 type.sub! 'and', '&'55 type.sub! 'and', '&'
55 type.strip!56 type.strip!
56 type = 'Grid Layout' if type.include?('Grid Layout')57 type = 'Grid Layout' if type.include?('Grid Layout')
lib/docs/filters/dom/entries.rb+5−1
@@ -11,6 +11,7 @@ module Docs · 10 unmodified lines
11 'Battery Status' => 'Battery Status',11 'Battery Status' => 'Battery Status',
12 'Canvas ' => 'Canvas',12 'Canvas ' => 'Canvas',
13 'Clipboard' => 'Clipboard',13 'Clipboard' => 'Clipboard',
14 'Content Security' => 'Content Security Policy',
14 'Cooperative Scheduling' => 'Scheduling',15 'Cooperative Scheduling' => 'Scheduling',
15 'CSS Font Loading' => 'CSS',16 'CSS Font Loading' => 'CSS',
16 'CSS Object Model' => 'CSS',17 'CSS Object Model' => 'CSS',
@@ -50,6 +51,7 @@ module Docs · 33 unmodified lines
50 'Web Animations' => 'Animation',51 'Web Animations' => 'Animation',
51 'Web App Manifest' => 'Web App Manifest',52 'Web App Manifest' => 'Web App Manifest',
52 'Budget' => 'Budget',53 'Budget' => 'Budget',
54 'Web Authentication' => 'Authentication',
53 'Web Workers' => 'Web Workers',55 'Web Workers' => 'Web Workers',
54 'WebGL' => 'WebGL',56 'WebGL' => 'WebGL',
55 'WebRTC' => 'WebRTC',57 'WebRTC' => 'WebRTC',
@@ -74,6 +76,7 @@ module Docs · 18 unmodified lines
74 'CustomElement' => 'Custom Elements',76 'CustomElement' => 'Custom Elements',
75 'DataTransfer' => 'Drag & Drop',77 'DataTransfer' => 'Drag & Drop',
76 'document' => 'Document',78 'document' => 'Document',
79 'Document Object' => 'DOM',
77 'DocumentFragment' => 'DocumentFragment',80 'DocumentFragment' => 'DocumentFragment',
78 'DocumentType' => 'Nodes',81 'DocumentType' => 'Nodes',
79 'DOM' => 'DOM',82 'DOM' => 'DOM',
@@ -110,6 +113,7 @@ module Docs · 30 unmodified lines
110 'screen' => 'Screen',113 'screen' => 'Screen',
111 'Selection' => 'Selection',114 'Selection' => 'Selection',
112 'Shadow' => 'Shadow DOM',115 'Shadow' => 'Shadow DOM',
116 'StaticRange' => 'Range',
113 'Streams' => 'Media Streams',117 'Streams' => 'Media Streams',
114 'StyleSheet' => 'CSS',118 'StyleSheet' => 'CSS',
115 'Stylesheet' => 'CSS',119 'Stylesheet' => 'CSS',
@@ -170,7 +174,6 @@ module Docs · 54 unmodified lines
170 174
171 CLEANUP_NAMES = %w(175 CLEANUP_NAMES = %w(
172 CSS\ Object\ Model.176 CSS\ Object\ Model.
173 Document\ Object\ Model.
174 Tutorial.177 Tutorial.
175 XMLHttpRequest.178 XMLHttpRequest.
176 ANGLE\ instanced\ arrays.)179 ANGLE\ instanced\ arrays.)
@@ -178,6 +181,7 @@ module Docs · 1 unmodified line
178 def get_name181 def get_name
179 name = super182 name = super
180 CLEANUP_NAMES.each { |str| name.remove!(str) }183 CLEANUP_NAMES.each { |str| name.remove!(str) }
184 name.sub! %r{Document\ Object\ Model\.}i, 'Document Object Model: '
181 name.sub! 'Input.', 'HTMLInputElement.'185 name.sub! 'Input.', 'HTMLInputElement.'
182 name.sub! 'window.navigator', 'navigator'186 name.sub! 'window.navigator', 'navigator'
183 name.sub! 'API.', 'API: '187 name.sub! 'API.', 'API: '
lib/docs/scrapers/mdn/mdn.rb+1−1
@@ -9,7 +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] = 40012 options[:rate_limit] = 200
13 options[:trailing_slash] = false13 options[:trailing_slash] = false
14 14
15 options[:skip_link] = ->(link) {15 options[:skip_link] = ->(link) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t