This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cssLoaded(href) { | |
var cssFound = false; | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
sheet = document.styleSheets[i]; | |
if (sheet['href'].indexOf(href) >= 0 && sheet['cssRules'].length > 0) { | |
cssFound = true; | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function codeRunner(){ | |
var cb = document.getElementById("checkbox"), ppab = document.getElementById("ppa-box"); // checkbox is used twice, no need to select it twice. Same for ppa-box (referenced three times, called twice) | |
// Unlock PPA when Checkbox is ticked | |
cb.onclick = function(){ | |
if(cb.checked){ | |
ppab.disabled=false; | |
} | |
else | |
{ | |
ppab.disabled=true; |