Skip to content

Commit

Permalink
remove requirement of type=text/css in link elements
Browse files Browse the repository at this point in the history
  • Loading branch information
clawrence1 committed Apr 27, 2011
1 parent 5d82723 commit 066dcc0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions helium.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,10 @@ var helium = {
}

//find link elements on the page
var links = document.querySelectorAll("link[type='text/css'][rel='stylesheet']");

for(var i=0; i<links.length; i++){
//var links = document.querySelectorAll("link[type='text/css'][rel='stylesheet']"); //## failing when type=text/css not being specified
var links = document.querySelectorAll("link[rel='stylesheet']");

for(var i=0; i<links.length; i++){

//get href
var tmplink = links[i].getAttribute('href');
Expand Down Expand Up @@ -417,8 +418,9 @@ var helium = {
helium.nav( helium.data.findinglist );
}else{

//remove duplicates from stylesheets list
helium.data.stylesheets.sort();
//remove duplicates from stylesheets list
helium.data.stylesheets.sort();

for( var i=0; i < helium.data.stylesheets.length-1; i++){
if(helium.data.stylesheets[i] === helium.data.stylesheets[i+1]){
helium.data.stylesheets.splice(i--,1);
Expand Down

0 comments on commit 066dcc0

Please sign in to comment.