/*
* @title Twimgs@
* @description view twitter.com-@user all images w/ timg.azurewebsites.net in newtab/window
* @include *://twitter.com/*
* @include *://mobile.twitter.com/*
* @license MIT License http://opensource.org/licenses/MIT
* @javascript_url
*/
// support RT e.g.
// https://twitter.com/twitter
// TBD
// - append link to all Twitter links/cards on whole sites
// - append link to all tweets
(() => {
// https://gist.github.com/noromanba/d730ccf3ae5e6916cd60
const canon = (() => {
return (document.head.querySelector('meta[property="og:url"][content]') || {}).content ||
(document.head.querySelector('link[rel="canonical"][href]') || {}).href ||
location.href;
})();
const screenName = new URL(canon).pathname.split('/').slice(1)[0];
if (!screenName) return;
const SERVICE = 'https://timg.azurewebsites.net/';
window.open(SERVICE + screenName);
})();