Skip to content

Instantly share code, notes, and snippets.

@karakufire
Last active November 18, 2019 09:55
Show Gist options
  • Save karakufire/7fae6c6d90aaf23843be5c5cc83abf74 to your computer and use it in GitHub Desktop.
Save karakufire/7fae6c6d90aaf23843be5c5cc83abf74 to your computer and use it in GitHub Desktop.
TwitterのページをMobile版とPC版で切り替えるスクリプト(ブックマークレット用)
javascript: (() => { let { hostname, pathname } = location; if (/^((mobile\.)?twitter\.com)/.test(hostname)) { /^mobile\./.test(hostname) ? (hostname = hostname.replace('mobile.', '')) : (hostname = 'mobile.' + hostname); window.open(`https://${hostname}${pathname}`); } })()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment