All works

2024Userscript

Blur Canvas Grades

Blurs the grades in Canvas LMS's Recent Feedback panel so classmates can't peek at your screen, and reveals each one while you hover it.

  • JavaScript
  • Tampermonkey

Overview

The home page of our school's Canvas LMS lists your latest grades in a Recent Feedback panel, in plain view of anyone glancing at your screen. This userscript blurs them and unblurs a grade only while your cursor is over it.

Canvas loads its content dynamically, so a MutationObserver re-applies the blur whenever the page changes.

Highlights

  • 3 px of privacy

    Just enough blur to hide a grade at a glance.

  • 0 setup

    Install it in Tampermonkey and it runs on every LMS page.

From the source

Blur Canvas Grades.user.js
const blurGrades = () => {
    const feedbackElements = document.querySelectorAll('.recent_feedback_icon'); // Adjust selector as needed
    feedbackElements.forEach(element => {
        element.style.transition = 'filter 0.2s ease';
        element.style.filter = 'blur(3px)';
        element.addEventListener('mouseover', function() {
            element.style.filter = 'blur(0)';
        });
        element.addEventListener('mouseout', function() {
            element.style.filter = 'blur(3px)';
        });
    });
};

// Mutation observer to handle dynamic content updates
const observer = new MutationObserver(blurGrades);
observer.observe(document.body, { childList: true, subtree: true });

Ready to build something amazing?

I'd love to connect with you!