issues
search
irok
/
CanonicalUrlDetector
Browser extension to change url in address bar to canonical url. (for Chrome and Firefox)
MIT License
9
stars
0
forks
source link
v2.0
#2
Closed
irok
closed
4 years ago
irok
commented
4 years ago
content.jsはcanonical URLを検出するだけにして、状態管理などはすべてbackground.jsで行うように変える。
canonical URLとlocation.hrefが同じならアイコンはinactiveにする。
onHistoryStateUpdatedイベントが来たらoriginal URLをそのURLに変更し、2のチェックを行う。
canonical URLとoriginal URLが違うときだけページアクションをactiveにする。
irok
commented
4 years ago
current URLとcanonical URLの比較という形に変更
current URLがcanonical URLが同じならグリーン、違っていたらイエローにする
link[rel="canonical"]
がない場合の正規URLをpure URLと表現
pure URLの生成ではフラグメントも削除