Canvas Tab Expander

Automatically expands all tabs in Canvas assignments and combines content

Autor
zimmshane
Instalaciones diarias
0
Instalaciones totales
3
Calificaciones
0 0 0
Versión
0.2
Creado
25/10/2024
Actualizado
25/10/2024
Licencia
MIT
Funciona en

Canvas Tab Expander Userscript

What It Does

This userscript automatically expands all tabbed content in Canvas assignments, allowing you to view all assignment instructions on a single page instead of clicking through multiple tabs. It adds a convenient "Expand All Tabs" button at the top of the assignment description and automatically expands all content when the page loads.

How to Install

  1. First, install a userscript manager:

  2. Install the script:

    • Click the Tampermonkey/Greasemonkey icon in your browser
    • Select "Create new script"
    • Copy and paste the provided script code
    • Save the script (Ctrl+S or File → Save)

Features

  • Automatically expands all tabs when you open an assignment
  • Provides a button to manually re-expand tabs if needed
  • Works with nested content and accordions
  • Maintains all original formatting and content
  • Only runs on Canvas assignment pages
  • Handles dynamically loaded content

Customizing for Your School's Canvas URL

By default, the script works with URLs ending in "instructure.com", but many schools use custom Canvas URLs. Here's how to modify the script for your school:

  1. Find your school's Canvas URL pattern. Examples:
  • canvas.university.edu
  • lms.university.edu
  • learn.university.edu
  1. Modify the @match line in the script:
    • Find this line near the top of the script:
   // @match        https://*.instructure.com/courses/*/assignments/*
  • Add your school's URL pattern. You can add multiple lines for multiple URLs:
   // @match        https://*.instructure.com/courses/*/assignments/*
   // @match        https://canvas.university.edu/courses/*/assignments/*
   // @match        https://lms.university.edu/courses/*/assignments/*

Example Modifications:

  // @match        https://*.instructure.com/courses/*/assignments/*
  // @match        https://canvas.university.edu/courses/*/assignments/*
  // @match        https://canvas.otherschool.edu/courses/*/assignments/*

Note: Make sure to keep the /courses/*/assignments/* part of the URL pattern, as this ensures the script only runs on assignment pages.

Finding Your Canvas URL

  1. Go to your school's Canvas login page
  2. Look at the URL in your browser's address bar
  3. Copy everything between https:// and the first / after the domain
  4. Use this as your URL pattern in the script

Testing After Modification

After adding your school's URL:

  1. Save the script
  2. Refresh your Canvas assignment page
  3. Verify that the "Expand All Tabs" button appears
  4. Test that clicking the button expands all tabs

If the script doesn't work after modification, double-check that your URL pattern exactly matches your school's Canvas URL.

Safety and Privacy

  • The script only runs on Canvas assignment pages
  • Makes no external connections
  • Doesn't collect or modify any user data
  • Only modifies the display of content that's already visible to you

Acknowledgement

  • This script was made with AI (Claude 3.5 Sonnet)