mirror of
https://github.com/larstvei/SMT-for-IN3070.git
synced 2024-11-26 03:28:31 +00:00
17 lines
531 B
JavaScript
17 lines
531 B
JavaScript
function blurPython() {
|
|
blocksToBlur = document.getElementsByClassName('src-python');
|
|
// Note: Skipping the two first code blocks
|
|
for (var i = 1; i < blocksToBlur.length; i++) {
|
|
const block = blocksToBlur[i]
|
|
block.setAttribute("style", "cursor: pointer;");
|
|
block.classList.toggle("blur");
|
|
block.addEventListener("click", function () {
|
|
block.classList.toggle("blur");
|
|
});
|
|
}
|
|
}
|
|
|
|
document.addEventListener('DOMContentLoaded', function(){
|
|
blurPython();
|
|
}, false);
|