Skip to content

Instantly share code, notes, and snippets.

@unarist
Last active August 29, 2015 14:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unarist/382f758edb10c4a46d02 to your computer and use it in GitHub Desktop.
Save unarist/382f758edb10c4a46d02 to your computer and use it in GitHub Desktop.
アマゾンポチと入れさせないやつ.user.js
// ==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