Skip to content

Instantly share code, notes, and snippets.

@Akkiesoft
Created April 22, 2021 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akkiesoft/4be0b355db7898204eb2300c7efb40f7 to your computer and use it in GitHub Desktop.
Save Akkiesoft/4be0b355db7898204eb2300c7efb40f7 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name birds gone somewhere
// @include https://twitter.com/intent/tweet*
// @include https://twitter.com/share*
// ==/UserScript==
var base = "https://social.mikutter.hachune.net/share?text=";
var url = location.href.split('?')[1].split('&');
var twtext = "";
var twurl = "";
for (var i = 0; i < url.length; i++) {
var j = url[i].split('=');
if (j[0] == 'text') {
twtext = j[1];
}
if (j[0] == 'url') {
twurl = "%0D%0A" + j[1];
}
}
var newurl = base + twtext;
if (twurl) { newurl += twurl; }
location.href = newurl;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment