innerText → textContent
innerText is not supported in Firefox (and probably others). textContent is supported everywhere since IE9. Related to issue #133.
This commit is contained in:
parent
556f2aae0c
commit
7c2f55b225
|
@ -47,7 +47,7 @@ hr.spacing { border: 0; display: block; height: 3mm; }
|
|||
<h2> Your Badge Service </h2>
|
||||
|
||||
<p>
|
||||
<code>http://img.shields.io/badge/<SUBJECT>-<STATUS>-<COLOR>.svg</code>
|
||||
<code><span id="imgUrlPrefix">http://img.shields.io/badge/</span><SUBJECT>-<STATUS>-<COLOR>.svg</code>
|
||||
</p><p>
|
||||
Dashes <code>--</code> → <code>-</code> Dash <br/>
|
||||
Underscores <code>__</code> → <code>_</code> Underscore <br/>
|
||||
|
@ -170,7 +170,7 @@ And tell us, we might be able to bring it to you anyway!
|
|||
<p>
|
||||
<a href='https://github.com/h5bp/lazyweb-requests/issues/150'>This</a>.<br/>
|
||||
All the activity and the code sits
|
||||
<a href='https://github.com/badges/gh-badges'>here</a>.
|
||||
<a href='https://github.com/badges/shields'>here</a>.
|
||||
</p>
|
||||
|
||||
<h2> Contributors </h2>
|
||||
|
@ -231,7 +231,7 @@ function escapeField(s) {
|
|||
return s.replace(/-/g, '--').replace(/_/g, '__');
|
||||
}
|
||||
function makeImage() {
|
||||
var url = '/badge/';
|
||||
var url = document.getElementById('imgUrlPrefix').textContent;
|
||||
url += escapeField(imageMaker.subject.value);
|
||||
url += '-' + escapeField(imageMaker.status.value);
|
||||
url += '-' + escapeField(imageMaker.color.value);
|
||||
|
|
2
try.html
2
try.html
|
@ -231,7 +231,7 @@ function escapeField(s) {
|
|||
return s.replace(/-/g, '--').replace(/_/g, '__');
|
||||
}
|
||||
function makeImage() {
|
||||
var url = document.getElementById('imgUrlPrefix').innerText;
|
||||
var url = document.getElementById('imgUrlPrefix').textContent;
|
||||
url += escapeField(imageMaker.subject.value);
|
||||
url += '-' + escapeField(imageMaker.status.value);
|
||||
url += '-' + escapeField(imageMaker.color.value);
|
||||
|
|
Loading…
Reference in New Issue
Block a user