Informal Retweet
by
taizooo
2014-02-04 [2014/02/04 15:24:03]
(Forked from
transg2twit by
taizooo)
古典的なフォーマットによって Retweet する( いわゆる非公式 Retweet )
@@ -5,10 +5,12 @@
* @javascript_url
*/
+// CLASSIC_RT_FORMAT='RT @'+tweet_author+': '+original_tweet_message;
+
(function () {
- a = location.pathname.split('/');
- b = document.querySelector('.tweet-text').textContent;
- v = 'RT @' + a[1] + ': ' + b;
- u = 'http://twitter.com/?status=' + encodeURIComponent(v);
- window.open(u);
+ var tweet_author = location.pathname.split('/')[1];
+ var original_tweet_message = document.querySelector('.tweet-text').textContent;
+ var post_data = 'RT @' + tweet_author + ': ' + original_tweet_message;
+ var url = 'http://twitter.com/?status=' + encodeURIComponent(post_data);
+ window.open(url);
})()
/*
* @title Informal Retweet
* @description 古典的なフォーマットによって Retweet する( いわゆる非公式 Retweet )
* @include https://twitter.com/*
* @javascript_url
*/
// CLASSIC_RT_FORMAT='RT @'+tweet_author+': '+original_tweet_message;
(function () {
var tweet_author = location.pathname.split('/')[1];
var original_tweet_message = document.querySelector('.tweet-text').textContent;
var post_data = 'RT @' + tweet_author + ': ' + original_tweet_message;
var url = 'http://twitter.com/?status=' + encodeURIComponent(post_data);
window.open(url);
})()
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。