Skip to content

Instantly share code, notes, and snippets.

@masutaka
Last active August 10, 2019 03:13
Show Gist options
  • Save masutaka/388c226c54855015ed530ac3a36c5883 to your computer and use it in GitHub Desktop.
Save masutaka/388c226c54855015ed530ac3a36c5883 to your computer and use it in GitHub Desktop.
esa.io の通常カテゴリと、Archived カテゴリを行ったり来たりするブックマークレット
if (/esa\.io\/#path=%2FArchived%2F/.test(location.href)) {
location.href = location.href.replace(/#path=%2FArchived%2F/, '#path=%2F');
} else if (/esa\.io\/#path=%2F/.test(location.href)) {
location.href = location.href.replace(/#path=%2F/, '#path=%2FArchived%2F');
}
@masutaka
Copy link
Author

javascript:(function()%7Bif%20(%2Fesa%5C.io%5C%2F%23path%3D%252FArchived%252F%2F.test(location.href))%20%7B%0A%20%20location.href%20%3D%20location.href.replace(%2F%23path%3D%252FArchived%252F%2F%2C%20'%23path%3D%252F')%3B%0A%7D%20else%20if%20(%2Fesa%5C.io%5C%2F%23path%3D%252F%2F.test(location.href))%20%7B%0A%20%20location.href%20%3D%20location.href.replace(%2F%23path%3D%252F%2F%2C%20'%23path%3D%252FArchived%252F')%3B%0A%7D%7D)()%3B

↑ を適当な名前のブックマークとして保存する。

https://caiorss.github.io/bookmarklet-maker/ を使った。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment