Direct link to script: https://github.com/MosheBerman/MinimalOverflow/blob/master/styleswitcher.user.js
I downloaded a script from https://stackapps.com/questions/2143/minimaloverflow-a-themescript-for-stack-exchange and drag and dropped the *.user.js file into my extensions tab in Chrome. The script runs, which I verified by using an alert
. I even alert
ed the href
attribute in the script to verify that it was changing it properly.
However whenever the script changes the CSS, there is no styling applied:
Essentially the code looks for the link
tag and changes the href
attribute.
line 64
function switchToStylesheet(sheet){
for(var i=0; i<linkElements.length; i++){
if(linkElements[i].getAttribute("rel") == "stylesheet"){
//apply the new stylesheet
linkElements[i].href = sheet;
alert(linksElements[i].href);
// shows https://github.com/MosheBerman/MinimalOverflow/raw/master/clean.css as expected
//We only want to replace the first stylesheet, so return.
//If SO decides to change any styles, just put it in a
//second stylesheet and link tag. The script should safely ignore it.
return;
}
}
}
I have Version 25.0.1364.152
And I'm running Windows 7 64-bit
Can anyone verify if this is a Chrome
, Javascript
, or Userscript
issue?