// // Bookmarklet // // Open up the corresponding translation in Japanese or original English article // in a new window for http://techcrunch.com and http://jp.techcrunch.com // javascript:(function(){ _url=location.href; if(_url.indexOf("http://jp.techcrunch") !== -1) { _new_url = _url.replace("http://jp.", "https://").replace(/201[0-9\/]+/, ""); }; if(_url.indexOf("https://techcrunch") !== -1) { _new_url = _url.replace("https://", "http://jp."); _new_url = _new_url.replace(/(201[0-9])\/([0-9]+)\/([0-9]+)\//, function(match, y, m, d) { return y + m + d; }); }; window.open(_new_url); })(); // the rule is like so: // J-E // http://jp.techcrunch.com/2013/12/06/20131205airfy-is-a-wi-fi-hotspot-that-you-wouldnt-be-ashamed-to-take-home-to-mother/ // --> // http://techcrunch.com/airfy-is-a-wi-fi-hotspot-that-you-wouldnt-be-ashamed-to-take-home-to-mother/ // E-J // http://techcrunch.com/2013/12/05/airfy-is-a-wi-fi-hotspot-that-you-wouldnt-be-ashamed-to-take-home-to-mother/ // --> // http://jp.techcrunch.com/20131205airfy-is-a-wi-fi-hotspot-that-you-wouldnt-be-ashamed-to-take-home-to-mother/