show twitter alt text by notafile

show twitter alt text screenshot
Install Get Stylus Write a review

Details

Authornotafile

LicenseNo License

Created atOctober 08, 2021 12:20

Updated atOctober 08, 2021 12:20

Applies totwitter

Statistics

Learn how we calculate statistics in the FAQ.

Total views80

Total installs154

Weekly installs17

Weekly updates11

Description

show twitter images’ alt text on hover

Notes

stolen from: https://github.com/alexwlchan/highlight-twitter-alt-text so that I can more easily share it between devices

History

Daily snapshots of style statistics.

2021-10-082021-10-132021-10-182021-10-232021-10-282021-11-022021-11-072021-11-122021-11-172021-11-222021-11-272021-12-01Date0.003.807.5011.3015.0018.8022.5026.3030.00Daily countDaily installsDaily updatesDaily views
2021-10-082021-10-132021-10-182021-10-232021-10-282021-11-022021-11-072021-11-122021-11-172021-11-222021-11-272021-12-01Date0.0020.0040.0060.0080.00100.00120.00140.00160.00Total countTotal installsTotal views

Source code

/* ==UserStyle==
@name         show twitter alt text
@version      20211008.12.20
@namespace    userstyles.world/user/notafile
@description  show twitter images' alt text on hover
@author       notafile
@license      No License
==/UserStyle== */

@-moz-document domain("twitter.com") {
/** This snippet adds an overlay to images on Twitter, so the alt text
  * (if there is any) is shown at the top of an image.
  */
div[data-testid="tweetPhoto"]:not([aria-label="Image"]),
div[data-testid="previewInterstitial"]:not([aria-label="Embedded video"]) {
    margin: 0 !important;
}

/** If you want to see alt text all the time, remove :hover from these two rules */
div[data-testid="tweetPhoto"]:hover:not([aria-label="Image"]):after,
div[data-testid="previewInterstitial"]:hover:not([aria-label="Embedded video"]):after {
    content: attr(aria-label);
    background: rgba(0, 0, 0, .75);
    color: #fff;
    padding: 10px;
    font-family: sans-serif;
    line-height: 130%;
    z-index: 1;
}
}

Reviews

No reviews yet.