-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'External link' and 'image' icons are too similar #2421
Labels
bug
Something isn't working
Comments
Here's my workaround userscript, which disables clicks on thumbnails entirely if not expanding:// ==UserScript==
// @name Fix links on Lemmy
// @namespace http://tampermonkey.net/
// @version 2024-04-12
// @description Disables clicks on all thumbnails except the ones that will expand, preventing unwanted navigation
// @author You
// @match https://lemmy.ml/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=lemmy.ml
// @grant none
// ==/UserScript==
(function() {
'use strict';
let interval;
function fixOne(elem) {
elem.removeAttribute('href');
elem.addEventListener('click', function(e) { e.preventDefault(); e.stopPropagation(); });
}
function fixList(elems) {
if(elems.length > 0) {
clearInterval(interval);
[].forEach.call(elems, fixOne);
}
}
function doit() {
fixList(document.querySelectorAll('a.text-body'));
fixList(document.querySelectorAll('a.thumbnail'));
}
interval = setInterval(doit, 2000);
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requirements
Summary
When scrolling, I want to expand images by clicking on them, but sometimes I am taken to a completely different site because it was an external link.
This happens because the two icons are WAY too similar to easily tell apart, especially since they are overlaid on the post's image.
I recommend either putting the external/image icon outside of the post's image or at least make them more different (perhaps different colors?)
Steps to Reproduce
Technical Details
Mostly a problem on phones where the icon is a couple millimeters wide, but also on desktop.
Lemmy Instance Version
Footer says
BE: 0.19.3
Lemmy Instance URL
https://lemmy.ml
The text was updated successfully, but these errors were encountered: