Skip to content

Instantly share code, notes, and snippets.

#zero_lead_index
,#web_pc_top
,#head_ads
,#ichiba_placeholder
,#web_pc_footer
,#web_pc_watch_footer
{
display: none;
}
// ==UserScript==
// @include http://twitter.com/*
// ==/UserScript==
window.addEventListener('DOMNodeInserted', function (e) {
var f = e.target.firstElementChild;
if(f && f.className == 'main-content') {
addTweetEvent(f.querySelector('.twitter-anywhere-tweet-box-editor'), f.querySelector('.tweet-button'));
} else if(e.target.className == 'twitter-anywhere-tweet-box-editor') {
addTweetEvent(e.target, document.querySelector('.twttr-dialog-container').querySelector('.tweet-button'))
(function($) {
$.fn.slideShow = function() {
var prefix = "slide";
var l = location.protocol + "//" + location.hostname + location.pathname;
var pages = this.length;
var fragment_pattern = RegExp("#" + prefix + "(\\d+)");
if(! fragment_pattern.test(location.hash)) {
location.href = l + "#" + prefix + "1"; // don't reload page with Firefox;
}
var pageNumber = function() {
(function($) {
$.fn.randomRotation = function(i) {
var c = 90;
var prefix = $.browser.opera ? "-o-":
$.browser.webkit ? "-webkit-":
$.browser.mozilla ? "-moz-":
"";
return this.each(function() {
var pom = Math.random() > 0.5 ? 1 : -1
var rotation = pom * Math.floor(Math.random() * c);
// ==UserScript==
// @include http://www.delicious.com/network/*
// ==/UserScript==
(function() {
var style = document.createElement("style");
document.getElementsByTagName("head")[0].appendChild(style);
var sheet = style.sheet;
sheet.insertRule("li.post a:visited { font-weight: 800 }", sheet.cssRules.length);
(function($) {
$.fn.autoResizeTextarea = function() {
return this.each(function() {
if(this.tagName.toLowerCase() != "textarea") return;
var dr = this.getAttribute("rows");
$(this).css("overflow", "hidden").keyup(function() {
var l = this.value.split("\n").length;
if(dr < l) {
this.setAttribute("rows", l);
} else {
@higeorange
higeorange / jquery.resizable.js
Created September 21, 2010 19:32
要素縦方向のみリサイズ
(function($) {
$.fn.resizable = function(options) {
var default_options = {
handleClass: "handle"
};
options = $.extend(default_options, options || {});
return this.each(function() {
addHandle(this, options);
});
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>form tezst</title>
</head>
<body>
<script type="text/javascript">
var nanka = {
addEvent:function(node,type,fn,useCapture){
// ==UserScript==
// @include http://twitter.com/*
// ==/UserScript==
(function() {
document.getElementById("status").blur();
})();
// ==UserScript==
// @include http://delicious.com/tag/*
// ==/UserScript==
(function(w) {
//Settings
var POST_COUNT = 100; // 1-100
var THRESHOLD = 2;
var $ = function(id) { return $[id] || ( $[id] = document.getElementById(id) )};