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://twitter.com/cxx | |
// @include http://www.facebook.com/plugins/like.php?* | |
// @version 1.2.1 | |
// ==/UserScript== | |
var texts = document.evaluate('.//text()', document.body, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0, len = texts.snapshotLength; i < len; i++) { | |
var t = texts.snapshotItem(i); |
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
# -*- coding: utf-8 -*- | |
Earthquake.init do | |
output_filter do |item| | |
next if item.nil? || item["text"].nil? | |
item["text"].gsub!(/(\(|(|)笑(\)|))/,"(笑ってない)") | |
true | |
end |
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
# -*- coding: utf-8 -*- | |
# auto favorite | |
Earthquake.init do | |
output_filter do |item| | |
keywords = config[:fav_keywords] | |
next if item.nil? || item["text"].nil? || item["user"]["screen_name"].nil? || item["retweeted_status"] | |
if item["user"]["screen_name"] == twitter.info["screen_name"] | |
twitter.info["status"]["text"] = item["text"] |
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
# -*- coding: utf-8 -*- | |
# auto favorite | |
Earthquake.init do | |
output_filter do |item| | |
next if item.nil? || item["text"].nil? || item["user"]["screen_name"].nil? || item["retweeted_status"] | |
if item["user"]["screen_name"] == twitter.info["screen_name"] | |
twitter.info["status"]["text"] = item["text"] | |
next |
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
# -*- coding: utf-8 -*- | |
# auto favorite | |
Earthquake.init do | |
output_filter do |item| | |
next if item.nil? || item["text"].nil? || item["user"]["screen_name"].nil? | |
if item["user"]["screen_name"] == twitter.info["screen_name"] | |
twitter.info["status"]["text"] = item["text"] | |
next |
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
# -*- coding: utf-8 -*- | |
# auto favorite | |
Earthquake.init do | |
output_filter do |item| | |
next if item.nil? || item["text"].nil? | |
twitter.favorite item["id"] if /(^|[^a-zA-Z0-9_])#{twitter.info["screen_name"]}[^a-zA-Z0-9_]/ =~ item["text"] | |
true | |
end |
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
# -*- coding: utf-8 -*- | |
# reverse tweet | |
# | |
# e.g. :reverse hoge #=> egoh | |
# or | |
# :reverse $aa #=> reverse RT | |
# | |
Earthquake.init do | |
command %r|^:reverse\s(.+)$|, :as => :reverse do |m| | |
txt = if /^\d+$/ =~ m[1] |
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
# -*- coding: utf-8 -*- | |
# reverse tweet | |
# | |
# e.g. :reverse $aa | |
# | |
Earthquake.init do | |
command %r|^:reverse\s(\d+)\s*$|, :as => :reverse do |m| | |
st = cache.read("status:#{m[1].to_i}"); | |
input st["text"].split(//).reverse.join | |
end |
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
# -*- coding: utf-8 -*- | |
# auto say yo! | |
Earthquake.init do | |
output_filter do |item| | |
next if item.nil? || item["text"].nil? || !(/^\s*yo\s+yo\s*/i =~ item["text"]) | |
twitter.update "yo" + " " * rand(20) | |
true | |
end |
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
# -*- coding: utf-8 -*- | |
# 自分のTLで最近の診断されたやつを俺もする | |
# | |
# usage: | |
# :shindan [NUMBER] [hogehoge] | |
# or | |
# :shindan [option] | |
# | |
# option: | |
# -l: display recent shindan list |