Skip to content

Commit

Permalink
tooltip docs are now shown for h2-h6.
Browse files Browse the repository at this point in the history
  • Loading branch information
toolness committed Apr 6, 2012
1 parent f77e38b commit b5937b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions static-files/easy-remix-dialog/index.html
Expand Up @@ -254,9 +254,14 @@ <h2 data-l10n="rendering-header">Preview</h2>
function addDocumentation(rendered) {
var BASE_MDN_HTML_URL = "https://developer.mozilla.org/en/HTML/";
var BASE_MDN_HTML_ELEM_URL = BASE_MDN_HTML_URL + "Element/";

function getElementDocs() {
var keyName = "html-element-docs:" + $(this).text();
var elementName = $(this).text();

if (elementName.match(/^h[1-6]$/))
elementName = "h1";

var keyName = "html-element-docs:" + elementName;
if (jQuery.locale.has(keyName))
return jQuery.locale.get(keyName);
return "";
Expand Down
2 changes: 1 addition & 1 deletion static-files/easy-remix-dialog/sample.html
Expand Up @@ -18,7 +18,7 @@
<h1>Sample Remix HTML</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<div id="sample">
<p>Here is starting <em>HTML</em>.</p>
<h5>Here is starting <em>HTML</em>.</h5>
<img src="../github-ribbon.png"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<ul class="sample-list" id="sample-id">
<li class="areallyreallyreallyreallyreallyridiculouslylongclassname">List item one</li>
Expand Down

0 comments on commit b5937b4

Please sign in to comment.