Giter VIP home page Giter VIP logo

canonical's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

cimbali

canonical's Issues

Validate canonical URL before showing icon

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 */ } ;

Feature Idea: Suggested URL

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:

https://example.com/

without manually editing the URL.

Would that be useful to anyone or just unnecessarily complicate and slow down the add-on?

False positive on D&D Beyond

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.

smile.amazon.com

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.

Copy canonical to clipboard

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:

  • just requires adding the clipboardWrite permission I believe
  • either with shift + click on the icon, or with an (optional) keyboard shortcut
  • then a function that simply does Clipboard.writeText(), e.g.: navigator.clipboard.writeText(canonicalUrl)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.