Skip to content

Instantly share code, notes, and snippets.

@tetsutan
tetsutan / note_share_button_disabler.user.js
Created October 28, 2021 10:25
NoteShareButtonDisabler
// ==UserScript==
// @name NoteShareButtonDisabler
// @namespace com.eckrel.notesharebuttondisabler
// @include https://note.com/*
// @version 1.0
// @grant none
// ==/UserScript==
// マウスアップまでエレメントが存在しないので、タイミングを考慮して2回削除を実行
// ==UserScript==
// @name QiitaUrlCleaner
// @version 1
// @grant none
// @include *://qiita.com/*/items/*
// ==/UserScript==
(function(doc) {
if(doc.location.search) {
history.replaceState(null, "Qiita URL Cleaner", doc.location.pathname);
@tetsutan
tetsutan / redmine_openall.js
Last active June 21, 2018 09:23
Redmineのチェックしたやつを新しいタブで開く
// これ ( https://gist.github.com/tetsutan/1308985 ) のスタンドアロン版
// oneliner
// document.querySelectorAll("tbody .checkbox input[type=checkbox]:checked").forEach(function(n){ var href = n.parentNode.parentNode.querySelector(".id a").href; if(href){ window.open(href); } });
var checkboxes = document.querySelectorAll("tbody .checkbox input[type=checkbox]:checked");
for(var i=0; i<checkboxes.length; i++){
var checkbox = checkboxes[i];
var href = checkbox.parentNode.parentNode.querySelector(".id a").href;
if(href){
window.open(href)
@tetsutan
tetsutan / yukarin_fanclub_visual_video_make_larger.user.js
Last active September 4, 2015 19:43
ゆかりんのファンクラブページのびじゅある動画を拡大するやつ
// ==UserScript==
// @name YukarinFanclubVisualVideoMakeLarger
// @namespace com.eckrel.yukarin_fanclub_visual_video_make_larger
// @include https://www.mellowpretty.com/p/visual/
// @include https://www.mellowpretty.com/p/photo_gallery/
// @version 2
// @grant none
// ==/UserScript==
@tetsutan
tetsutan / HatenaKeywordDisabler.user.js
Last active May 17, 2020 14:24
HatenaKeywordDisabler.user.js
// ==UserScript==
// @name HatenaKeywordDisabler
// @namespace com.eckrel.hatenakeyworddisabler
// @include http://*.hatelabo.jp/*
// @include http://*.hatena.ne.jp/*
// @include https://*.hatelabo.jp/*
// @include https://*.hatena.ne.jp/*
// @version 1.1
// @grant none
// ==/UserScript==
@tetsutan
tetsutan / redmine_open_all.user.js
Created July 23, 2015 11:56
Redmineでチェックしたのを新しいタブで開く
// ==UserScript==
// @name Redmine open all
// @namespace com.eckrel.redmine
// @include *
// @version 1.0.0
// @grant none
// ==/UserScript==
(function(){
@tetsutan
tetsutan / psplus.js
Last active November 5, 2020 02:17
[Deprecated]PSPlus のカート追加スクリプト
// 今月のフリープレイのページへいって
// このJSをデベロッパーコンソールなどから実行する
// カートが10こまでしか入らないので、何度か実行する必要があるかも
// one line
// (function(){ var selector = "button.grid-cell__add-to-cart-button"; var elements = $(selector).slice(0, 10); var next = function(index){ var el = elements[index]; if(!el){ $(".fa-shopping-cart").trigger("click"); return; } $(el).trigger("click"); setTimeout(function(){ var close = $(".modal-dialog .modal-dialog__close"); if(!close[0]){ setTimeout(arguments.callee, 500); return; } close.trigger("click"); setTimeout(function(){ next(index+1); }, 100); }, 100); }; next(0); })();
(function(){
var selector = "button.grid-cell__add-to-cart-button";
@tetsutan
tetsutan / hatebu_redeclaration.patch
Created January 17, 2015 16:38
Firefox35におけるvimperatorはてブ拡張パッチ
diff --git .vimperator/plugin/hatenabookmark.js .vimperator/plugin/hatenabookmark.js
index 23e385c..429da91 100644
--- .vimperator/plugin/hatenabookmark.js
+++ .vimperator/plugin/hatenabookmark.js
@@ -60,8 +60,8 @@ liberator.plugins.hBookmark = (function() {
let bangFunction;
let bangFunctions = {
- openNewTab: function(url) {
- let url = plugin.command.genURL(url);
@tetsutan
tetsutan / add_projectdirs_cdr.zsh
Created November 12, 2014 11:25
cdrに今いるプロジェクトのディレクトリ全部を登録するスクリプト
git ls-files | egrep -v "^apps|^gradle|assets"| xargs -I {} dirname {} | sort | uniq | sed -e "s;^;$'$PWD/;" | sed -e "s;$;';" >> ~/.zsh/.chpwd-recent-dirs
// ==UserScript==
// @name ldr_z_function
// @namespace knell
// @include http://reader.livedoor.com/*
// @include http://fastladder.com/reader/*
// ==/UserScript==
(function (){
window.addEventListener("keypress", function (e) {
if(e.charCode == 122 || e.keyCode == 90){ // z key
setTimeout(function(){