JSFiddle - React, Tailwind, and code Playground
JavaScript
(function () {
var url = prompt("Enter the url to share");
if (url) {
prompt("Share the following url - ", "http://www.twitter.com/share?url=" + encodeURIComponent(url))
}
})()