bhadaway / canonical Goto Github PK
View Code? Open in Web Editor NEWCanonical Firefox Add-on — Allows you to quickly redirect to the canonical version of the URL you're on, if available.
Home Page: https://addons.mozilla.org/addon/canonical-link/
Canonical Firefox Add-on — Allows you to quickly redirect to the canonical version of the URL you're on, if available.
Home Page: https://addons.mozilla.org/addon/canonical-link/
I just was on a website where the canonical icon showed in the address bar, but the URL just said https://
. When I looked in the page source I could see the add-on did nothing wrong, as the page contained:
<link href="https://" rel="canonical"/>
I think it would be a good idea to validate the URL is valid, before displaying the icon, e.g. try { new URL(url); } catch (err) { /* not valid */ } ;
What if instead of doing nothing when no canonical link exists, a cleaner version of the URL was still suggested (indicated by a yellow "S" icon)?
It wouldn't be the canonical URL per se, but it could be useful in some contexts to clean up nasty URLs.
For example, when dealing with tracking or affiliate links, perhaps you'd prefer to get off of them quickly, to a cleaner URL.
Say you land on:
https://example.com/?utm_source=Cookie%2BMonster&
and there's no canonical URL provided by the website, but you'd still prefer to quickly redirect to:
without manually editing the URL.
Would that be useful to anyone or just unnecessarily complicate and slow down the add-on?
In D&D Beyond, character sheet URLs have the form https://www.dndbeyond.com/characters/XXXXXXX
where the X's are 7 numeric digits. Canonical not-so-helpfully offers a link to https://www.dndbeyond.com/characters
, which is the list of character sheets.
Can it keep the prefix for Amazon Smile pages? See the reviews on your add-on page to see why.
People use the Amazon Smile program to donate to charities.
Would it be possible to add a feature to copy the canonical link of the page to the clipboard?
I found myself on a nasty website where I could click the canonical link but it would then redirect me to a page with added parameters − however I want to save the canonical URLs, so I had to 1) click the canonical icon to get rid of most of the garbage, 2) select which part of the address bar to copy/paste, 3) ctrl + c.
I think this feature would be useful if you’re already on a non-canonical page, but if you want to save or share it for whatever reason, and want to use the canonical link for that.
I think this could be pretty easy to implement:
clipboardWrite
permission I believeClipboard.writeText()
, e.g.: navigator.clipboard.writeText(canonicalUrl)
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.