top | item 14629436

Show HN: Share-this: Medium-like text sharing

72 points| MaxArt2501 | 8 years ago |maxart2501.github.io

25 comments

order

_asummers|8 years ago

Am I the only person absolutely hates this feature on websites? I highlight where I'm at on the page in the event I get pulled away for whatever reason so I know where I was at in the page. Any JS interaction there drives me insane and I wish no sites did this. If you're going to ask me to share the text, at least make that show up _outside_ the text I'm reading, please.

jszymborski|8 years ago

I really hate this anti-pattern. I can't be the only person who highlights text as he reads to follow along...

keehun|8 years ago

I hate this, too, and have used uBlock to completely banish the responsible DOM elements.

Kpourdeilami|8 years ago

I usually read by highlighting the paragraph that I'm reading and I find it frustrating when websites break my workflow. Microsoft Azure's docs website does this as well.

batrat|8 years ago

Not alone. When I read text on my PC I tend to select text with my mouse a lot. This drive mu nuts when i select something then click accidentally on share button.

stingraycharles|8 years ago

Not surprisingly, the selecting text is broken on my device and instantly makes me scroll to the bottom of the page (iPad / Safari). Horrible user experience.

MaxArt2501|8 years ago

I agree, that's somewhat annoying, but that's also something developers and commissioners want.

But the good news is that the DOM skeleton is so minimal that you can create a stylesheet that does exactly what you said. Given the reference to the selection, positioning the popover is up to the developer.

MaxArt2501|8 years ago

I actually used the sharing functionality provided by the library to post this link here.

Suggestions are well accepted.

franciscop|8 years ago

It appears totally broken to me, it might be the adblocker though (I also block social media): https://imgur.com/a/bB017

The same thing on Medium appears perfect without any social media link.

MaxArt2501|8 years ago

Are you using Firefox, perchance? It has a "bug" (not sure about that, but surely it's the only one that shows that behavior) relating to SVGs, so it used to size incorrectly the fouth icon. I worked it around some minutes ago and it should be fine.

The first icon should be Twitter, so maybe it's really Adblocker. I've tested it with uBlock Origin and it shows the same behavior but, honestly, I don't want to tamper with that.

In fact, the sharers that are provided are meant to be examples, and not part of the core library. I guess simply changing the name attribute of the sharer would end up in showing the button.

dabernathy89|8 years ago

I really like the way Medium creates a "screenshot" when you share highlighted text to Twitter. I thought that's what this was going to be - although this is pretty cool, and it looks like this library makes it really easy to extend and add something like that.

anotherfounder|8 years ago

Does anyone know how they do this?

dwrowe|8 years ago

Looks interesting! Getting some odd skipping around testing on mobile (iOS / Chrome), where holding on a word skips to the bottom of the page, to an unrelated selection.

MaxArt2501|8 years ago

Strange. The selection itself isn't handled by the library itself, rather than the browser/OS. The library only reacts when a selection is made.

Does it happen to you in other cases as well?

tbodt|8 years ago

I'm afraid you may be violating Medium's copyright on their design, sir

MaxArt2501|8 years ago

I'm pretty sure there's a lot of prior art for their "design", so I'm kind of safe there.

Edit: unless you were referring to the whole aspect of the page. In that case, it's just a presentational page for an open source project, so it has nothing to do with blogging platforms. That should be ok, I guess.