Annoyance Removal Bookmarklets

Two bookmarklets to remove the annoyances with your student labs...

...sorry that I can't remove the teacher.

๐Ÿ“‹ Enable Paste

Remove paste protection from any <textarea> on the page.

Drag this button to your bookmarks bar:

๐Ÿ”‘ Show Secret Codes

Display all session secret and attendance codes in a popup.

Drag this button to your bookmarks bar:
๐Ÿ’ก Tip: To show/hide your bookmark bar press Ctrl+Shift+B on Windows or Cmd+Shift+B on macOS.
Demo Goose Mascot

๐Ÿงช Try the Enable Paste Bookmarklet Out!

How to test the bookmarklet:
  1. Copy some text to your clipboard
  2. Try to paste into the textarea below - it won't work!
  3. Try right-clicking in the textarea - blocked!
  4. Now click the "๐Ÿ“‹ Enable Paste" bookmarklet button above (drag it to your bookmarks bar first, or just click it directly)
  5. Try pasting again - it works!

๐Ÿ“– How to Use

๐Ÿ“‹ Enable Paste
  1. Open the webpage with protected textareas
  2. Click the "๐Ÿ“‹ Enable Paste" bookmarklet in your toolbar
  3. You'll see a green confirmation message
  4. Now you can paste into all textareas!
What it does:
  • Removes paste protection
  • Enables right-click
  • Works on any webpage
๐Ÿ”‘ Show Codes
  1. Open the student assignment page
  2. Click the "๐Ÿ”‘ Show Codes" bookmarklet in your toolbar
  3. A popup will display all codes
  4. Click outside or press Close to dismiss
What it does:
  • Shows SECRET_LIST codes
  • Shows ATT_LIST codes
  • Nice popup overlay

โš™๏ธ Manual Installation

Only needed if you can't drag and drop the buttons above.

๐Ÿ“ How to Manually Install a Bookmarklet:
  1. Chrome/Edge: Press Ctrl+D (or Cmd+D on Mac) to create a new bookmark
  2. Name it (e.g., "๐Ÿ“‹ Enable Paste" or "๐Ÿ”‘ Show Codes")
  3. In the URL field, paste the code from below
  4. Save it to your Bookmarks Bar for easy access
๐Ÿ“‹ Enable Paste Code

Copy this entire code and paste it as the bookmark URL:

javascript:(function(){document.querySelectorAll('textarea').forEach(function(el){el.onpaste=null;el.oncontextmenu=null;el.removeAttribute('onpaste');el.removeAttribute('oncontextmenu');});var d=document.createElement('div');d.innerHTML='โœ“ Paste protection removed from all textareas!';d.style.cssText='position:fixed;top:20px;right:20px;background:#4CAF50;color:white;padding:15px 25px;border-radius:5px;font-size:16px;font-weight:bold;z-index:999999;box-shadow:0 4px 6px rgba(0,0,0,0.3)';document.body.appendChild(d);setTimeout(function(){d.remove()},3000);})();
๐Ÿ”‘ Show Codes Code

Copy this entire code and paste it as the bookmark URL:

๐Ÿ’ป Readable Code

    // Version: v1.202510.02
    (function() {
    // Find all textareas on the page
    document.querySelectorAll('textarea').forEach(function(el) {
        // Remove paste protection
        el.onpaste = null;
        el.oncontextmenu = null;
        el.removeAttribute('onpaste');
        el.removeAttribute('oncontextmenu');
    });

    // Show confirmation message
    var div = document.createElement('div');
    div.innerHTML = 'โœ“ Paste protection removed from all textareas!';
    div.style.cssText = 'position:fixed;top:20px;right:20px;background:#4CAF50;' +
                        'color:white;padding:15px 25px;border-radius:5px;' +
                        'font-size:16px;font-weight:bold;z-index:999999;' +
                        'box-shadow:0 4px 6px rgba(0,0,0,0.3)';
    document.body.appendChild(div);

    // Remove message after 3 seconds
    setTimeout(function() {
        div.remove();
    }, 3000);
})();
    // Version: v1.202510.07
    (function() {
    // Build HTML for the popup
    var html = '<div style="background:white;border:3px solid #333;' +
               'border-radius:8px;padding:20px;max-width:400px">' +
               '<h3 style="margin-top:0;color:#333">Secret Codes</h3>';

    // Check if SECRET_LIST exists and display it
    if (typeof SECRET_LIST !== 'undefined') {
        html += '<h4 style="color:#666;margin-bottom:5px">Session Secrets:</h4>' +
                '<ul style="margin-top:5px">';
        SECRET_LIST.forEach(function(s) {
            html += '<li style="font-family:monospace;color:#d32f2f;' +
                    'font-weight:bold">' + s + '</li>';
        });
        html += '</ul>';
    } else {
        html += '<p style="color:#d32f2f">SECRET_LIST not found</p>';
    }

    // Check if ATT_LIST exists and display it
    if (typeof ATT_LIST !== 'undefined') {
        html += '<h4 style="color:#666;margin-bottom:5px">Attendance Codes:</h4>' +
                '<ul style="margin-top:5px">';
        ATT_LIST.forEach(function(a) {
            html += '<li style="font-family:monospace;color:#0277bd;' +
                    'font-weight:bold">' + a + '</li>';
        });
        html += '</ul>';
    } else {
        html += '<p style="color:#d32f2f">ATT_LIST not found</p>';
    }

    // Add close button
    html += '<button onclick="this.parentElement.parentElement.remove()" ' +
            'style="margin-top:10px;padding:8px 16px;background:#666;color:white;' +
            'border:none;border-radius:4px;cursor:pointer">Close</button></div>';

    // Create overlay
    var overlay = document.createElement('div');
    overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;' +
                            'background:rgba(0,0,0,0.7);z-index:999998;' +
                            'display:flex;justify-content:center;align-items:center';
    overlay.innerHTML = html;

    // Click outside to close
    overlay.onclick = function(e) {
        if (e.target === overlay) overlay.remove();
    };

    document.body.appendChild(overlay);
})();