Informal Retweet
by
taizooo
2014-02-04 [2014/02/04 15:24:03]
(Forked from
transg2twit by
taizooo)
古典的なフォーマットによって Retweet する( いわゆる非公式 Retweet )
@@ -1,11 +1,13 @@
/*
- * @title transg2twit
- * @description google translate から tweet
- * @include http://translate.google.co.jp/*
+ * @title Informal Retweet
+ * @description 非公式RT bookmarklet
+ * @include https://twitter.com/*
*/
(function () {
- v = document.getElementById('result_box').textContent;
+ 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);
})()
/*
* @title Informal Retweet
* @description 非公式RT bookmarklet
* @include https://twitter.com/*
*/
(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);
})()
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。