Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
a userscript to navigate to another URL which has a better text on amazon.co.jp
var href = location.href;
var mt = href.match(/https:\/\/twitter.com\/intent\/tweet?.*.text=(.*).related=.url=(.*).via=/);
if (mt) {
var text = mt[1];
var url = mt[2];
var new_url = "https://twitter.com/intent/tweet?.*&text=" + text + "&url=" + url;
location.href = new_url;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.