Last active
August 29, 2015 14:24
-
-
Save unarist/382f758edb10c4a46d02 to your computer and use it in GitHub Desktop.
アマゾンポチと入れさせないやつ.user.js
This file contains hidden or 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
// ==UserScript== | |
// @name アマゾンポチと入れさせないやつ | |
// @namespace http://github.com/unarist/ | |
// @version 0.2 | |
// @description 「#アマゾンポチ と入れて@返信でカートに追加・後で買う」「@amazonJPさんから」を消す | |
// @author unarist | |
// @match http://www.amazon.co.jp/*dp/* | |
// @match http://www.amazon.co.jp/gp/product/* | |
// @grant none | |
// ==/UserScript== | |
var elem = jQuery('a[title=Twitterでシェアする]'); | |
var href = elem.attr('href'); | |
var tweeturl = decodeURIComponent(href.replace(/.+location=/, '')); | |
tweeturl = tweeturl.replace(/&via=[^&]+/, ''); | |
tweeturl = tweeturl.replace(/&text=[^&]+/, '&text=' + encodeURIComponent(document.title)); | |
elem.attr('href', tweeturl); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment