fwenzel / copy-url Goto Github PK
View Code? Open in Web Editor NEWA Firefox Extension to copy the current page's canonical URL to the clipboard.
Home Page: https://addons.mozilla.org/addon/copy-url-252534/
A Firefox Extension to copy the current page's canonical URL to the clipboard.
Home Page: https://addons.mozilla.org/addon/copy-url-252534/
Thank you for staying with your add-on and updating it. However, with the last 2 updates the icon has vanished on each of my machines. Both run Palemoon and I supposed I could install it in Failfox to test it out there too.
Please look into it when you can and thank you in advance!
That's what github uses. If it follows any sort of established standard, I don't know. But it seems to make sense.
Either pick one or make it customizable.
"One quirk is that the first time I use it after starting firefox it freezes firefox for something like 10 seconds. After that it works fine. Any ideas about how to fix this? If it's any help I'm using firefox 47.0.1 under Debian 8."
https://addons.mozilla.org/en-US/firefox/addon/copy-url-252534/reviews/808546/reply
Add-on reviewer Rob W. says:
Note: If the hash contains a special RegExp character such as "(", then an error will be thrown at line 60.
I suggest to only send location.href, and trim the hash using
? url = data.url.split('#')[0];
The icon has a distinct 8-bit vibe but would probably look better if it was higher resolution.
Also, toolbar icons are now black and white, we might want to do that also.
How do I hide the notification that copying is successful? I don't need it.
BTW, when is it needed? Copying may be unsuccessful?
Then copy non ANSI char is "encoded" (URL-encoded).
Example:
Original: https://ru.wikipedia.org/wiki/Заглавная_страница
Copy result: https://ru.wikipedia.org/wiki/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0
Yes, i known than its default behavior in Firefox, but please add options for disable this mode.
See also: http://kb.mozillazine.org/Network.standard-url.encode-query-utf8
PS: sorry for my English
It works perfectly in Palemoon and I only use Failfox for testing purposes. However, when the icon is dragged from the statusbar up to the navigation bar where IMO it belongs in Freezefox it always resets to the statusbar. On PM it works perfectly.
I personally have long since given up on Mozilla and FF so it doesn't affect me- but you may want to take a look since most people still use the badly broken FF and don't know about the vastly superior PM.
If I make this a WebExtension, it can run in Google Chrome as well.
Some sites only do Facebook's opengraph. That's silly, but it's still a better alternative than falling back to the current document URL when present.
Example:
http://www.oregonlive.com/dining/index.ssf/2014/02/top_101_american_restaurants_l.html
On http://www.washingtonpost.com/, the copied URL is slightly different (e.g. http://www.washingtonpost.com/2010/11/11/ABKA8vC_page.html). This might not be a bug, flagging it as it's a little unexpected.
If the last character of the URL is an 's' it is omitted.
Nice extensión BTW
https://www.massdrop.com/buy/varmilo-vb87m-bluetooth?referer=LPUMLQ
On this page, both rel=canonical
and og:url
are defined. The latter has tracking flags for social media tracking. If both exist, rel=canonical should definitely take precedence.
Looks like an API change or something.
For example, try #3 (comment) .
Why this URL is not copied properly? I don't see any
'link rel="canonical"' inside the webpage.
The add-ons SDK has deprecated the widget (?) API. Time to switch the toolbar button code to the new UI API.
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.