Table to Markdown Copier Enhanced Version

Convert html table to markdown format and copy it to clipboard

Bryan “Ironman” Stark
Daily installs
Total installs
0 0 0
Applies to
All sites

Table to Markdown Copier - Enhanced Version

Table to Markdown Copier - Enhanced Version

This enhanced version of the "Table to Markdown Copier" UserScript
introduces significant improvements for ease of use and performance,
including a transition to vanilla JavaScript and a streamlined activation

Du Dang's Original Script

The original UserScript can be found at
Greasy Fork, version 1.0.1.

Du Dang's Original Git Hub Repo

Why Make Changes?

When I first tried Du Dang's script, I thought it was great but had some
trouble with the keyboard shortcut of Shift+Shift+T. When looking at the
code, I realized there were a few things that could be enhanced for a
slightly better user experience.

Changes in the Enhanced Version

  • Transition to Vanilla JavaScript: Replaced jQuery-based
    code with vanilla JavaScript to enhance performance and reduce

  • Clipboard API Integration: Replaced ClipboardJS with
    the native Clipboard API for copying text to the clipboard.

  • Activation Method: The script is now activated via the
    Tampermonkey menu or the UserScript manager menu, eliminating reliance
    on keyboard shortcuts. This change makes the script more accessible and
    user-friendly as some users may already have the keyboard shortcuts
    assigned to other functions as I did.

  • Comments Removal: Removed all comments from the script
    for cleaner and more efficient code.

  • Metadata Update: Updated the script's metadata,
    including the version number to 2.1.0, and authorship to reflect the new
    maintainer while crediting the original creator.

Using the Enhanced Script

To activate the script, select the "Convert Table to Markdown" option from
the Tampermonkey menu or your UserScript manager menu. This action will
add a purple-colored "MD" button to the top right cell of each table on
the page. Clicking this button will convert the table to Markdown format
and copy it to your clipboard.

Test the Script

Users can test the script on the following webpage:
W3Schools HTML Tables. This page contains several tables that the script can process.


MIT License