This file contains 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
var twttr = { | |
klass: function (f) { | |
var g = function () { | |
f.apply(this, arguments); | |
}; | |
return g; | |
} | |
}; | |
twttr.klass(function () { |
This file contains 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
@charset "utf-8"; | |
/* ----- twicli.css ----- */ | |
/* | |
twicli用CSS Elsewhither(http://else.jimdo.com/others/storage/)をベースに、 | |
Old Twitterになんとなく似せる感じ | |
*/ | |
* { | |
margin: 0; |
This file contains 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
/* replace short URLs with original URLs */ | |
(function(){ | |
var re = /^http:\/\/(t\.co|tinyurl\.com|bit\.ly|is\.gd|u\.nu|icio\.us|tr\.im|cli\.gs|twurl\.nl|url\.ie|j\.mp|ow\.ly|ff\.im|digg\.com|tumblr\.com|htn\.to|goo\.gl)\/|http:\/\/p\.tl\/(?!.\/)/; | |
var api = 'http://atsushaa.appspot.com/untiny/get'; | |
var queue = []; | |
var wait = 10000; | |
var remove = function(e){if (e && e.parentNode) e.parentNode.removeChild(e)}; | |
window.replaceUrl = function(hash) { | |
for (var shortUrl in hash) if (hash.hasOwnProperty(shortUrl)) { |
This file contains 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
langResources["What\'s happening?"] = ['いまなにしてる?']; | |
langResources['Reply to $1'] = ['$1 への返信']; | |
(function () { | |
// divをつくる | |
var optionDiv = $('option'); | |
var dummy = document.createElement('div'); | |
dummy.innerHTML = '<div id="doing">' + _("What\'s happening?") + '</div>'; | |
optionDiv.insertBefore(dummy.firstChild, optionDiv.firstChild); |
This file contains 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
var embedReply, tweetCache = {}; | |
(function () { | |
// APIが足りない時用proxy(気休め) | |
var proxies = [ | |
{ | |
url: twitterAPI + 'statuses/show/{id}.json?suppress_response_codes=true', | |
filter: function (d) { return d } | |
}, | |
{ |
This file contains 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
(function () { | |
var load_for_tab_original = xds.load_for_tab; | |
xds.load_for_tab = function (url, callback, callback_key) { | |
re = /http:\/\/search\.twitter\.com\/search\.json/; | |
if (re.test(url)) { | |
url = url.replace(re, 'http://twitter.com/phoenix_search.phoenix'); | |
// できるだけsearch.jsの関数を書き換えないように…と思ったけど断念 | |
/* | |
var callback_original; | |
url = url.replace(/callback=(\w+)/, function (match, sub1, offset, s) { |
This file contains 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
var seekRTOrigin; | |
(function () { | |
// RTをクリックできるようにする | |
function makeRTClickable(element, tw) { | |
if (tw.retweeted_status && !display_as_rt) { | |
tw = tw.retweeted_status; | |
} | |
var status = element.getElementsByClassName('status'); // getElementsByClassName使ってるのでIEでは動かない? | |
if (status.length > 0) { | |
status = status[0]; |
This file contains 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 Hatebu More Twitter Comment | |
// @namespace http://www.4bit.net/ | |
// @description はてブmoreページのコメントリストにTwitterコメントを合成表示 | |
// @author tkawa | |
// @include http://b.hatena.ne.jp/entry?mode=more* | |
// ==/UserScript== | |
(function(d, func) { | |
var check = function() { |
This file contains 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
replaceUrl: function (elem, link, url) { | |
if (url.indexOf(twitterURL) == 0 || url.indexOf("javascript:") == 0) | |
return; // skip @... or #... | |
} else if (url.match(/^(http:\/\/4sq.com\/\w+)$/)) { | |
var _url = url; | |
xds.load('http://api.embed.ly/1/oembed?url='+encodeURIComponent(url), | |
function(x) { | |
var p = x.thumbnail_url; | |
if (!p) return; | |
addThumbnail(elem, p, _url); |
OlderNewer