wesleyac / deeplinks Goto Github PK
View Code? Open in Web Editor NEWSimple deep links to any selection of text on your website.
License: MIT License
Simple deep links to any selection of text on your website.
License: MIT License
Hi,
We're trying to implement your plugin on a bubble.io app and we notice that the link get generated in the navigation bar URL, but when opened, nothing happens, we're not going to the selected text.
DEMO:
https://deeplink-to-text-plugin.bubbleapps.io/version-test
Do you have any hint?
I'm a serial highlighter when reading text on the internet. I like to use the mouse and click/drag things as I go, and deeplinks.js as-is can slow down that interactive reading experience a little bit. Around a year ago, I forked linktext.js and added a delay to setting the url, removing the lag feeling when highlighting text on the site (you can see in action here). Making the issue so it can be considered over here as well.
My use case is to provide links to an update on a ticket. For example:
https://rouilj.dynamic-dns.net/demo/issue439#29VHfN7-JF:5H:8Z
links to text inside a message on a ticket. This works fine when the link is not
located on the page https://rouilj.dynamic-dns.net/demo/issue439 itself.
If you click on the link (see https://rouilj.dynamic-dns.net/demo/issue439#msg36017)
many times it does nothing.
I think the browser sees that the links is to the same page. As a result it doesn't reload the page. It looks for
an element with a matching id. Since that id doesn't exist on the page it fails.
Any idea on how to fix this? Maybe add a document listener for click. If the listener detects one of deeplink's
links it jumps down the page and selects the text.
Alternatively is there a function I can call to trigger deeplink if I pass it a fragment/url?
When highlighting text, it changes the fragment of the url.
Is there a way I can tell that the url has been changed so I can e.g. insert a button
before/after the highlighted text. When the user clicks on the button, the url is copied
to the clipboard.
Thoughts?
The subject says it all. Having only one file to install would make this easier.
Although 1-6ee99c94.js is 2/3 the size of deeplinks so if it's not usually needed maybe it's
better that they are split.
At the very least it would be nice to have them named deeplink-error.js deeplink-utils.js or
something so they can be identified when put into a shared javascript directory.
Thanks.
I'm running Safari 15.2 on OSX, and when I try to copy the URL from the address bar, it removes the fragment.
I've tried here https://notebook.wesleyac.com/what-hypertext-could-be/.
It works great on other browsers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.