Fixes getTabs() in readme.html to work on IE 11

d.innerHTML returns `<li class="Tab" id="MoreTab" ...` on IE 11, while
the regex expects `<li id="MoreTab" ...` It seems like IE is changing
the order of the attributes within the tags.
This commit is contained in:
Christian Taube 2014-10-29 22:51:30 +00:00
parent a2610427b9
commit eadf68d3c3

View File

@ -815,10 +815,10 @@ echo $data->longurl;</tt></pre>
// Dynamically get tabs
function getTabs() {
var d = document.getElementById('Tabs');
var matches = d.innerHTML.match(/<li id="(.+?)Tab"/g);
var matches = d.innerHTML.match(/<li.* id="(.+?)Tab"/g);
var tabs = []
for (i in matches) {
tabs[i]= matches[i].replace('<li id="','').replace('Tab"', '');
tabs[i]= matches[i].replace(/<li.* id="/,'').replace('Tab"', '');
}
tabs = tabs.reverse();
return (tabs)