Created
October 27, 2016 14:11
-
-
Save Sunitha/844a5c8f5cf7435bf9a908ee35242610 to your computer and use it in GitHub Desktop.
a userscript to navigate to another URL which has a better text on amazon.co.jp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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